mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-04-25 15:12:12 +00:00
use more useful defaults for -O, fix an utoa issue
This commit is contained in:
parent
c41c57e6d6
commit
af00bdeefe
@ -70,7 +70,7 @@ exports.sourceMapRoot = "assemblyscript:///";
|
||||
exports.libraryPrefix = assemblyscript.LIBRARY_PREFIX;
|
||||
|
||||
/** Default Binaryen optimization level. */
|
||||
exports.defaultOptimizeLevel = 2;
|
||||
exports.defaultOptimizeLevel = 3;
|
||||
|
||||
/** Default Binaryen shrink level. */
|
||||
exports.defaultShrinkLevel = 1;
|
||||
|
@ -13,7 +13,7 @@
|
||||
"description": [
|
||||
"Optimizes the module. Also has the usual shorthands:",
|
||||
"",
|
||||
" -O Uses defaults. Equivalent to -O2s",
|
||||
" -O Uses defaults. Equivalent to -O3s",
|
||||
" -O0 Equivalent to --optimizeLevel 0",
|
||||
" -O1 Equivalent to --optimizeLevel 1",
|
||||
" -O2 Equivalent to --optimizeLevel 2",
|
||||
|
@ -107,28 +107,19 @@ const FRC_POWERS: u64[] = [
|
||||
// Count number of decimals for u32 values
|
||||
// In our case input value always non-zero so we can simplify some parts
|
||||
export function decimalCount32(value: u32): u32 {
|
||||
if (ASC_SHRINK_LEVEL >= 1) {
|
||||
let l: u32 = 32 - clz<u32>(value); // log2
|
||||
let t = l * 1233 >>> 12; // log10
|
||||
|
||||
let power = unchecked(POWERS10[t]);
|
||||
t -= u32(value < power);
|
||||
return t + 1;
|
||||
} else {
|
||||
if (value < 100000) {
|
||||
if (value < 100) {
|
||||
return select<u32>(1, 2, value < 10);
|
||||
} else {
|
||||
let m = select<u32>(4, 5, value < 10000);
|
||||
return select<u32>(3, m, value < 1000);
|
||||
}
|
||||
if (value < 100000) {
|
||||
if (value < 100) {
|
||||
return select<u32>(1, 2, value < 10);
|
||||
} else {
|
||||
if (value < 10000000) {
|
||||
return select<u32>(6, 7, value < 1000000);
|
||||
} else {
|
||||
let m = select<u32>(9, 10, value < 1000000000);
|
||||
return select<u32>(8, m, value < 100000000);
|
||||
}
|
||||
let m = select<u32>(4, 5, value < 10000);
|
||||
return select<u32>(3, m, value < 1000);
|
||||
}
|
||||
} else {
|
||||
if (value < 10000000) {
|
||||
return select<u32>(6, 7, value < 1000000);
|
||||
} else {
|
||||
let m = select<u32>(9, 10, value < 1000000000);
|
||||
return select<u32>(8, m, value < 100000000);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -136,28 +127,19 @@ export function decimalCount32(value: u32): u32 {
|
||||
// Count number of decimals for u64 values
|
||||
// In our case input value always greater than 2^32-1 so we can skip some parts
|
||||
export function decimalCount64(value: u64): u32 {
|
||||
if (ASC_SHRINK_LEVEL >= 1) {
|
||||
let l: u32 = 64 - <u32>clz<u64>(value); // log2
|
||||
let t = l * 1233 >>> 12; // log10
|
||||
|
||||
let power = unchecked(<u64>POWERS10[t]);
|
||||
t -= u32(value < 10000000000 * power);
|
||||
return t + 1;
|
||||
} else {
|
||||
if (value < 1000000000000000) {
|
||||
if (value < 1000000000000) {
|
||||
return select<u32>(11, 12, value < 100000000000);
|
||||
} else {
|
||||
let m = select<u32>(14, 15, value < 100000000000000);
|
||||
return select<u32>(13, m, value < 10000000000000);
|
||||
}
|
||||
if (value < 1000000000000000) {
|
||||
if (value < 1000000000000) {
|
||||
return select<u32>(11, 12, value < 100000000000);
|
||||
} else {
|
||||
if (value < 100000000000000000) {
|
||||
return select<u32>(16, 17, value < 10000000000000000);
|
||||
} else {
|
||||
let m = select<u32>(19, 20, value < 10000000000000000000);
|
||||
return select<u32>(18, m, value < 1000000000000000000);
|
||||
}
|
||||
let m = select<u32>(14, 15, value < 100000000000000);
|
||||
return select<u32>(13, m, value < 10000000000000);
|
||||
}
|
||||
} else {
|
||||
if (value < 100000000000000000) {
|
||||
return select<u32>(16, 17, value < 10000000000000000);
|
||||
} else {
|
||||
let m = select<u32>(19, 20, value < 10000000000000000000);
|
||||
return select<u32>(18, m, value < 1000000000000000000);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -217,7 +217,7 @@ tests.forEach(filename => {
|
||||
"--validate",
|
||||
"--measure",
|
||||
"--binaryFile", // -> stdout
|
||||
"-O3"
|
||||
"-O"
|
||||
];
|
||||
if (asc_flags)
|
||||
Array.prototype.push.apply(cmd, asc_flags);
|
||||
|
@ -51,7 +51,12 @@
|
||||
end
|
||||
local.get $0
|
||||
)
|
||||
(func $~lib/array/Array<assert-nonnull/Foo>#__get (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
|
||||
(func $~lib/array/Array<assert-nonnull/Foo>#__unchecked_get (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
|
||||
local.get $0
|
||||
i32.load offset=4
|
||||
i32.load
|
||||
)
|
||||
(func $~lib/array/Array<assert-nonnull/Foo>#__get (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
|
||||
i32.const 0
|
||||
local.get $0
|
||||
i32.load offset=12
|
||||
@ -79,10 +84,9 @@
|
||||
unreachable
|
||||
end
|
||||
local.get $0
|
||||
i32.load offset=4
|
||||
i32.load
|
||||
call $~lib/array/Array<assert-nonnull/Foo>#__unchecked_get
|
||||
)
|
||||
(func $assert-nonnull/testArr (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
|
||||
(func $assert-nonnull/testArr (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
|
||||
local.get $0
|
||||
i32.eqz
|
||||
if
|
||||
@ -91,7 +95,7 @@
|
||||
local.get $0
|
||||
call $~lib/array/Array<assert-nonnull/Foo>#__get
|
||||
)
|
||||
(func $~lib/array/Array<assert-nonnull/Foo | null>#__get (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
|
||||
(func $~lib/array/Array<assert-nonnull/Foo | null>#__get (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
|
||||
i32.const 0
|
||||
local.get $0
|
||||
i32.load offset=8
|
||||
@ -107,14 +111,13 @@
|
||||
unreachable
|
||||
end
|
||||
local.get $0
|
||||
i32.load offset=4
|
||||
i32.load
|
||||
call $~lib/array/Array<assert-nonnull/Foo>#__unchecked_get
|
||||
)
|
||||
(func $assert-nonnull/testElem (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
|
||||
(func $assert-nonnull/testElem (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
|
||||
local.get $0
|
||||
call $~lib/array/Array<assert-nonnull/Foo | null>#__get
|
||||
)
|
||||
(func $assert-nonnull/testAll (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
|
||||
(func $assert-nonnull/testAll (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
|
||||
local.get $0
|
||||
i32.eqz
|
||||
if
|
||||
@ -130,13 +133,13 @@
|
||||
end
|
||||
local.get $0
|
||||
)
|
||||
(func $assert-nonnull/testFn (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
|
||||
(func $assert-nonnull/testFn (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
|
||||
i32.const 0
|
||||
global.set $~lib/argc
|
||||
local.get $0
|
||||
call_indirect (type $FUNCSIG$i)
|
||||
)
|
||||
(func $assert-nonnull/testFn2 (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
|
||||
(func $assert-nonnull/testFn2 (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
|
||||
local.get $0
|
||||
i32.eqz
|
||||
if
|
||||
@ -147,7 +150,7 @@
|
||||
local.get $0
|
||||
call_indirect (type $FUNCSIG$i)
|
||||
)
|
||||
(func $assert-nonnull/testRet (; 11 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
|
||||
(func $assert-nonnull/testRet (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
|
||||
(local $1 i32)
|
||||
i32.const 0
|
||||
global.set $~lib/argc
|
||||
@ -162,14 +165,14 @@
|
||||
end
|
||||
local.get $1
|
||||
)
|
||||
(func $assert-nonnull/testObjFn (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
|
||||
(func $assert-nonnull/testObjFn (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
|
||||
i32.const 0
|
||||
global.set $~lib/argc
|
||||
local.get $0
|
||||
i32.load offset=4
|
||||
call_indirect (type $FUNCSIG$i)
|
||||
)
|
||||
(func $assert-nonnull/testObjRet (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
|
||||
(func $assert-nonnull/testObjRet (; 14 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
|
||||
(local $1 i32)
|
||||
i32.const 0
|
||||
global.set $~lib/argc
|
||||
@ -185,7 +188,7 @@
|
||||
end
|
||||
local.get $1
|
||||
)
|
||||
(func $null (; 14 ;) (type $FUNCSIG$v)
|
||||
(func $null (; 15 ;) (type $FUNCSIG$v)
|
||||
nop
|
||||
)
|
||||
)
|
||||
|
@ -14,43 +14,36 @@
|
||||
(local $1 i32)
|
||||
(local $2 i64)
|
||||
(local $3 i32)
|
||||
(local $4 i32)
|
||||
local.get $0
|
||||
i64.reinterpret_f64
|
||||
local.tee $2
|
||||
i64.const 32
|
||||
i64.shr_u
|
||||
i32.wrap_i64
|
||||
local.set $1
|
||||
i32.const 1
|
||||
i32.const 0
|
||||
i32.const 1
|
||||
i32.const 0
|
||||
i32.const 1
|
||||
local.get $2
|
||||
i64.const 32
|
||||
i64.shr_u
|
||||
i32.wrap_i64
|
||||
local.tee $3
|
||||
i32.const 0
|
||||
i32.ne
|
||||
i32.const 0
|
||||
local.get $1
|
||||
i32.const 2147483647
|
||||
i32.and
|
||||
local.tee $4
|
||||
local.tee $3
|
||||
i32.const 2146435072
|
||||
i32.eq
|
||||
select
|
||||
local.get $3
|
||||
i32.const 2146435072
|
||||
i32.gt_s
|
||||
if (result i32)
|
||||
i32.const 1
|
||||
else
|
||||
local.get $1
|
||||
i32.const 0
|
||||
i32.ne
|
||||
i32.const 0
|
||||
local.get $4
|
||||
i32.const 2146435072
|
||||
i32.eq
|
||||
select
|
||||
end
|
||||
select
|
||||
if (result i32)
|
||||
i32.const 1
|
||||
else
|
||||
i32.const 0
|
||||
end
|
||||
local.tee $1
|
||||
select
|
||||
select
|
||||
if
|
||||
local.get $0
|
||||
f64.const 1
|
||||
@ -205,7 +198,27 @@
|
||||
local.get $0
|
||||
f32.mul
|
||||
)
|
||||
(func $~lib/math/NativeMath.mod (; 2 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64)
|
||||
(func $~lib/math/NativeMathf.pow (; 2 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32)
|
||||
(local $1 i32)
|
||||
i32.const 1
|
||||
i32.const 0
|
||||
local.get $0
|
||||
i32.reinterpret_f32
|
||||
local.tee $1
|
||||
i32.const 2147483647
|
||||
i32.and
|
||||
i32.const 2139095040
|
||||
i32.gt_s
|
||||
select
|
||||
if
|
||||
local.get $0
|
||||
f32.const 1
|
||||
f32.add
|
||||
return
|
||||
end
|
||||
local.get $0
|
||||
)
|
||||
(func $~lib/math/NativeMath.mod (; 3 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64)
|
||||
(local $1 i64)
|
||||
(local $2 i64)
|
||||
(local $3 i64)
|
||||
@ -358,46 +371,40 @@
|
||||
local.get $0
|
||||
f64.mul
|
||||
)
|
||||
(func $start:binary (; 3 ;) (type $FUNCSIG$v)
|
||||
(local $0 i32)
|
||||
(local $1 f32)
|
||||
(local $2 i64)
|
||||
(local $3 f64)
|
||||
(local $4 i32)
|
||||
(func $start:binary (; 4 ;) (type $FUNCSIG$v)
|
||||
global.get $binary/i
|
||||
local.tee $0
|
||||
i32.const 1
|
||||
i32.rem_s
|
||||
drop
|
||||
local.get $0
|
||||
global.get $binary/i
|
||||
f64.convert_i32_s
|
||||
call $~lib/math/NativeMath.pow
|
||||
drop
|
||||
global.get $binary/i
|
||||
local.tee $0
|
||||
i32.const 1
|
||||
i32.lt_s
|
||||
global.set $binary/b
|
||||
local.get $0
|
||||
global.get $binary/i
|
||||
i32.const 1
|
||||
i32.gt_s
|
||||
global.set $binary/b
|
||||
local.get $0
|
||||
global.get $binary/i
|
||||
i32.const 1
|
||||
i32.le_s
|
||||
global.set $binary/b
|
||||
local.get $0
|
||||
global.get $binary/i
|
||||
i32.const 1
|
||||
i32.ge_s
|
||||
global.set $binary/b
|
||||
local.get $0
|
||||
global.get $binary/i
|
||||
i32.const 1
|
||||
i32.eq
|
||||
local.tee $4
|
||||
global.set $binary/b
|
||||
local.get $4
|
||||
global.get $binary/i
|
||||
i32.const 1
|
||||
i32.eq
|
||||
global.set $binary/b
|
||||
local.get $0
|
||||
global.get $binary/i
|
||||
i32.const 1
|
||||
i32.add
|
||||
global.set $binary/i
|
||||
@ -475,39 +482,38 @@
|
||||
i32.xor
|
||||
global.set $binary/i
|
||||
global.get $binary/I
|
||||
local.tee $2
|
||||
i64.const 1
|
||||
i64.rem_s
|
||||
drop
|
||||
local.get $2
|
||||
global.get $binary/I
|
||||
f64.convert_i64_s
|
||||
call $~lib/math/NativeMath.pow
|
||||
drop
|
||||
global.get $binary/I
|
||||
local.tee $2
|
||||
i64.const 1
|
||||
i64.lt_s
|
||||
global.set $binary/b
|
||||
local.get $2
|
||||
global.get $binary/I
|
||||
i64.const 1
|
||||
i64.gt_s
|
||||
global.set $binary/b
|
||||
local.get $2
|
||||
global.get $binary/I
|
||||
i64.const 1
|
||||
i64.le_s
|
||||
global.set $binary/b
|
||||
local.get $2
|
||||
global.get $binary/I
|
||||
i64.const 1
|
||||
i64.ge_s
|
||||
global.set $binary/b
|
||||
local.get $2
|
||||
global.get $binary/I
|
||||
i64.const 1
|
||||
i64.eq
|
||||
local.tee $0
|
||||
global.set $binary/b
|
||||
local.get $0
|
||||
global.get $binary/I
|
||||
i64.const 1
|
||||
i64.eq
|
||||
global.set $binary/b
|
||||
local.get $2
|
||||
global.get $binary/I
|
||||
i64.const 1
|
||||
i64.add
|
||||
global.set $binary/I
|
||||
@ -587,43 +593,34 @@
|
||||
global.get $binary/f
|
||||
call $~lib/math/NativeMathf.mod
|
||||
drop
|
||||
block $__inlined_func$~lib/math/NativeMathf.pow
|
||||
i32.const 1
|
||||
i32.const 0
|
||||
global.get $binary/f
|
||||
i32.reinterpret_f32
|
||||
i32.const 2147483647
|
||||
i32.and
|
||||
i32.const 2139095040
|
||||
i32.gt_s
|
||||
select
|
||||
br_if $__inlined_func$~lib/math/NativeMathf.pow
|
||||
end
|
||||
global.get $binary/f
|
||||
local.tee $1
|
||||
call $~lib/math/NativeMathf.pow
|
||||
drop
|
||||
global.get $binary/f
|
||||
f32.const 1
|
||||
f32.lt
|
||||
global.set $binary/b
|
||||
local.get $1
|
||||
global.get $binary/f
|
||||
f32.const 1
|
||||
f32.gt
|
||||
global.set $binary/b
|
||||
local.get $1
|
||||
global.get $binary/f
|
||||
f32.const 1
|
||||
f32.le
|
||||
global.set $binary/b
|
||||
local.get $1
|
||||
global.get $binary/f
|
||||
f32.const 1
|
||||
f32.ge
|
||||
global.set $binary/b
|
||||
local.get $1
|
||||
global.get $binary/f
|
||||
f32.const 1
|
||||
f32.eq
|
||||
local.tee $0
|
||||
global.set $binary/b
|
||||
local.get $0
|
||||
global.get $binary/f
|
||||
f32.const 1
|
||||
f32.eq
|
||||
global.set $binary/b
|
||||
local.get $1
|
||||
global.get $binary/f
|
||||
f32.const 1
|
||||
f32.add
|
||||
global.set $binary/f
|
||||
@ -634,23 +631,8 @@
|
||||
global.get $binary/f
|
||||
call $~lib/math/NativeMathf.mod
|
||||
global.set $binary/f
|
||||
i32.const 1
|
||||
i32.const 0
|
||||
global.get $binary/f
|
||||
local.tee $1
|
||||
i32.reinterpret_f32
|
||||
i32.const 2147483647
|
||||
i32.and
|
||||
i32.const 2139095040
|
||||
i32.gt_s
|
||||
select
|
||||
if
|
||||
local.get $1
|
||||
f32.const 1
|
||||
f32.add
|
||||
local.set $1
|
||||
end
|
||||
local.get $1
|
||||
call $~lib/math/NativeMathf.pow
|
||||
global.set $binary/f
|
||||
global.get $binary/f
|
||||
f32.const 1
|
||||
@ -663,23 +645,8 @@
|
||||
global.get $binary/f
|
||||
call $~lib/math/NativeMathf.mod
|
||||
global.set $binary/f
|
||||
i32.const 1
|
||||
i32.const 0
|
||||
global.get $binary/f
|
||||
local.tee $1
|
||||
i32.reinterpret_f32
|
||||
i32.const 2147483647
|
||||
i32.and
|
||||
i32.const 2139095040
|
||||
i32.gt_s
|
||||
select
|
||||
if
|
||||
local.get $1
|
||||
f32.const 1
|
||||
f32.add
|
||||
local.set $1
|
||||
end
|
||||
local.get $1
|
||||
call $~lib/math/NativeMathf.pow
|
||||
global.set $binary/f
|
||||
global.get $binary/F
|
||||
call $~lib/math/NativeMath.mod
|
||||
@ -688,30 +655,30 @@
|
||||
call $~lib/math/NativeMath.pow
|
||||
drop
|
||||
global.get $binary/F
|
||||
local.tee $3
|
||||
f64.const 1
|
||||
f64.lt
|
||||
global.set $binary/b
|
||||
local.get $3
|
||||
global.get $binary/F
|
||||
f64.const 1
|
||||
f64.gt
|
||||
global.set $binary/b
|
||||
local.get $3
|
||||
global.get $binary/F
|
||||
f64.const 1
|
||||
f64.le
|
||||
global.set $binary/b
|
||||
local.get $3
|
||||
global.get $binary/F
|
||||
f64.const 1
|
||||
f64.ge
|
||||
global.set $binary/b
|
||||
local.get $3
|
||||
global.get $binary/F
|
||||
f64.const 1
|
||||
f64.eq
|
||||
local.tee $0
|
||||
global.set $binary/b
|
||||
local.get $0
|
||||
global.get $binary/F
|
||||
f64.const 1
|
||||
f64.eq
|
||||
global.set $binary/b
|
||||
local.get $3
|
||||
global.get $binary/F
|
||||
f64.const 1
|
||||
f64.add
|
||||
global.set $binary/F
|
||||
@ -740,10 +707,10 @@
|
||||
call $~lib/math/NativeMath.pow
|
||||
global.set $binary/F
|
||||
)
|
||||
(func $start (; 4 ;) (type $FUNCSIG$v)
|
||||
(func $start (; 5 ;) (type $FUNCSIG$v)
|
||||
call $start:binary
|
||||
)
|
||||
(func $null (; 5 ;) (type $FUNCSIG$v)
|
||||
(func $null (; 6 ;) (type $FUNCSIG$v)
|
||||
nop
|
||||
)
|
||||
)
|
||||
|
@ -1,5 +1,7 @@
|
||||
(module
|
||||
(type $FUNCSIG$viiii (func (param i32 i32 i32 i32)))
|
||||
(type $FUNCSIG$if (func (param f32) (result i32)))
|
||||
(type $FUNCSIG$id (func (param f64) (result i32)))
|
||||
(type $FUNCSIG$vii (func (param i32 i32)))
|
||||
(type $FUNCSIG$v (func))
|
||||
(import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32)))
|
||||
@ -21,10 +23,34 @@
|
||||
(export "memory" (memory $0))
|
||||
(export "test" (func $builtins/test))
|
||||
(start $start)
|
||||
(func $start:builtins~anonymous|0 (; 1 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32)
|
||||
(func $~lib/builtins/isNaN<f32> (; 1 ;) (type $FUNCSIG$if) (param $0 f32) (result i32)
|
||||
local.get $0
|
||||
local.get $0
|
||||
f32.ne
|
||||
)
|
||||
(func $~lib/builtins/isFinite<f32> (; 2 ;) (type $FUNCSIG$if) (param $0 f32) (result i32)
|
||||
local.get $0
|
||||
local.get $0
|
||||
f32.sub
|
||||
f32.const 0
|
||||
f32.eq
|
||||
)
|
||||
(func $~lib/builtins/isNaN<f64> (; 3 ;) (type $FUNCSIG$id) (param $0 f64) (result i32)
|
||||
local.get $0
|
||||
local.get $0
|
||||
f64.ne
|
||||
)
|
||||
(func $~lib/builtins/isFinite<f64> (; 4 ;) (type $FUNCSIG$id) (param $0 f64) (result i32)
|
||||
local.get $0
|
||||
local.get $0
|
||||
f64.sub
|
||||
f64.const 0
|
||||
f64.eq
|
||||
)
|
||||
(func $start:builtins~anonymous|0 (; 5 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32)
|
||||
nop
|
||||
)
|
||||
(func $start:builtins (; 2 ;) (type $FUNCSIG$v)
|
||||
(func $start:builtins (; 6 ;) (type $FUNCSIG$v)
|
||||
i32.const 31
|
||||
global.set $builtins/i
|
||||
i32.const 0
|
||||
@ -123,6 +149,70 @@
|
||||
call $~lib/builtins/abort
|
||||
unreachable
|
||||
end
|
||||
f32.const 1.25
|
||||
call $~lib/builtins/isNaN<f32>
|
||||
if
|
||||
i32.const 0
|
||||
i32.const 24
|
||||
i32.const 104
|
||||
i32.const 0
|
||||
call $~lib/builtins/abort
|
||||
unreachable
|
||||
end
|
||||
f32.const nan:0x400000
|
||||
call $~lib/builtins/isNaN<f32>
|
||||
i32.const 1
|
||||
i32.ne
|
||||
if
|
||||
i32.const 0
|
||||
i32.const 24
|
||||
i32.const 105
|
||||
i32.const 0
|
||||
call $~lib/builtins/abort
|
||||
unreachable
|
||||
end
|
||||
f32.const 1.25
|
||||
call $~lib/builtins/isFinite<f32>
|
||||
i32.const 1
|
||||
i32.ne
|
||||
if
|
||||
i32.const 0
|
||||
i32.const 24
|
||||
i32.const 106
|
||||
i32.const 0
|
||||
call $~lib/builtins/abort
|
||||
unreachable
|
||||
end
|
||||
f32.const inf
|
||||
call $~lib/builtins/isFinite<f32>
|
||||
if
|
||||
i32.const 0
|
||||
i32.const 24
|
||||
i32.const 107
|
||||
i32.const 0
|
||||
call $~lib/builtins/abort
|
||||
unreachable
|
||||
end
|
||||
f32.const -inf
|
||||
call $~lib/builtins/isFinite<f32>
|
||||
if
|
||||
i32.const 0
|
||||
i32.const 24
|
||||
i32.const 108
|
||||
i32.const 0
|
||||
call $~lib/builtins/abort
|
||||
unreachable
|
||||
end
|
||||
f32.const nan:0x400000
|
||||
call $~lib/builtins/isFinite<f32>
|
||||
if
|
||||
i32.const 0
|
||||
i32.const 24
|
||||
i32.const 109
|
||||
i32.const 0
|
||||
call $~lib/builtins/abort
|
||||
unreachable
|
||||
end
|
||||
f32.const nan:0x400000
|
||||
global.set $builtins/f
|
||||
f32.const inf
|
||||
@ -145,10 +235,76 @@
|
||||
global.set $builtins/f
|
||||
f32.const 1
|
||||
global.set $builtins/f
|
||||
i32.const 0
|
||||
f32.const 1.25
|
||||
call $~lib/builtins/isNaN<f32>
|
||||
global.set $builtins/b
|
||||
f32.const 1.25
|
||||
call $~lib/builtins/isFinite<f32>
|
||||
global.set $builtins/b
|
||||
f64.const 1.25
|
||||
call $~lib/builtins/isNaN<f64>
|
||||
if
|
||||
i32.const 0
|
||||
i32.const 24
|
||||
i32.const 140
|
||||
i32.const 0
|
||||
call $~lib/builtins/abort
|
||||
unreachable
|
||||
end
|
||||
f64.const nan:0x8000000000000
|
||||
call $~lib/builtins/isNaN<f64>
|
||||
i32.const 1
|
||||
global.set $builtins/b
|
||||
i32.ne
|
||||
if
|
||||
i32.const 0
|
||||
i32.const 24
|
||||
i32.const 141
|
||||
i32.const 0
|
||||
call $~lib/builtins/abort
|
||||
unreachable
|
||||
end
|
||||
f64.const 1.25
|
||||
call $~lib/builtins/isFinite<f64>
|
||||
i32.const 1
|
||||
i32.ne
|
||||
if
|
||||
i32.const 0
|
||||
i32.const 24
|
||||
i32.const 142
|
||||
i32.const 0
|
||||
call $~lib/builtins/abort
|
||||
unreachable
|
||||
end
|
||||
f64.const inf
|
||||
call $~lib/builtins/isFinite<f64>
|
||||
if
|
||||
i32.const 0
|
||||
i32.const 24
|
||||
i32.const 143
|
||||
i32.const 0
|
||||
call $~lib/builtins/abort
|
||||
unreachable
|
||||
end
|
||||
f64.const -inf
|
||||
call $~lib/builtins/isFinite<f64>
|
||||
if
|
||||
i32.const 0
|
||||
i32.const 24
|
||||
i32.const 144
|
||||
i32.const 0
|
||||
call $~lib/builtins/abort
|
||||
unreachable
|
||||
end
|
||||
f64.const nan:0x8000000000000
|
||||
call $~lib/builtins/isFinite<f64>
|
||||
if
|
||||
i32.const 0
|
||||
i32.const 24
|
||||
i32.const 145
|
||||
i32.const 0
|
||||
call $~lib/builtins/abort
|
||||
unreachable
|
||||
end
|
||||
f64.const nan:0x8000000000000
|
||||
global.set $builtins/F
|
||||
f64.const inf
|
||||
@ -171,9 +327,11 @@
|
||||
global.set $builtins/F
|
||||
f64.const 1
|
||||
global.set $builtins/F
|
||||
i32.const 0
|
||||
f64.const 1.25
|
||||
call $~lib/builtins/isNaN<f64>
|
||||
global.set $builtins/b
|
||||
i32.const 1
|
||||
f64.const 1.25
|
||||
call $~lib/builtins/isFinite<f64>
|
||||
global.set $builtins/b
|
||||
i32.const 8
|
||||
i32.load
|
||||
@ -374,6 +532,90 @@
|
||||
i32.const 2
|
||||
global.get $builtins/fn
|
||||
call_indirect (type $FUNCSIG$vii)
|
||||
f32.const nan:0x400000
|
||||
call $~lib/builtins/isNaN<f32>
|
||||
i32.eqz
|
||||
if
|
||||
i32.const 0
|
||||
i32.const 24
|
||||
i32.const 294
|
||||
i32.const 0
|
||||
call $~lib/builtins/abort
|
||||
unreachable
|
||||
end
|
||||
f64.const nan:0x8000000000000
|
||||
call $~lib/builtins/isNaN<f64>
|
||||
i32.eqz
|
||||
if
|
||||
i32.const 0
|
||||
i32.const 24
|
||||
i32.const 295
|
||||
i32.const 0
|
||||
call $~lib/builtins/abort
|
||||
unreachable
|
||||
end
|
||||
f32.const nan:0x400000
|
||||
call $~lib/builtins/isFinite<f32>
|
||||
if
|
||||
i32.const 0
|
||||
i32.const 24
|
||||
i32.const 296
|
||||
i32.const 0
|
||||
call $~lib/builtins/abort
|
||||
unreachable
|
||||
end
|
||||
f32.const inf
|
||||
call $~lib/builtins/isFinite<f32>
|
||||
if
|
||||
i32.const 0
|
||||
i32.const 24
|
||||
i32.const 297
|
||||
i32.const 0
|
||||
call $~lib/builtins/abort
|
||||
unreachable
|
||||
end
|
||||
f64.const nan:0x8000000000000
|
||||
call $~lib/builtins/isFinite<f64>
|
||||
if
|
||||
i32.const 0
|
||||
i32.const 24
|
||||
i32.const 298
|
||||
i32.const 0
|
||||
call $~lib/builtins/abort
|
||||
unreachable
|
||||
end
|
||||
f64.const inf
|
||||
call $~lib/builtins/isFinite<f64>
|
||||
if
|
||||
i32.const 0
|
||||
i32.const 24
|
||||
i32.const 299
|
||||
i32.const 0
|
||||
call $~lib/builtins/abort
|
||||
unreachable
|
||||
end
|
||||
f32.const 0
|
||||
call $~lib/builtins/isFinite<f32>
|
||||
i32.eqz
|
||||
if
|
||||
i32.const 0
|
||||
i32.const 24
|
||||
i32.const 300
|
||||
i32.const 0
|
||||
call $~lib/builtins/abort
|
||||
unreachable
|
||||
end
|
||||
f64.const 0
|
||||
call $~lib/builtins/isFinite<f64>
|
||||
i32.eqz
|
||||
if
|
||||
i32.const 0
|
||||
i32.const 24
|
||||
i32.const 301
|
||||
i32.const 0
|
||||
call $~lib/builtins/abort
|
||||
unreachable
|
||||
end
|
||||
i32.const 8
|
||||
i32.load8_s
|
||||
drop
|
||||
@ -443,11 +685,14 @@
|
||||
i32.const 8
|
||||
f64.const 1
|
||||
f64.store
|
||||
f64.const 1
|
||||
call $~lib/builtins/isNaN<f64>
|
||||
drop
|
||||
)
|
||||
(func $builtins/test (; 3 ;) (type $FUNCSIG$v)
|
||||
(func $builtins/test (; 7 ;) (type $FUNCSIG$v)
|
||||
nop
|
||||
)
|
||||
(func $start (; 4 ;) (type $FUNCSIG$v)
|
||||
(func $start (; 8 ;) (type $FUNCSIG$v)
|
||||
call $start:builtins
|
||||
)
|
||||
)
|
||||
|
@ -11,7 +11,14 @@
|
||||
(global $call-optional/optIndirect i32 (i32.const 1))
|
||||
(export "memory" (memory $0))
|
||||
(start $start)
|
||||
(func $call-optional/opt|trampoline (; 1 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
|
||||
(func $call-optional/opt (; 1 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
|
||||
local.get $0
|
||||
local.get $1
|
||||
i32.add
|
||||
local.get $2
|
||||
i32.add
|
||||
)
|
||||
(func $call-optional/opt|trampoline (; 2 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
|
||||
block $2of2
|
||||
block $1of2
|
||||
block $0of2
|
||||
@ -31,37 +38,16 @@
|
||||
end
|
||||
local.get $0
|
||||
local.get $1
|
||||
i32.add
|
||||
local.get $2
|
||||
i32.add
|
||||
call $call-optional/opt
|
||||
)
|
||||
(func $start:call-optional (; 2 ;) (type $FUNCSIG$v)
|
||||
(local $0 i32)
|
||||
(local $1 i32)
|
||||
(func $start:call-optional (; 3 ;) (type $FUNCSIG$v)
|
||||
i32.const 1
|
||||
global.set $~lib/argc
|
||||
block $2of2
|
||||
block $1of2
|
||||
block $0of2
|
||||
block $outOfRange
|
||||
global.get $~lib/argc
|
||||
i32.const 1
|
||||
i32.sub
|
||||
br_table $0of2 $1of2 $2of2 $outOfRange
|
||||
end
|
||||
unreachable
|
||||
end
|
||||
i32.const -1
|
||||
local.set $0
|
||||
end
|
||||
i32.const -2
|
||||
local.set $1
|
||||
end
|
||||
local.get $0
|
||||
i32.const 3
|
||||
i32.add
|
||||
local.get $1
|
||||
i32.add
|
||||
i32.const 0
|
||||
i32.const 0
|
||||
call $call-optional/opt|trampoline
|
||||
if
|
||||
i32.const 0
|
||||
i32.const 24
|
||||
@ -72,32 +58,10 @@
|
||||
end
|
||||
i32.const 2
|
||||
global.set $~lib/argc
|
||||
i32.const 4
|
||||
local.set $0
|
||||
i32.const 0
|
||||
local.set $1
|
||||
block $2of21
|
||||
block $1of22
|
||||
block $0of23
|
||||
block $outOfRange4
|
||||
global.get $~lib/argc
|
||||
i32.const 1
|
||||
i32.sub
|
||||
br_table $0of23 $1of22 $2of21 $outOfRange4
|
||||
end
|
||||
unreachable
|
||||
end
|
||||
i32.const -1
|
||||
local.set $0
|
||||
end
|
||||
i32.const -2
|
||||
local.set $1
|
||||
end
|
||||
local.get $0
|
||||
i32.const 3
|
||||
i32.add
|
||||
local.get $1
|
||||
i32.add
|
||||
i32.const 4
|
||||
i32.const 0
|
||||
call $call-optional/opt|trampoline
|
||||
i32.const 5
|
||||
i32.ne
|
||||
if
|
||||
@ -108,6 +72,20 @@
|
||||
call $~lib/builtins/abort
|
||||
unreachable
|
||||
end
|
||||
i32.const 3
|
||||
i32.const 4
|
||||
i32.const 5
|
||||
call $call-optional/opt
|
||||
i32.const 12
|
||||
i32.ne
|
||||
if
|
||||
i32.const 0
|
||||
i32.const 24
|
||||
i32.const 6
|
||||
i32.const 0
|
||||
call $~lib/builtins/abort
|
||||
unreachable
|
||||
end
|
||||
i32.const 1
|
||||
global.set $~lib/argc
|
||||
i32.const 3
|
||||
@ -158,10 +136,10 @@
|
||||
unreachable
|
||||
end
|
||||
)
|
||||
(func $start (; 3 ;) (type $FUNCSIG$v)
|
||||
(func $start (; 4 ;) (type $FUNCSIG$v)
|
||||
call $start:call-optional
|
||||
)
|
||||
(func $null (; 4 ;) (type $FUNCSIG$v)
|
||||
(func $null (; 5 ;) (type $FUNCSIG$v)
|
||||
nop
|
||||
)
|
||||
)
|
||||
|
@ -42,9 +42,8 @@
|
||||
i32.add
|
||||
global.set $comma/a
|
||||
global.get $comma/a
|
||||
local.tee $0
|
||||
global.set $comma/b
|
||||
local.get $0
|
||||
global.get $comma/a
|
||||
i32.const 2
|
||||
i32.ne
|
||||
if
|
||||
@ -75,9 +74,8 @@
|
||||
i32.add
|
||||
global.set $comma/a
|
||||
global.get $comma/a
|
||||
local.tee $0
|
||||
global.set $comma/b
|
||||
local.get $0
|
||||
global.get $comma/a
|
||||
i32.const 1
|
||||
i32.ne
|
||||
if
|
||||
|
@ -158,7 +158,7 @@
|
||||
end
|
||||
local.get $0
|
||||
local.get $1
|
||||
i32.sub
|
||||
call $exports/subOpt
|
||||
)
|
||||
(func $~lib/setargc (; 10 ;) (type $FUNCSIG$vi) (param $0 i32)
|
||||
local.get $0
|
||||
|
@ -30,13 +30,21 @@
|
||||
local.get $1
|
||||
i32.add
|
||||
)
|
||||
(func $start:function-expression~anonymous|4 (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
(func $function-expression/testOmitted (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
|
||||
i32.const 2
|
||||
global.set $~lib/argc
|
||||
i32.const 1
|
||||
i32.const 2
|
||||
local.get $0
|
||||
call_indirect (type $FUNCSIG$iii)
|
||||
)
|
||||
(func $start:function-expression~anonymous|4 (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
local.get $0
|
||||
)
|
||||
(func $start:function-expression~anonymous|5 (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
(func $start:function-expression~anonymous|5 (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
i32.const 42
|
||||
)
|
||||
(func $start:function-expression (; 7 ;) (type $FUNCSIG$v)
|
||||
(func $start:function-expression (; 8 ;) (type $FUNCSIG$v)
|
||||
i32.const 1
|
||||
global.set $~lib/argc
|
||||
i32.const 1
|
||||
@ -85,11 +93,8 @@
|
||||
call $~lib/builtins/abort
|
||||
unreachable
|
||||
end
|
||||
i32.const 2
|
||||
global.set $~lib/argc
|
||||
i32.const 1
|
||||
i32.const 2
|
||||
call $start:function-expression~anonymous|3
|
||||
i32.const 5
|
||||
call $function-expression/testOmitted
|
||||
i32.const 3
|
||||
i32.ne
|
||||
if
|
||||
@ -100,11 +105,8 @@
|
||||
call $~lib/builtins/abort
|
||||
unreachable
|
||||
end
|
||||
i32.const 2
|
||||
global.set $~lib/argc
|
||||
i32.const 1
|
||||
i32.const 2
|
||||
call $start:function-expression~anonymous|4
|
||||
i32.const 6
|
||||
call $function-expression/testOmitted
|
||||
i32.const 1
|
||||
i32.ne
|
||||
if
|
||||
@ -115,11 +117,8 @@
|
||||
call $~lib/builtins/abort
|
||||
unreachable
|
||||
end
|
||||
i32.const 2
|
||||
global.set $~lib/argc
|
||||
i32.const 1
|
||||
i32.const 2
|
||||
call $start:function-expression~anonymous|5
|
||||
i32.const 7
|
||||
call $function-expression/testOmitted
|
||||
i32.const 42
|
||||
i32.ne
|
||||
if
|
||||
@ -176,7 +175,7 @@
|
||||
unreachable
|
||||
end
|
||||
)
|
||||
(func $start (; 8 ;) (type $FUNCSIG$v)
|
||||
(func $start (; 9 ;) (type $FUNCSIG$v)
|
||||
call $start:function-expression
|
||||
)
|
||||
)
|
||||
|
@ -3,6 +3,7 @@
|
||||
(type $FUNCSIG$viiii (func (param i32 i32 i32 i32)))
|
||||
(type $FUNCSIG$jjj (func (param i64 i64) (result i64)))
|
||||
(type $FUNCSIG$ddd (func (param f64 f64) (result f64)))
|
||||
(type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32)))
|
||||
(type $FUNCSIG$v (func))
|
||||
(import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32)))
|
||||
(memory $0 1)
|
||||
@ -29,7 +30,15 @@
|
||||
local.get $1
|
||||
f64.add
|
||||
)
|
||||
(func $start:function-types (; 4 ;) (type $FUNCSIG$v)
|
||||
(func $function-types/doAddWithFn<i32> (; 4 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
|
||||
i32.const 2
|
||||
global.set $~lib/argc
|
||||
local.get $0
|
||||
local.get $1
|
||||
local.get $2
|
||||
call_indirect (type $FUNCSIG$iii)
|
||||
)
|
||||
(func $start:function-types (; 5 ;) (type $FUNCSIG$v)
|
||||
(local $0 i32)
|
||||
i32.const 1
|
||||
global.set $function-types/i32Adder
|
||||
@ -83,11 +92,9 @@
|
||||
unreachable
|
||||
end
|
||||
i32.const 2
|
||||
global.set $~lib/argc
|
||||
i32.const 2
|
||||
i32.const 3
|
||||
global.get $function-types/i32Adder
|
||||
call_indirect (type $FUNCSIG$iii)
|
||||
call $function-types/doAddWithFn<i32>
|
||||
i32.const 5
|
||||
i32.ne
|
||||
if
|
||||
@ -113,11 +120,10 @@
|
||||
call $~lib/builtins/abort
|
||||
unreachable
|
||||
end
|
||||
i32.const 2
|
||||
global.set $~lib/argc
|
||||
i32.const 4
|
||||
i32.const 5
|
||||
call $function-types/makeAdder<i32>~anonymous|0
|
||||
i32.const 4
|
||||
call $function-types/doAddWithFn<i32>
|
||||
i32.const 9
|
||||
i32.ne
|
||||
if
|
||||
@ -143,12 +149,10 @@
|
||||
i32.const 1
|
||||
local.set $0
|
||||
end
|
||||
i32.const 2
|
||||
global.set $~lib/argc
|
||||
i32.const 1
|
||||
i32.const 2
|
||||
local.get $0
|
||||
call_indirect (type $FUNCSIG$iii)
|
||||
call $function-types/doAddWithFn<i32>
|
||||
i32.const 3
|
||||
i32.ne
|
||||
if
|
||||
@ -159,11 +163,10 @@
|
||||
call $~lib/builtins/abort
|
||||
unreachable
|
||||
end
|
||||
i32.const 2
|
||||
global.set $~lib/argc
|
||||
i32.const 1
|
||||
i32.const 2
|
||||
call $function-types/makeAdder<i32>~anonymous|0
|
||||
i32.const 1
|
||||
call $function-types/doAddWithFn<i32>
|
||||
i32.const 3
|
||||
i32.ne
|
||||
if
|
||||
@ -175,10 +178,10 @@
|
||||
unreachable
|
||||
end
|
||||
)
|
||||
(func $start (; 5 ;) (type $FUNCSIG$v)
|
||||
(func $start (; 6 ;) (type $FUNCSIG$v)
|
||||
call $start:function-types
|
||||
)
|
||||
(func $null (; 6 ;) (type $FUNCSIG$v)
|
||||
(func $null (; 7 ;) (type $FUNCSIG$v)
|
||||
nop
|
||||
)
|
||||
)
|
||||
|
@ -11,6 +11,7 @@
|
||||
(export "ifThen" (func $if/ifThen))
|
||||
(export "ifThenElseBlock" (func $if/ifThenElse))
|
||||
(export "ifAlwaysReturns" (func $if/ifAlwaysReturns))
|
||||
(start $start)
|
||||
(func $if/ifThenElse (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
|
||||
i32.const 1
|
||||
i32.const 0
|
||||
@ -25,7 +26,75 @@
|
||||
end
|
||||
i32.const 0
|
||||
)
|
||||
(func $if/ifAlwaysReturns (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
|
||||
(func $start:if (; 3 ;) (type $FUNCSIG$v)
|
||||
i32.const 0
|
||||
call $if/ifThenElse
|
||||
if
|
||||
i32.const 0
|
||||
i32.const 24
|
||||
i32.const 8
|
||||
i32.const 0
|
||||
call $~lib/builtins/abort
|
||||
unreachable
|
||||
end
|
||||
i32.const 1
|
||||
call $if/ifThenElse
|
||||
i32.const 1
|
||||
i32.ne
|
||||
if
|
||||
i32.const 0
|
||||
i32.const 24
|
||||
i32.const 9
|
||||
i32.const 0
|
||||
call $~lib/builtins/abort
|
||||
unreachable
|
||||
end
|
||||
i32.const 0
|
||||
call $if/ifThen
|
||||
if
|
||||
i32.const 0
|
||||
i32.const 24
|
||||
i32.const 17
|
||||
i32.const 0
|
||||
call $~lib/builtins/abort
|
||||
unreachable
|
||||
end
|
||||
i32.const 1
|
||||
call $if/ifThen
|
||||
i32.const 1
|
||||
i32.ne
|
||||
if
|
||||
i32.const 0
|
||||
i32.const 24
|
||||
i32.const 18
|
||||
i32.const 0
|
||||
call $~lib/builtins/abort
|
||||
unreachable
|
||||
end
|
||||
i32.const 0
|
||||
call $if/ifThenElse
|
||||
if
|
||||
i32.const 0
|
||||
i32.const 24
|
||||
i32.const 30
|
||||
i32.const 0
|
||||
call $~lib/builtins/abort
|
||||
unreachable
|
||||
end
|
||||
i32.const 1
|
||||
call $if/ifThenElse
|
||||
i32.const 1
|
||||
i32.ne
|
||||
if
|
||||
i32.const 0
|
||||
i32.const 24
|
||||
i32.const 31
|
||||
i32.const 0
|
||||
call $~lib/builtins/abort
|
||||
unreachable
|
||||
end
|
||||
)
|
||||
(func $if/ifAlwaysReturns (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
|
||||
local.get $0
|
||||
if (result i32)
|
||||
i32.const 1
|
||||
@ -38,7 +107,10 @@
|
||||
unreachable
|
||||
end
|
||||
)
|
||||
(func $start (; 4 ;) (type $FUNCSIG$v)
|
||||
(func $start (; 5 ;) (type $FUNCSIG$v)
|
||||
call $start:if
|
||||
)
|
||||
(func $null (; 6 ;) (type $FUNCSIG$v)
|
||||
nop
|
||||
)
|
||||
)
|
||||
|
@ -161,8 +161,8 @@
|
||||
i32.sub
|
||||
local.get $5
|
||||
i32.add
|
||||
local.tee $1
|
||||
f64.convert_i32_s
|
||||
local.tee $0
|
||||
f64.const 1.9082149292705877e-10
|
||||
f64.mul
|
||||
f64.add
|
||||
@ -170,7 +170,8 @@
|
||||
f64.sub
|
||||
local.get $3
|
||||
f64.add
|
||||
local.get $0
|
||||
local.get $1
|
||||
f64.convert_i32_s
|
||||
f64.const 0.6931471803691238
|
||||
f64.mul
|
||||
f64.add
|
||||
@ -375,9 +376,9 @@
|
||||
(func $../../examples/mandelbrot/assembly/index/computeLine (; 2 ;) (type $FUNCSIG$viiii) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32)
|
||||
(local $4 f64)
|
||||
(local $5 f64)
|
||||
(local $6 f64)
|
||||
(local $6 i32)
|
||||
(local $7 i32)
|
||||
(local $8 i32)
|
||||
(local $8 f64)
|
||||
(local $9 f64)
|
||||
(local $10 f64)
|
||||
(local $11 f64)
|
||||
@ -385,36 +386,34 @@
|
||||
(local $13 f64)
|
||||
(local $14 f64)
|
||||
(local $15 f64)
|
||||
local.get $1
|
||||
f64.convert_i32_u
|
||||
local.tee $9
|
||||
f64.const 0.625
|
||||
f64.mul
|
||||
local.set $4
|
||||
local.get $0
|
||||
f64.convert_i32_u
|
||||
local.get $2
|
||||
f64.convert_i32_u
|
||||
local.tee $6
|
||||
f64.const 0.5
|
||||
f64.mul
|
||||
f64.sub
|
||||
f64.const 10
|
||||
f64.const 3
|
||||
local.get $9
|
||||
local.get $1
|
||||
f64.convert_i32_u
|
||||
f64.mul
|
||||
f64.const 4
|
||||
local.get $6
|
||||
local.get $2
|
||||
f64.convert_i32_u
|
||||
f64.mul
|
||||
f64.min
|
||||
f64.div
|
||||
local.tee $10
|
||||
local.tee $9
|
||||
f64.mul
|
||||
local.set $11
|
||||
local.get $4
|
||||
local.get $10
|
||||
local.set $10
|
||||
local.get $1
|
||||
f64.convert_i32_u
|
||||
f64.const 0.625
|
||||
f64.mul
|
||||
local.set $13
|
||||
local.get $9
|
||||
f64.mul
|
||||
local.set $12
|
||||
local.get $0
|
||||
local.get $1
|
||||
i32.mul
|
||||
@ -424,41 +423,41 @@
|
||||
f64.const 1
|
||||
local.get $3
|
||||
f64.convert_i32_u
|
||||
local.tee $6
|
||||
f64.div
|
||||
local.set $14
|
||||
local.set $13
|
||||
f64.const 8
|
||||
local.get $6
|
||||
local.get $3
|
||||
f64.convert_i32_u
|
||||
f64.min
|
||||
local.set $15
|
||||
local.set $14
|
||||
loop $repeat|0
|
||||
block $break|0
|
||||
local.get $8
|
||||
local.get $7
|
||||
local.get $1
|
||||
i32.ge_u
|
||||
br_if $break|0
|
||||
local.get $8
|
||||
local.get $7
|
||||
f64.convert_i32_u
|
||||
local.get $10
|
||||
local.get $9
|
||||
f64.mul
|
||||
local.get $13
|
||||
local.get $12
|
||||
f64.sub
|
||||
local.set $12
|
||||
local.set $11
|
||||
f64.const 0
|
||||
local.set $4
|
||||
f64.const 0
|
||||
local.set $5
|
||||
i32.const 0
|
||||
local.set $7
|
||||
local.set $6
|
||||
loop $continue|1
|
||||
local.get $4
|
||||
local.get $4
|
||||
f64.mul
|
||||
local.tee $9
|
||||
local.tee $15
|
||||
local.get $5
|
||||
local.get $5
|
||||
f64.mul
|
||||
local.tee $6
|
||||
local.tee $8
|
||||
f64.add
|
||||
f64.const 4
|
||||
f64.le
|
||||
@ -469,31 +468,31 @@
|
||||
f64.mul
|
||||
local.get $5
|
||||
f64.mul
|
||||
local.get $11
|
||||
local.get $10
|
||||
f64.add
|
||||
local.set $5
|
||||
local.get $9
|
||||
local.get $6
|
||||
local.get $15
|
||||
local.get $8
|
||||
f64.sub
|
||||
local.get $12
|
||||
local.get $11
|
||||
f64.add
|
||||
local.set $4
|
||||
local.get $7
|
||||
local.get $6
|
||||
local.get $3
|
||||
i32.ge_u
|
||||
br_if $break|1
|
||||
local.get $7
|
||||
local.get $6
|
||||
i32.const 1
|
||||
i32.add
|
||||
local.set $7
|
||||
local.set $6
|
||||
br $continue|1
|
||||
end
|
||||
end
|
||||
end
|
||||
loop $continue|2
|
||||
local.get $7
|
||||
local.get $6
|
||||
f64.convert_i32_u
|
||||
local.get $15
|
||||
local.get $14
|
||||
f64.lt
|
||||
if
|
||||
local.get $4
|
||||
@ -503,29 +502,29 @@
|
||||
local.get $5
|
||||
f64.mul
|
||||
f64.sub
|
||||
local.get $12
|
||||
local.get $11
|
||||
f64.add
|
||||
local.set $6
|
||||
local.set $8
|
||||
f64.const 2
|
||||
local.get $4
|
||||
f64.mul
|
||||
local.get $5
|
||||
f64.mul
|
||||
local.get $11
|
||||
local.get $10
|
||||
f64.add
|
||||
local.set $5
|
||||
local.get $6
|
||||
local.get $8
|
||||
local.set $4
|
||||
local.get $7
|
||||
local.get $6
|
||||
i32.const 1
|
||||
i32.add
|
||||
local.set $7
|
||||
local.set $6
|
||||
br $continue|2
|
||||
end
|
||||
end
|
||||
i32.const 2047
|
||||
local.set $2
|
||||
local.get $8
|
||||
local.get $7
|
||||
i32.const 1
|
||||
i32.shl
|
||||
local.get $0
|
||||
@ -537,22 +536,22 @@
|
||||
local.get $5
|
||||
f64.mul
|
||||
f64.add
|
||||
local.tee $6
|
||||
local.tee $8
|
||||
f64.const 1
|
||||
f64.gt
|
||||
if (result i32)
|
||||
f64.const 2047
|
||||
local.get $7
|
||||
local.get $6
|
||||
i32.const 1
|
||||
i32.add
|
||||
f64.convert_i32_u
|
||||
f64.const 0.5
|
||||
local.get $6
|
||||
local.get $8
|
||||
call $~lib/math/NativeMath.log
|
||||
f64.mul
|
||||
call $~lib/math/NativeMath.log2
|
||||
f64.sub
|
||||
local.get $14
|
||||
local.get $13
|
||||
f64.mul
|
||||
f64.const 0
|
||||
f64.max
|
||||
@ -564,10 +563,10 @@
|
||||
i32.const 2047
|
||||
end
|
||||
i32.store16
|
||||
local.get $8
|
||||
local.get $7
|
||||
i32.const 1
|
||||
i32.add
|
||||
local.set $8
|
||||
local.set $7
|
||||
br $repeat|0
|
||||
end
|
||||
end
|
||||
|
@ -1,22 +1,39 @@
|
||||
(module
|
||||
(type $FUNCSIG$ii (func (param i32) (result i32)))
|
||||
(type $FUNCSIG$viiii (func (param i32 i32 i32 i32)))
|
||||
(type $FUNCSIG$v (func))
|
||||
(import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32)))
|
||||
(memory $0 1)
|
||||
(data (i32.const 8) "\1c\00\00\00\01\00\00\00\01\00\00\00\1c\00\00\00m\00a\00n\00y\00-\00l\00o\00c\00a\00l\00s\00.\00t\00s")
|
||||
(export "memory" (memory $0))
|
||||
(export "testI32" (func $many-locals/testI32))
|
||||
(export "testI8" (func $many-locals/testI8))
|
||||
(func $many-locals/testI32 (; 0 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
|
||||
(start $start)
|
||||
(func $many-locals/testI32 (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
|
||||
local.get $0
|
||||
)
|
||||
(func $many-locals/testI8 (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
|
||||
(func $many-locals/testI8 (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
|
||||
local.get $0
|
||||
i32.const 24
|
||||
i32.shl
|
||||
i32.const 24
|
||||
i32.shr_s
|
||||
)
|
||||
(func $start (; 2 ;) (type $FUNCSIG$v)
|
||||
(func $start (; 3 ;) (type $FUNCSIG$v)
|
||||
i32.const 42
|
||||
call $many-locals/testI8
|
||||
i32.const 42
|
||||
i32.ne
|
||||
if
|
||||
i32.const 0
|
||||
i32.const 24
|
||||
i32.const 267
|
||||
i32.const 0
|
||||
call $~lib/builtins/abort
|
||||
unreachable
|
||||
end
|
||||
)
|
||||
(func $null (; 4 ;) (type $FUNCSIG$v)
|
||||
nop
|
||||
)
|
||||
)
|
||||
|
@ -191,8 +191,8 @@
|
||||
local.set $2
|
||||
local.get $1
|
||||
i64.extend_i32_u
|
||||
local.tee $4
|
||||
local.get $4
|
||||
local.get $1
|
||||
i64.extend_i32_u
|
||||
i64.const 32
|
||||
i64.shl
|
||||
i64.or
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -41,9 +41,9 @@
|
||||
(table $0 1 funcref)
|
||||
(elem (i32.const 0) $null)
|
||||
(global $number/a (mut i32) (i32.const 1))
|
||||
(global $~lib/ASC_SHRINK_LEVEL i32 (i32.const 0))
|
||||
(global $~lib/rt/stub/startOffset (mut i32) (i32.const 0))
|
||||
(global $~lib/rt/stub/offset (mut i32) (i32.const 0))
|
||||
(global $~lib/ASC_SHRINK_LEVEL i32 (i32.const 0))
|
||||
(global $~lib/util/number/_frc_plus (mut i64) (i64.const 0))
|
||||
(global $~lib/util/number/_frc_minus (mut i64) (i64.const 0))
|
||||
(global $~lib/util/number/_exp (mut i32) (i32.const 0))
|
||||
|
@ -17,6 +17,7 @@
|
||||
(export "renamed_add" (func $export/add))
|
||||
(export "rerenamed_sub" (func $export/mul))
|
||||
(export "renamed_ns.two" (func $export/ns.one))
|
||||
(start $start)
|
||||
(func $export/add (; 0 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
local.get $0
|
||||
local.get $1
|
||||
@ -35,4 +36,14 @@
|
||||
(func $export/ns.one (; 3 ;) (type $FUNCSIG$v)
|
||||
nop
|
||||
)
|
||||
(func $start (; 4 ;) (type $FUNCSIG$v)
|
||||
i32.const 1
|
||||
i32.const 2
|
||||
call $export/add
|
||||
i32.const 3
|
||||
i32.const 4
|
||||
call $export/mul
|
||||
i32.add
|
||||
drop
|
||||
)
|
||||
)
|
||||
|
@ -2037,44 +2037,42 @@
|
||||
i32.const 584
|
||||
call $~lib/rt/pure/__release
|
||||
)
|
||||
(func $~lib/string/String#concat (; 33 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
(func $~lib/string/String#get:length (; 33 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
|
||||
local.get $0
|
||||
i32.const 16
|
||||
i32.sub
|
||||
i32.load offset=12
|
||||
i32.const 1
|
||||
i32.shr_u
|
||||
)
|
||||
(func $~lib/string/String#concat (; 34 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
(local $2 i32)
|
||||
(local $3 i32)
|
||||
(local $4 i32)
|
||||
local.get $1
|
||||
call $~lib/rt/pure/__retain
|
||||
drop
|
||||
block (result i32)
|
||||
local.get $1
|
||||
i32.eqz
|
||||
if
|
||||
local.get $1
|
||||
i32.eqz
|
||||
if
|
||||
local.get $1
|
||||
i32.const 648
|
||||
call $~lib/rt/pure/__retainRelease
|
||||
local.set $1
|
||||
end
|
||||
local.get $1
|
||||
i32.const 16
|
||||
i32.sub
|
||||
i32.load offset=12
|
||||
i32.const 1
|
||||
i32.shr_u
|
||||
i32.const 1
|
||||
i32.shl
|
||||
local.tee $4
|
||||
local.get $0
|
||||
i32.const 16
|
||||
i32.sub
|
||||
i32.load offset=12
|
||||
i32.const 1
|
||||
i32.shr_u
|
||||
i32.const 1
|
||||
i32.shl
|
||||
local.tee $3
|
||||
i32.add
|
||||
local.tee $2
|
||||
i32.eqz
|
||||
i32.const 648
|
||||
call $~lib/rt/pure/__retainRelease
|
||||
local.set $1
|
||||
end
|
||||
local.get $0
|
||||
call $~lib/string/String#get:length
|
||||
i32.const 1
|
||||
i32.shl
|
||||
local.tee $3
|
||||
local.get $1
|
||||
call $~lib/string/String#get:length
|
||||
i32.const 1
|
||||
i32.shl
|
||||
local.tee $4
|
||||
i32.add
|
||||
local.tee $2
|
||||
i32.eqz
|
||||
if
|
||||
i32.const 584
|
||||
call $~lib/rt/pure/__retain
|
||||
@ -2102,7 +2100,7 @@
|
||||
call $~lib/rt/pure/__release
|
||||
local.get $2
|
||||
)
|
||||
(func $~lib/string/String.__concat (; 34 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
(func $~lib/string/String.__concat (; 35 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
(local $2 i32)
|
||||
local.get $0
|
||||
call $~lib/rt/pure/__retain
|
||||
@ -2123,7 +2121,7 @@
|
||||
call $~lib/rt/pure/__release
|
||||
local.get $2
|
||||
)
|
||||
(func $~lib/rt/pure/markGray (; 35 ;) (type $FUNCSIG$vi) (param $0 i32)
|
||||
(func $~lib/rt/pure/markGray (; 36 ;) (type $FUNCSIG$vi) (param $0 i32)
|
||||
(local $1 i32)
|
||||
local.get $0
|
||||
i32.load offset=4
|
||||
@ -2147,7 +2145,7 @@
|
||||
call $~lib/rt/__visit_members
|
||||
end
|
||||
)
|
||||
(func $~lib/rt/pure/scanBlack (; 36 ;) (type $FUNCSIG$vi) (param $0 i32)
|
||||
(func $~lib/rt/pure/scanBlack (; 37 ;) (type $FUNCSIG$vi) (param $0 i32)
|
||||
local.get $0
|
||||
local.get $0
|
||||
i32.load offset=4
|
||||
@ -2160,7 +2158,7 @@
|
||||
i32.const 4
|
||||
call $~lib/rt/__visit_members
|
||||
)
|
||||
(func $~lib/rt/pure/scan (; 37 ;) (type $FUNCSIG$vi) (param $0 i32)
|
||||
(func $~lib/rt/pure/scan (; 38 ;) (type $FUNCSIG$vi) (param $0 i32)
|
||||
(local $1 i32)
|
||||
local.get $0
|
||||
i32.load offset=4
|
||||
@ -2194,7 +2192,7 @@
|
||||
end
|
||||
end
|
||||
)
|
||||
(func $~lib/rt/pure/collectWhite (; 38 ;) (type $FUNCSIG$vi) (param $0 i32)
|
||||
(func $~lib/rt/pure/collectWhite (; 39 ;) (type $FUNCSIG$vi) (param $0 i32)
|
||||
(local $1 i32)
|
||||
local.get $0
|
||||
i32.load offset=4
|
||||
@ -2222,7 +2220,7 @@
|
||||
local.get $0
|
||||
call $~lib/rt/tlsf/freeBlock
|
||||
)
|
||||
(func $~lib/rt/pure/__collect (; 39 ;) (type $FUNCSIG$v)
|
||||
(func $~lib/rt/pure/__collect (; 40 ;) (type $FUNCSIG$v)
|
||||
(local $0 i32)
|
||||
(local $1 i32)
|
||||
(local $2 i32)
|
||||
@ -2346,7 +2344,7 @@
|
||||
local.get $5
|
||||
global.set $~lib/rt/pure/CUR
|
||||
)
|
||||
(func $start:retain-release-sanity (; 40 ;) (type $FUNCSIG$v)
|
||||
(func $start:retain-release-sanity (; 41 ;) (type $FUNCSIG$v)
|
||||
(local $0 i32)
|
||||
(local $1 i32)
|
||||
(local $2 i32)
|
||||
@ -2434,7 +2432,7 @@
|
||||
call $~lib/rt/pure/__release
|
||||
call $~lib/rt/pure/__collect
|
||||
)
|
||||
(func $retain-release-sanity/main (; 41 ;) (type $FUNCSIG$v)
|
||||
(func $retain-release-sanity/main (; 42 ;) (type $FUNCSIG$v)
|
||||
global.get $~lib/started
|
||||
i32.eqz
|
||||
if
|
||||
@ -2443,7 +2441,7 @@
|
||||
global.set $~lib/started
|
||||
end
|
||||
)
|
||||
(func $~lib/rt/pure/__visit (; 42 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32)
|
||||
(func $~lib/rt/pure/__visit (; 43 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32)
|
||||
local.get $0
|
||||
i32.const 724
|
||||
i32.lt_u
|
||||
@ -2553,7 +2551,7 @@
|
||||
unreachable
|
||||
end
|
||||
)
|
||||
(func $~lib/array/Array<~lib/string/String>#__visit_impl (; 43 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32)
|
||||
(func $~lib/array/Array<~lib/string/String>#__visit_impl (; 44 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32)
|
||||
(local $2 i32)
|
||||
(local $3 i32)
|
||||
local.get $0
|
||||
@ -2584,7 +2582,7 @@
|
||||
end
|
||||
end
|
||||
)
|
||||
(func $~lib/rt/__visit_members (; 44 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32)
|
||||
(func $~lib/rt/__visit_members (; 45 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32)
|
||||
block $block$4$break
|
||||
block $switch$1$default
|
||||
block $switch$1$case$6
|
||||
@ -2613,7 +2611,7 @@
|
||||
call $~lib/rt/pure/__visit
|
||||
end
|
||||
)
|
||||
(func $null (; 45 ;) (type $FUNCSIG$v)
|
||||
(func $null (; 46 ;) (type $FUNCSIG$v)
|
||||
nop
|
||||
)
|
||||
)
|
||||
|
@ -80,17 +80,21 @@
|
||||
call $~lib/array/Array<~lib/array/Array<i32>>#__get
|
||||
call $~lib/array/Array<i32>#__get
|
||||
)
|
||||
(func $std/array-access/stringArrayPropertyAccess (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
|
||||
(func $~lib/string/String#get:length (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
|
||||
local.get $0
|
||||
i32.const 0
|
||||
call $~lib/array/Array<~lib/array/Array<i32>>#__get
|
||||
i32.const 16
|
||||
i32.sub
|
||||
i32.load offset=12
|
||||
i32.const 1
|
||||
i32.shr_u
|
||||
)
|
||||
(func $~lib/util/string/compareImpl (; 5 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
|
||||
(func $std/array-access/stringArrayPropertyAccess (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
|
||||
local.get $0
|
||||
i32.const 0
|
||||
call $~lib/array/Array<~lib/array/Array<i32>>#__get
|
||||
call $~lib/string/String#get:length
|
||||
)
|
||||
(func $~lib/util/string/compareImpl (; 6 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
|
||||
(local $3 i32)
|
||||
(local $4 i32)
|
||||
i32.const 240
|
||||
@ -132,7 +136,7 @@
|
||||
end
|
||||
local.get $4
|
||||
)
|
||||
(func $~lib/string/String#startsWith (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
|
||||
(func $~lib/string/String#startsWith (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
|
||||
(local $1 i32)
|
||||
(local $2 i32)
|
||||
(local $3 i32)
|
||||
@ -146,25 +150,17 @@
|
||||
call $~lib/builtins/abort
|
||||
unreachable
|
||||
end
|
||||
i32.const 236
|
||||
i32.load
|
||||
i32.const 1
|
||||
i32.shr_u
|
||||
local.tee $1
|
||||
local.set $2
|
||||
local.get $1
|
||||
i32.const 0
|
||||
local.get $0
|
||||
i32.const 16
|
||||
i32.sub
|
||||
i32.load offset=12
|
||||
i32.const 1
|
||||
i32.shr_u
|
||||
call $~lib/string/String#get:length
|
||||
local.tee $1
|
||||
i32.const 0
|
||||
local.get $1
|
||||
i32.lt_s
|
||||
select
|
||||
local.tee $2
|
||||
i32.const 240
|
||||
call $~lib/string/String#get:length
|
||||
local.tee $3
|
||||
i32.add
|
||||
local.get $1
|
||||
@ -174,30 +170,26 @@
|
||||
return
|
||||
end
|
||||
local.get $0
|
||||
local.get $3
|
||||
local.get $2
|
||||
local.get $3
|
||||
call $~lib/util/string/compareImpl
|
||||
i32.eqz
|
||||
)
|
||||
(func $std/array-access/stringArrayMethodCall (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
|
||||
(func $std/array-access/stringArrayMethodCall (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
|
||||
local.get $0
|
||||
i32.const 0
|
||||
call $~lib/array/Array<~lib/array/Array<i32>>#__get
|
||||
call $~lib/string/String#startsWith
|
||||
)
|
||||
(func $std/array-access/stringArrayArrayPropertyAccess (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
|
||||
(func $std/array-access/stringArrayArrayPropertyAccess (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
|
||||
local.get $0
|
||||
i32.const 0
|
||||
call $~lib/array/Array<~lib/array/Array<i32>>#__get
|
||||
i32.const 1
|
||||
call $~lib/array/Array<~lib/array/Array<i32>>#__get
|
||||
i32.const 16
|
||||
i32.sub
|
||||
i32.load offset=12
|
||||
i32.const 1
|
||||
i32.shr_u
|
||||
call $~lib/string/String#get:length
|
||||
)
|
||||
(func $std/array-access/stringArrayArrayMethodCall (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
|
||||
(func $std/array-access/stringArrayArrayMethodCall (; 10 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
|
||||
local.get $0
|
||||
i32.const 0
|
||||
call $~lib/array/Array<~lib/array/Array<i32>>#__get
|
||||
@ -205,7 +197,7 @@
|
||||
call $~lib/array/Array<~lib/array/Array<i32>>#__get
|
||||
call $~lib/string/String#startsWith
|
||||
)
|
||||
(func $null (; 10 ;) (type $FUNCSIG$v)
|
||||
(func $null (; 11 ;) (type $FUNCSIG$v)
|
||||
nop
|
||||
)
|
||||
)
|
||||
|
@ -1660,28 +1660,26 @@
|
||||
i32.const 0
|
||||
i32.const 3
|
||||
call $~lib/rt/__allocArray
|
||||
local.tee $2
|
||||
local.tee $1
|
||||
i32.load offset=4
|
||||
local.tee $0
|
||||
global.get $std/array-literal/i
|
||||
local.tee $1
|
||||
i32.store8
|
||||
local.get $1
|
||||
global.get $std/array-literal/i
|
||||
i32.const 1
|
||||
i32.add
|
||||
global.set $std/array-literal/i
|
||||
local.get $0
|
||||
global.get $std/array-literal/i
|
||||
local.tee $1
|
||||
i32.store8 offset=1
|
||||
local.get $1
|
||||
global.get $std/array-literal/i
|
||||
i32.const 1
|
||||
i32.add
|
||||
global.set $std/array-literal/i
|
||||
local.get $0
|
||||
global.get $std/array-literal/i
|
||||
i32.store8 offset=2
|
||||
local.get $2
|
||||
local.get $1
|
||||
call $~lib/rt/pure/__retain
|
||||
global.set $std/array-literal/dynamicArrayI8
|
||||
global.get $std/array-literal/dynamicArrayI8
|
||||
@ -1738,28 +1736,26 @@
|
||||
i32.const 2
|
||||
i32.const 4
|
||||
call $~lib/rt/__allocArray
|
||||
local.tee $2
|
||||
local.tee $1
|
||||
i32.load offset=4
|
||||
local.tee $0
|
||||
global.get $std/array-literal/i
|
||||
local.tee $1
|
||||
i32.store
|
||||
local.get $1
|
||||
global.get $std/array-literal/i
|
||||
i32.const 1
|
||||
i32.add
|
||||
global.set $std/array-literal/i
|
||||
local.get $0
|
||||
global.get $std/array-literal/i
|
||||
local.tee $1
|
||||
i32.store offset=4
|
||||
local.get $1
|
||||
global.get $std/array-literal/i
|
||||
i32.const 1
|
||||
i32.add
|
||||
global.set $std/array-literal/i
|
||||
local.get $0
|
||||
global.get $std/array-literal/i
|
||||
i32.store offset=8
|
||||
local.get $2
|
||||
local.get $1
|
||||
call $~lib/rt/pure/__retain
|
||||
global.set $std/array-literal/dynamicArrayI32
|
||||
global.get $std/array-literal/dynamicArrayI32
|
||||
@ -1814,11 +1810,11 @@
|
||||
i32.const 2
|
||||
i32.const 6
|
||||
call $~lib/rt/__allocArray
|
||||
local.tee $2
|
||||
local.tee $1
|
||||
i32.load offset=4
|
||||
local.tee $0
|
||||
call $std/array-literal/Ref#constructor
|
||||
local.tee $1
|
||||
local.tee $2
|
||||
call $~lib/rt/pure/__retain
|
||||
i32.store
|
||||
local.get $0
|
||||
@ -1831,7 +1827,7 @@
|
||||
local.tee $4
|
||||
call $~lib/rt/pure/__retain
|
||||
i32.store offset=8
|
||||
local.get $2
|
||||
local.get $1
|
||||
call $~lib/rt/pure/__retain
|
||||
global.set $std/array-literal/dynamicArrayRef
|
||||
global.get $std/array-literal/dynamicArrayRef
|
||||
@ -1849,7 +1845,7 @@
|
||||
i32.const 2
|
||||
i32.const 8
|
||||
call $~lib/rt/__allocArray
|
||||
local.tee $2
|
||||
local.tee $1
|
||||
i32.load offset=4
|
||||
local.tee $0
|
||||
call $std/array-literal/RefWithCtor#constructor
|
||||
@ -1866,7 +1862,7 @@
|
||||
local.tee $0
|
||||
call $~lib/rt/pure/__retain
|
||||
i32.store offset=8
|
||||
local.get $2
|
||||
local.get $1
|
||||
call $~lib/rt/pure/__retain
|
||||
global.set $std/array-literal/dynamicArrayRefWithCtor
|
||||
global.get $std/array-literal/dynamicArrayRefWithCtor
|
||||
@ -1891,7 +1887,7 @@
|
||||
call $~lib/rt/pure/__release
|
||||
global.get $std/array-literal/dynamicArrayRefWithCtor
|
||||
call $~lib/rt/pure/__release
|
||||
local.get $1
|
||||
local.get $2
|
||||
call $~lib/rt/pure/__release
|
||||
local.get $3
|
||||
call $~lib/rt/pure/__release
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -2,11 +2,11 @@
|
||||
(type $FUNCSIG$iii (func (param i32 i32) (result i32)))
|
||||
(type $FUNCSIG$viiii (func (param i32 i32 i32 i32)))
|
||||
(type $FUNCSIG$viii (func (param i32 i32 i32)))
|
||||
(type $FUNCSIG$ii (func (param i32) (result i32)))
|
||||
(type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32)))
|
||||
(type $FUNCSIG$v (func))
|
||||
(type $FUNCSIG$vi (func (param i32)))
|
||||
(type $FUNCSIG$i (func (result i32)))
|
||||
(type $FUNCSIG$ii (func (param i32) (result i32)))
|
||||
(import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32)))
|
||||
(memory $0 1)
|
||||
(data (i32.const 8) "\1c\00\00\00\01\00\00\00\01\00\00\00\1c\00\00\00I\00n\00v\00a\00l\00i\00d\00 \00l\00e\00n\00g\00t\00h")
|
||||
@ -140,7 +140,13 @@
|
||||
i32.const 0
|
||||
i32.store8
|
||||
)
|
||||
(func $~lib/memory/memory.copy (; 3 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32)
|
||||
(func $~lib/arraybuffer/ArrayBuffer#get:byteLength (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
|
||||
local.get $0
|
||||
i32.const 16
|
||||
i32.sub
|
||||
i32.load offset=12
|
||||
)
|
||||
(func $~lib/memory/memory.copy (; 4 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32)
|
||||
(local $3 i32)
|
||||
(local $4 i32)
|
||||
block $~lib/util/memory/memmove|inlined.0
|
||||
@ -313,12 +319,10 @@
|
||||
end
|
||||
end
|
||||
)
|
||||
(func $~lib/arraybuffer/ArrayBuffer#slice (; 4 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
|
||||
(func $~lib/arraybuffer/ArrayBuffer#slice (; 5 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
|
||||
(local $3 i32)
|
||||
local.get $0
|
||||
i32.const 16
|
||||
i32.sub
|
||||
i32.load offset=12
|
||||
call $~lib/arraybuffer/ArrayBuffer#get:byteLength
|
||||
local.set $3
|
||||
local.get $1
|
||||
i32.const 0
|
||||
@ -382,7 +386,15 @@
|
||||
call $~lib/memory/memory.copy
|
||||
local.get $3
|
||||
)
|
||||
(func $~lib/arraybuffer/ArrayBufferView#constructor (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
(func $~lib/arraybuffer/ArrayBuffer.isView<~lib/typedarray/Uint8Array> (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
|
||||
local.get $0
|
||||
if
|
||||
i32.const 1
|
||||
return
|
||||
end
|
||||
i32.const 0
|
||||
)
|
||||
(func $~lib/arraybuffer/ArrayBufferView#constructor (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
(local $2 i32)
|
||||
i32.const 1
|
||||
i32.const 1073741808
|
||||
@ -435,7 +447,7 @@
|
||||
i32.store offset=8
|
||||
local.get $0
|
||||
)
|
||||
(func $~lib/rt/__allocArray (; 6 ;) (type $FUNCSIG$i) (result i32)
|
||||
(func $~lib/rt/__allocArray (; 8 ;) (type $FUNCSIG$i) (result i32)
|
||||
(local $0 i32)
|
||||
(local $1 i32)
|
||||
i32.const 16
|
||||
@ -462,16 +474,14 @@
|
||||
call $~lib/memory/memory.copy
|
||||
local.get $0
|
||||
)
|
||||
(func $~lib/dataview/DataView#constructor (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
(func $~lib/dataview/DataView#constructor (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
(local $2 i32)
|
||||
local.get $1
|
||||
i32.const 1073741808
|
||||
i32.gt_u
|
||||
local.get $1
|
||||
local.get $0
|
||||
i32.const 16
|
||||
i32.sub
|
||||
i32.load offset=12
|
||||
call $~lib/arraybuffer/ArrayBuffer#get:byteLength
|
||||
i32.gt_u
|
||||
i32.or
|
||||
if
|
||||
@ -508,30 +518,9 @@
|
||||
i32.store offset=8
|
||||
local.get $2
|
||||
)
|
||||
(func $~lib/dataview/DataView#constructor|trampoline (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
|
||||
(local $1 i32)
|
||||
block $2of2
|
||||
block $1of2
|
||||
block $outOfRange
|
||||
global.get $~lib/argc
|
||||
i32.const 1
|
||||
i32.sub
|
||||
br_table $1of2 $1of2 $2of2 $outOfRange
|
||||
end
|
||||
unreachable
|
||||
end
|
||||
local.get $0
|
||||
i32.const 16
|
||||
i32.sub
|
||||
i32.load offset=12
|
||||
local.set $1
|
||||
end
|
||||
local.get $0
|
||||
local.get $1
|
||||
call $~lib/dataview/DataView#constructor
|
||||
)
|
||||
(func $start:std/arraybuffer (; 9 ;) (type $FUNCSIG$v)
|
||||
(func $start:std/arraybuffer (; 10 ;) (type $FUNCSIG$v)
|
||||
(local $0 i32)
|
||||
(local $1 i32)
|
||||
i32.const 240
|
||||
global.set $~lib/rt/stub/startOffset
|
||||
global.get $~lib/rt/stub/startOffset
|
||||
@ -544,9 +533,7 @@
|
||||
local.get $0
|
||||
global.set $std/arraybuffer/buffer
|
||||
global.get $std/arraybuffer/buffer
|
||||
i32.const 16
|
||||
i32.sub
|
||||
i32.load offset=12
|
||||
call $~lib/arraybuffer/ArrayBuffer#get:byteLength
|
||||
i32.const 8
|
||||
i32.ne
|
||||
if
|
||||
@ -563,9 +550,7 @@
|
||||
call $~lib/arraybuffer/ArrayBuffer#slice
|
||||
global.set $std/arraybuffer/sliced
|
||||
global.get $std/arraybuffer/sliced
|
||||
i32.const 16
|
||||
i32.sub
|
||||
i32.load offset=12
|
||||
call $~lib/arraybuffer/ArrayBuffer#get:byteLength
|
||||
i32.const 8
|
||||
i32.ne
|
||||
if
|
||||
@ -593,9 +578,7 @@
|
||||
call $~lib/arraybuffer/ArrayBuffer#slice
|
||||
global.set $std/arraybuffer/sliced
|
||||
global.get $std/arraybuffer/sliced
|
||||
i32.const 16
|
||||
i32.sub
|
||||
i32.load offset=12
|
||||
call $~lib/arraybuffer/ArrayBuffer#get:byteLength
|
||||
i32.const 7
|
||||
i32.ne
|
||||
if
|
||||
@ -612,9 +595,7 @@
|
||||
call $~lib/arraybuffer/ArrayBuffer#slice
|
||||
global.set $std/arraybuffer/sliced
|
||||
global.get $std/arraybuffer/sliced
|
||||
i32.const 16
|
||||
i32.sub
|
||||
i32.load offset=12
|
||||
call $~lib/arraybuffer/ArrayBuffer#get:byteLength
|
||||
i32.const 1
|
||||
i32.ne
|
||||
if
|
||||
@ -631,9 +612,7 @@
|
||||
call $~lib/arraybuffer/ArrayBuffer#slice
|
||||
global.set $std/arraybuffer/sliced
|
||||
global.get $std/arraybuffer/sliced
|
||||
i32.const 16
|
||||
i32.sub
|
||||
i32.load offset=12
|
||||
call $~lib/arraybuffer/ArrayBuffer#get:byteLength
|
||||
i32.const 2
|
||||
i32.ne
|
||||
if
|
||||
@ -650,9 +629,7 @@
|
||||
call $~lib/arraybuffer/ArrayBuffer#slice
|
||||
global.set $std/arraybuffer/sliced
|
||||
global.get $std/arraybuffer/sliced
|
||||
i32.const 16
|
||||
i32.sub
|
||||
i32.load offset=12
|
||||
call $~lib/arraybuffer/ArrayBuffer#get:byteLength
|
||||
i32.const 6
|
||||
i32.ne
|
||||
if
|
||||
@ -669,9 +646,7 @@
|
||||
call $~lib/arraybuffer/ArrayBuffer#slice
|
||||
global.set $std/arraybuffer/sliced
|
||||
global.get $std/arraybuffer/sliced
|
||||
i32.const 16
|
||||
i32.sub
|
||||
i32.load offset=12
|
||||
call $~lib/arraybuffer/ArrayBuffer#get:byteLength
|
||||
i32.const 2
|
||||
i32.ne
|
||||
if
|
||||
@ -688,9 +663,7 @@
|
||||
call $~lib/arraybuffer/ArrayBuffer#slice
|
||||
global.set $std/arraybuffer/sliced
|
||||
global.get $std/arraybuffer/sliced
|
||||
i32.const 16
|
||||
i32.sub
|
||||
i32.load offset=12
|
||||
call $~lib/arraybuffer/ArrayBuffer#get:byteLength
|
||||
i32.const 4
|
||||
i32.ne
|
||||
if
|
||||
@ -707,9 +680,7 @@
|
||||
call $~lib/arraybuffer/ArrayBuffer#slice
|
||||
global.set $std/arraybuffer/sliced
|
||||
global.get $std/arraybuffer/sliced
|
||||
i32.const 16
|
||||
i32.sub
|
||||
i32.load offset=12
|
||||
call $~lib/arraybuffer/ArrayBuffer#get:byteLength
|
||||
if
|
||||
i32.const 0
|
||||
i32.const 128
|
||||
@ -728,6 +699,36 @@
|
||||
call $~lib/builtins/abort
|
||||
unreachable
|
||||
end
|
||||
i32.const 0
|
||||
call $~lib/arraybuffer/ArrayBuffer.isView<~lib/typedarray/Uint8Array>
|
||||
if
|
||||
i32.const 0
|
||||
i32.const 128
|
||||
i32.const 41
|
||||
i32.const 0
|
||||
call $~lib/builtins/abort
|
||||
unreachable
|
||||
end
|
||||
i32.const 0
|
||||
call $~lib/arraybuffer/ArrayBuffer.isView<~lib/typedarray/Uint8Array>
|
||||
if
|
||||
i32.const 0
|
||||
i32.const 128
|
||||
i32.const 42
|
||||
i32.const 0
|
||||
call $~lib/builtins/abort
|
||||
unreachable
|
||||
end
|
||||
i32.const 0
|
||||
call $~lib/arraybuffer/ArrayBuffer.isView<~lib/typedarray/Uint8Array>
|
||||
if
|
||||
i32.const 0
|
||||
i32.const 128
|
||||
i32.const 43
|
||||
i32.const 0
|
||||
call $~lib/builtins/abort
|
||||
unreachable
|
||||
end
|
||||
i32.const 12
|
||||
i32.const 5
|
||||
call $~lib/rt/stub/__alloc
|
||||
@ -737,11 +738,7 @@
|
||||
call $~lib/rt/__allocArray
|
||||
drop
|
||||
global.get $std/arraybuffer/arr8
|
||||
if (result i32)
|
||||
i32.const 1
|
||||
else
|
||||
i32.const 0
|
||||
end
|
||||
call $~lib/arraybuffer/ArrayBuffer.isView<~lib/typedarray/Uint8Array>
|
||||
i32.eqz
|
||||
if
|
||||
i32.const 0
|
||||
@ -751,17 +748,12 @@
|
||||
call $~lib/builtins/abort
|
||||
unreachable
|
||||
end
|
||||
block $__inlined_func$~lib/arraybuffer/ArrayBuffer.isView<~lib/typedarray/Int32Array>2 (result i32)
|
||||
i32.const 1
|
||||
i32.const 12
|
||||
i32.const 9
|
||||
call $~lib/rt/stub/__alloc
|
||||
i32.const 2
|
||||
call $~lib/arraybuffer/ArrayBufferView#constructor
|
||||
br_if $__inlined_func$~lib/arraybuffer/ArrayBuffer.isView<~lib/typedarray/Int32Array>2
|
||||
drop
|
||||
i32.const 0
|
||||
end
|
||||
i32.const 12
|
||||
i32.const 9
|
||||
call $~lib/rt/stub/__alloc
|
||||
i32.const 2
|
||||
call $~lib/arraybuffer/ArrayBufferView#constructor
|
||||
call $~lib/arraybuffer/ArrayBuffer.isView<~lib/typedarray/Uint8Array>
|
||||
i32.eqz
|
||||
if
|
||||
i32.const 0
|
||||
@ -773,15 +765,27 @@
|
||||
end
|
||||
i32.const 1
|
||||
global.set $~lib/argc
|
||||
block $__inlined_func$~lib/arraybuffer/ArrayBuffer.isView<~lib/dataview/DataView>3 (result i32)
|
||||
i32.const 1
|
||||
global.get $std/arraybuffer/arr8
|
||||
i32.load
|
||||
call $~lib/dataview/DataView#constructor|trampoline
|
||||
br_if $__inlined_func$~lib/arraybuffer/ArrayBuffer.isView<~lib/dataview/DataView>3
|
||||
drop
|
||||
i32.const 0
|
||||
global.get $std/arraybuffer/arr8
|
||||
i32.load
|
||||
local.set $0
|
||||
block $2of2
|
||||
block $1of2
|
||||
block $outOfRange
|
||||
global.get $~lib/argc
|
||||
i32.const 1
|
||||
i32.sub
|
||||
br_table $1of2 $1of2 $2of2 $outOfRange
|
||||
end
|
||||
unreachable
|
||||
end
|
||||
local.get $0
|
||||
call $~lib/arraybuffer/ArrayBuffer#get:byteLength
|
||||
local.set $1
|
||||
end
|
||||
local.get $0
|
||||
local.get $1
|
||||
call $~lib/dataview/DataView#constructor
|
||||
call $~lib/arraybuffer/ArrayBuffer.isView<~lib/typedarray/Uint8Array>
|
||||
i32.eqz
|
||||
if
|
||||
i32.const 0
|
||||
@ -792,10 +796,10 @@
|
||||
unreachable
|
||||
end
|
||||
)
|
||||
(func $start (; 10 ;) (type $FUNCSIG$v)
|
||||
(func $start (; 11 ;) (type $FUNCSIG$v)
|
||||
call $start:std/arraybuffer
|
||||
)
|
||||
(func $null (; 11 ;) (type $FUNCSIG$v)
|
||||
(func $null (; 12 ;) (type $FUNCSIG$v)
|
||||
nop
|
||||
)
|
||||
)
|
||||
|
@ -2,11 +2,11 @@
|
||||
(type $FUNCSIG$iii (func (param i32 i32) (result i32)))
|
||||
(type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32)))
|
||||
(type $FUNCSIG$viiii (func (param i32 i32 i32 i32)))
|
||||
(type $FUNCSIG$ii (func (param i32) (result i32)))
|
||||
(type $FUNCSIG$viii (func (param i32 i32 i32)))
|
||||
(type $FUNCSIG$fiii (func (param i32 i32 i32) (result f32)))
|
||||
(type $FUNCSIG$jj (func (param i64) (result i64)))
|
||||
(type $FUNCSIG$v (func))
|
||||
(type $FUNCSIG$ii (func (param i32) (result i32)))
|
||||
(type $FUNCSIG$dii (func (param i32 i32) (result f64)))
|
||||
(type $FUNCSIG$jii (func (param i32 i32) (result i64)))
|
||||
(type $FUNCSIG$vifi (func (param i32 f32 i32)))
|
||||
@ -159,7 +159,13 @@
|
||||
local.get $2
|
||||
i32.store8
|
||||
)
|
||||
(func $~lib/dataview/DataView#constructor (; 4 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
|
||||
(func $~lib/arraybuffer/ArrayBuffer#get:byteLength (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
|
||||
local.get $0
|
||||
i32.const 16
|
||||
i32.sub
|
||||
i32.load offset=12
|
||||
)
|
||||
(func $~lib/dataview/DataView#constructor (; 5 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
|
||||
(local $3 i32)
|
||||
local.get $2
|
||||
i32.const 1073741808
|
||||
@ -168,9 +174,7 @@
|
||||
local.get $2
|
||||
i32.add
|
||||
local.get $0
|
||||
i32.const 16
|
||||
i32.sub
|
||||
i32.load offset=12
|
||||
call $~lib/arraybuffer/ArrayBuffer#get:byteLength
|
||||
i32.gt_u
|
||||
i32.or
|
||||
if
|
||||
@ -209,7 +213,27 @@
|
||||
i32.store offset=8
|
||||
local.get $3
|
||||
)
|
||||
(func $~lib/dataview/DataView#getFloat32 (; 5 ;) (type $FUNCSIG$fiii) (param $0 i32) (param $1 i32) (param $2 i32) (result f32)
|
||||
(func $~lib/arraybuffer/ArrayBufferView#get:byteOffset (; 6 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
|
||||
local.get $0
|
||||
i32.load offset=4
|
||||
local.get $0
|
||||
i32.load
|
||||
i32.sub
|
||||
)
|
||||
(func $~lib/polyfills/bswap<u32> (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
|
||||
local.get $0
|
||||
i32.const -16711936
|
||||
i32.and
|
||||
i32.const 8
|
||||
i32.rotl
|
||||
local.get $0
|
||||
i32.const 16711935
|
||||
i32.and
|
||||
i32.const 8
|
||||
i32.rotr
|
||||
i32.or
|
||||
)
|
||||
(func $~lib/dataview/DataView#getFloat32 (; 8 ;) (type $FUNCSIG$fiii) (param $0 i32) (param $1 i32) (param $2 i32) (result f32)
|
||||
local.get $1
|
||||
i32.const 0
|
||||
i32.lt_s
|
||||
@ -241,21 +265,11 @@
|
||||
local.get $1
|
||||
i32.add
|
||||
i32.load
|
||||
local.tee $0
|
||||
i32.const -16711936
|
||||
i32.and
|
||||
i32.const 8
|
||||
i32.rotl
|
||||
local.get $0
|
||||
i32.const 16711935
|
||||
i32.and
|
||||
i32.const 8
|
||||
i32.rotr
|
||||
i32.or
|
||||
call $~lib/polyfills/bswap<u32>
|
||||
f32.reinterpret_i32
|
||||
end
|
||||
)
|
||||
(func $~lib/polyfills/bswap<u64> (; 6 ;) (type $FUNCSIG$jj) (param $0 i64) (result i64)
|
||||
(func $~lib/polyfills/bswap<u64> (; 9 ;) (type $FUNCSIG$jj) (param $0 i64) (result i64)
|
||||
local.get $0
|
||||
i64.const 8
|
||||
i64.shr_u
|
||||
@ -281,7 +295,7 @@
|
||||
i64.const 32
|
||||
i64.rotr
|
||||
)
|
||||
(func $~lib/dataview/DataView#getFloat64 (; 7 ;) (type $FUNCSIG$dii) (param $0 i32) (param $1 i32) (result f64)
|
||||
(func $~lib/dataview/DataView#getFloat64 (; 10 ;) (type $FUNCSIG$dii) (param $0 i32) (param $1 i32) (result f64)
|
||||
i32.const 8
|
||||
local.get $0
|
||||
i32.load offset=8
|
||||
@ -307,7 +321,7 @@
|
||||
f64.reinterpret_i64
|
||||
end
|
||||
)
|
||||
(func $~lib/dataview/DataView#getInt8 (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
(func $~lib/dataview/DataView#getInt8 (; 11 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
local.get $1
|
||||
local.get $0
|
||||
i32.load offset=8
|
||||
@ -326,7 +340,20 @@
|
||||
i32.add
|
||||
i32.load8_s
|
||||
)
|
||||
(func $~lib/dataview/DataView#getInt16 (; 9 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
|
||||
(func $~lib/polyfills/bswap<i16> (; 12 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
|
||||
local.get $0
|
||||
i32.const 16
|
||||
i32.shl
|
||||
i32.const 24
|
||||
i32.shr_s
|
||||
i32.const 255
|
||||
i32.and
|
||||
local.get $0
|
||||
i32.const 8
|
||||
i32.shl
|
||||
i32.or
|
||||
)
|
||||
(func $~lib/dataview/DataView#getInt16 (; 13 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
|
||||
local.get $1
|
||||
i32.const 0
|
||||
i32.lt_s
|
||||
@ -352,23 +379,15 @@
|
||||
i32.load16_s
|
||||
local.set $0
|
||||
local.get $2
|
||||
if (result i32)
|
||||
i32.eqz
|
||||
if
|
||||
local.get $0
|
||||
else
|
||||
local.get $0
|
||||
i32.const 16
|
||||
i32.shl
|
||||
i32.const 24
|
||||
i32.shr_s
|
||||
i32.const 255
|
||||
i32.and
|
||||
local.get $0
|
||||
i32.const 8
|
||||
i32.shl
|
||||
i32.or
|
||||
call $~lib/polyfills/bswap<i16>
|
||||
local.set $0
|
||||
end
|
||||
local.get $0
|
||||
)
|
||||
(func $~lib/dataview/DataView#getInt32 (; 10 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
|
||||
(func $~lib/dataview/DataView#getInt32 (; 14 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
|
||||
local.get $1
|
||||
i32.const 0
|
||||
i32.lt_s
|
||||
@ -394,23 +413,15 @@
|
||||
i32.load
|
||||
local.set $0
|
||||
local.get $2
|
||||
if (result i32)
|
||||
i32.eqz
|
||||
if
|
||||
local.get $0
|
||||
else
|
||||
local.get $0
|
||||
i32.const -16711936
|
||||
i32.and
|
||||
i32.const 8
|
||||
i32.rotl
|
||||
local.get $0
|
||||
i32.const 16711935
|
||||
i32.and
|
||||
i32.const 8
|
||||
i32.rotr
|
||||
i32.or
|
||||
call $~lib/polyfills/bswap<u32>
|
||||
local.set $0
|
||||
end
|
||||
local.get $0
|
||||
)
|
||||
(func $~lib/dataview/DataView#getInt64 (; 11 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64)
|
||||
(func $~lib/dataview/DataView#getInt64 (; 15 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64)
|
||||
(local $2 i64)
|
||||
i32.const 8
|
||||
local.get $0
|
||||
@ -436,7 +447,7 @@
|
||||
call $~lib/polyfills/bswap<u64>
|
||||
end
|
||||
)
|
||||
(func $~lib/dataview/DataView#getUint8 (; 12 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
(func $~lib/dataview/DataView#getUint8 (; 16 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
local.get $1
|
||||
local.get $0
|
||||
i32.load offset=8
|
||||
@ -455,7 +466,18 @@
|
||||
i32.add
|
||||
i32.load8_u
|
||||
)
|
||||
(func $~lib/dataview/DataView#getUint16 (; 13 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
|
||||
(func $~lib/polyfills/bswap<u16> (; 17 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
|
||||
local.get $0
|
||||
i32.const 8
|
||||
i32.shl
|
||||
local.get $0
|
||||
i32.const 65535
|
||||
i32.and
|
||||
i32.const 8
|
||||
i32.shr_u
|
||||
i32.or
|
||||
)
|
||||
(func $~lib/dataview/DataView#getUint16 (; 18 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
|
||||
local.get $1
|
||||
i32.const 0
|
||||
i32.lt_s
|
||||
@ -481,21 +503,15 @@
|
||||
i32.load16_u
|
||||
local.set $0
|
||||
local.get $2
|
||||
if (result i32)
|
||||
i32.eqz
|
||||
if
|
||||
local.get $0
|
||||
else
|
||||
local.get $0
|
||||
i32.const 8
|
||||
i32.shl
|
||||
local.get $0
|
||||
i32.const 65535
|
||||
i32.and
|
||||
i32.const 8
|
||||
i32.shr_u
|
||||
i32.or
|
||||
call $~lib/polyfills/bswap<u16>
|
||||
local.set $0
|
||||
end
|
||||
local.get $0
|
||||
)
|
||||
(func $~lib/dataview/DataView#getUint32 (; 14 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
|
||||
(func $~lib/dataview/DataView#getUint32 (; 19 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
|
||||
local.get $1
|
||||
i32.const 0
|
||||
i32.lt_s
|
||||
@ -521,23 +537,15 @@
|
||||
i32.load
|
||||
local.set $0
|
||||
local.get $2
|
||||
if (result i32)
|
||||
i32.eqz
|
||||
if
|
||||
local.get $0
|
||||
else
|
||||
local.get $0
|
||||
i32.const -16711936
|
||||
i32.and
|
||||
i32.const 8
|
||||
i32.rotl
|
||||
local.get $0
|
||||
i32.const 16711935
|
||||
i32.and
|
||||
i32.const 8
|
||||
i32.rotr
|
||||
i32.or
|
||||
call $~lib/polyfills/bswap<u32>
|
||||
local.set $0
|
||||
end
|
||||
local.get $0
|
||||
)
|
||||
(func $~lib/dataview/DataView#getUint64 (; 15 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64)
|
||||
(func $~lib/dataview/DataView#getUint64 (; 20 ;) (type $FUNCSIG$jii) (param $0 i32) (param $1 i32) (result i64)
|
||||
(local $2 i64)
|
||||
i32.const 8
|
||||
local.get $0
|
||||
@ -563,7 +571,7 @@
|
||||
call $~lib/polyfills/bswap<u64>
|
||||
end
|
||||
)
|
||||
(func $~lib/dataview/DataView#setFloat32 (; 16 ;) (type $FUNCSIG$vifi) (param $0 i32) (param $1 f32) (param $2 i32)
|
||||
(func $~lib/dataview/DataView#setFloat32 (; 21 ;) (type $FUNCSIG$vifi) (param $0 i32) (param $1 f32) (param $2 i32)
|
||||
i32.const 4
|
||||
local.get $0
|
||||
i32.load offset=8
|
||||
@ -587,21 +595,11 @@
|
||||
i32.load offset=4
|
||||
local.get $1
|
||||
i32.reinterpret_f32
|
||||
local.tee $0
|
||||
i32.const -16711936
|
||||
i32.and
|
||||
i32.const 8
|
||||
i32.rotl
|
||||
local.get $0
|
||||
i32.const 16711935
|
||||
i32.and
|
||||
i32.const 8
|
||||
i32.rotr
|
||||
i32.or
|
||||
call $~lib/polyfills/bswap<u32>
|
||||
i32.store
|
||||
end
|
||||
)
|
||||
(func $~lib/dataview/DataView#setFloat64 (; 17 ;) (type $FUNCSIG$vidi) (param $0 i32) (param $1 f64) (param $2 i32)
|
||||
(func $~lib/dataview/DataView#setFloat64 (; 22 ;) (type $FUNCSIG$vidi) (param $0 i32) (param $1 f64) (param $2 i32)
|
||||
i32.const 8
|
||||
local.get $0
|
||||
i32.load offset=8
|
||||
@ -629,7 +627,7 @@
|
||||
i64.store
|
||||
end
|
||||
)
|
||||
(func $~lib/dataview/DataView#setInt8 (; 18 ;) (type $FUNCSIG$vi) (param $0 i32)
|
||||
(func $~lib/dataview/DataView#setInt8 (; 23 ;) (type $FUNCSIG$vi) (param $0 i32)
|
||||
i32.const 0
|
||||
local.get $0
|
||||
i32.load offset=8
|
||||
@ -647,7 +645,7 @@
|
||||
i32.const 108
|
||||
i32.store8
|
||||
)
|
||||
(func $~lib/dataview/DataView#setInt16 (; 19 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32)
|
||||
(func $~lib/dataview/DataView#setInt16 (; 24 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32)
|
||||
i32.const 2
|
||||
local.get $0
|
||||
i32.load offset=8
|
||||
@ -662,28 +660,16 @@
|
||||
end
|
||||
local.get $0
|
||||
i32.load offset=4
|
||||
local.set $0
|
||||
local.get $2
|
||||
i32.eqz
|
||||
if
|
||||
if (result i32)
|
||||
local.get $1
|
||||
i32.const 16
|
||||
i32.shl
|
||||
i32.const 24
|
||||
i32.shr_s
|
||||
i32.const 255
|
||||
i32.and
|
||||
else
|
||||
local.get $1
|
||||
i32.const 8
|
||||
i32.shl
|
||||
i32.or
|
||||
local.set $1
|
||||
call $~lib/polyfills/bswap<i16>
|
||||
end
|
||||
local.get $0
|
||||
local.get $1
|
||||
i32.store16
|
||||
)
|
||||
(func $~lib/dataview/DataView#setInt32 (; 20 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32)
|
||||
(func $~lib/dataview/DataView#setInt32 (; 25 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32)
|
||||
i32.const 4
|
||||
local.get $0
|
||||
i32.load offset=8
|
||||
@ -698,28 +684,16 @@
|
||||
end
|
||||
local.get $0
|
||||
i32.load offset=4
|
||||
local.set $0
|
||||
local.get $2
|
||||
i32.eqz
|
||||
if
|
||||
if (result i32)
|
||||
local.get $1
|
||||
i32.const -16711936
|
||||
i32.and
|
||||
i32.const 8
|
||||
i32.rotl
|
||||
else
|
||||
local.get $1
|
||||
i32.const 16711935
|
||||
i32.and
|
||||
i32.const 8
|
||||
i32.rotr
|
||||
i32.or
|
||||
local.set $1
|
||||
call $~lib/polyfills/bswap<u32>
|
||||
end
|
||||
local.get $0
|
||||
local.get $1
|
||||
i32.store
|
||||
)
|
||||
(func $~lib/dataview/DataView#setInt64 (; 21 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32)
|
||||
(func $~lib/dataview/DataView#setInt64 (; 26 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32)
|
||||
i32.const 8
|
||||
local.get $0
|
||||
i32.load offset=8
|
||||
@ -743,7 +717,7 @@
|
||||
end
|
||||
i64.store
|
||||
)
|
||||
(func $~lib/dataview/DataView#setUint8 (; 22 ;) (type $FUNCSIG$vi) (param $0 i32)
|
||||
(func $~lib/dataview/DataView#setUint8 (; 27 ;) (type $FUNCSIG$vi) (param $0 i32)
|
||||
i32.const 0
|
||||
local.get $0
|
||||
i32.load offset=8
|
||||
@ -761,7 +735,7 @@
|
||||
i32.const 238
|
||||
i32.store8
|
||||
)
|
||||
(func $~lib/dataview/DataView#setUint16 (; 23 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32)
|
||||
(func $~lib/dataview/DataView#setUint16 (; 28 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32)
|
||||
i32.const 2
|
||||
local.get $0
|
||||
i32.load offset=8
|
||||
@ -776,26 +750,16 @@
|
||||
end
|
||||
local.get $0
|
||||
i32.load offset=4
|
||||
local.set $0
|
||||
local.get $2
|
||||
i32.eqz
|
||||
if
|
||||
if (result i32)
|
||||
local.get $1
|
||||
i32.const 8
|
||||
i32.shl
|
||||
else
|
||||
local.get $1
|
||||
i32.const 65535
|
||||
i32.and
|
||||
i32.const 8
|
||||
i32.shr_u
|
||||
i32.or
|
||||
local.set $1
|
||||
call $~lib/polyfills/bswap<u16>
|
||||
end
|
||||
local.get $0
|
||||
local.get $1
|
||||
i32.store16
|
||||
)
|
||||
(func $~lib/dataview/DataView#setUint32 (; 24 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32)
|
||||
(func $~lib/dataview/DataView#setUint32 (; 29 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32)
|
||||
i32.const 4
|
||||
local.get $0
|
||||
i32.load offset=8
|
||||
@ -810,28 +774,16 @@
|
||||
end
|
||||
local.get $0
|
||||
i32.load offset=4
|
||||
local.set $0
|
||||
local.get $2
|
||||
i32.eqz
|
||||
if
|
||||
if (result i32)
|
||||
local.get $1
|
||||
i32.const -16711936
|
||||
i32.and
|
||||
i32.const 8
|
||||
i32.rotl
|
||||
else
|
||||
local.get $1
|
||||
i32.const 16711935
|
||||
i32.and
|
||||
i32.const 8
|
||||
i32.rotr
|
||||
i32.or
|
||||
local.set $1
|
||||
call $~lib/polyfills/bswap<u32>
|
||||
end
|
||||
local.get $0
|
||||
local.get $1
|
||||
i32.store
|
||||
)
|
||||
(func $~lib/dataview/DataView#setUint64 (; 25 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32)
|
||||
(func $~lib/dataview/DataView#setUint64 (; 30 ;) (type $FUNCSIG$viji) (param $0 i32) (param $1 i64) (param $2 i32)
|
||||
i32.const 8
|
||||
local.get $0
|
||||
i32.load offset=8
|
||||
@ -855,7 +807,7 @@
|
||||
end
|
||||
i64.store
|
||||
)
|
||||
(func $~lib/dataview/DataView#constructor|trampoline (; 26 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
|
||||
(func $~lib/dataview/DataView#constructor|trampoline (; 31 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
|
||||
(local $1 i32)
|
||||
block $2of2
|
||||
block $1of2
|
||||
@ -868,9 +820,7 @@
|
||||
unreachable
|
||||
end
|
||||
local.get $0
|
||||
i32.const 16
|
||||
i32.sub
|
||||
i32.load offset=12
|
||||
call $~lib/arraybuffer/ArrayBuffer#get:byteLength
|
||||
local.set $1
|
||||
end
|
||||
local.get $0
|
||||
@ -878,8 +828,7 @@
|
||||
local.get $1
|
||||
call $~lib/dataview/DataView#constructor
|
||||
)
|
||||
(func $start:std/dataview (; 27 ;) (type $FUNCSIG$v)
|
||||
(local $0 i32)
|
||||
(func $start:std/dataview (; 32 ;) (type $FUNCSIG$v)
|
||||
i32.const 320
|
||||
global.set $~lib/rt/stub/startOffset
|
||||
global.get $~lib/rt/stub/startOffset
|
||||
@ -924,12 +873,8 @@
|
||||
global.get $std/dataview/array
|
||||
i32.load
|
||||
global.get $std/dataview/array
|
||||
local.tee $0
|
||||
i32.load offset=4
|
||||
local.get $0
|
||||
i32.load
|
||||
i32.sub
|
||||
local.get $0
|
||||
call $~lib/arraybuffer/ArrayBufferView#get:byteOffset
|
||||
global.get $std/dataview/array
|
||||
i32.load offset=8
|
||||
call $~lib/dataview/DataView#constructor
|
||||
global.set $std/dataview/view
|
||||
@ -2414,11 +2359,7 @@
|
||||
call $~lib/dataview/DataView#constructor|trampoline
|
||||
global.set $std/dataview/view
|
||||
global.get $std/dataview/view
|
||||
local.tee $0
|
||||
i32.load offset=4
|
||||
local.get $0
|
||||
i32.load
|
||||
i32.sub
|
||||
call $~lib/arraybuffer/ArrayBufferView#get:byteOffset
|
||||
if
|
||||
i32.const 0
|
||||
i32.const 288
|
||||
@ -2440,10 +2381,10 @@
|
||||
unreachable
|
||||
end
|
||||
)
|
||||
(func $start (; 28 ;) (type $FUNCSIG$v)
|
||||
(func $start (; 33 ;) (type $FUNCSIG$v)
|
||||
call $start:std/dataview
|
||||
)
|
||||
(func $null (; 29 ;) (type $FUNCSIG$v)
|
||||
(func $null (; 34 ;) (type $FUNCSIG$v)
|
||||
nop
|
||||
)
|
||||
)
|
||||
|
@ -178,15 +178,15 @@
|
||||
unreachable
|
||||
end
|
||||
global.get $std/date/date
|
||||
local.tee $0
|
||||
global.get $std/date/creationTime
|
||||
i64.const 1
|
||||
i64.add
|
||||
local.tee $1
|
||||
i64.store
|
||||
local.get $0
|
||||
global.get $std/date/date
|
||||
i64.load
|
||||
local.get $1
|
||||
global.get $std/date/creationTime
|
||||
i64.const 1
|
||||
i64.add
|
||||
i64.ne
|
||||
if
|
||||
i32.const 0
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,10 +1,12 @@
|
||||
(module
|
||||
(type $FUNCSIG$iddd (func (param f64 f64 f64) (result i32)))
|
||||
(type $FUNCSIG$ddd (func (param f64 f64) (result f64)))
|
||||
(type $FUNCSIG$id (func (param f64) (result i32)))
|
||||
(type $FUNCSIG$idd (func (param f64 f64) (result i32)))
|
||||
(type $FUNCSIG$viiii (func (param i32 i32 i32 i32)))
|
||||
(type $FUNCSIG$ifff (func (param f32 f32 f32) (result i32)))
|
||||
(type $FUNCSIG$fff (func (param f32 f32) (result f32)))
|
||||
(type $FUNCSIG$if (func (param f32) (result i32)))
|
||||
(type $FUNCSIG$iff (func (param f32 f32) (result i32)))
|
||||
(type $FUNCSIG$v (func))
|
||||
(import "math" "mod" (func $std/mod/mod (param f64 f64) (result f64)))
|
||||
@ -14,7 +16,12 @@
|
||||
(export "memory" (memory $0))
|
||||
(export "mod" (func $std/mod/mod))
|
||||
(start $start)
|
||||
(func $~lib/math/NativeMath.mod (; 2 ;) (type $FUNCSIG$ddd) (param $0 f64) (param $1 f64) (result f64)
|
||||
(func $~lib/builtins/isNaN<f64> (; 2 ;) (type $FUNCSIG$id) (param $0 f64) (result i32)
|
||||
local.get $0
|
||||
local.get $0
|
||||
f64.ne
|
||||
)
|
||||
(func $~lib/math/NativeMath.mod (; 3 ;) (type $FUNCSIG$ddd) (param $0 f64) (param $1 f64) (result f64)
|
||||
(local $2 i64)
|
||||
(local $3 i64)
|
||||
(local $4 i64)
|
||||
@ -59,8 +66,7 @@
|
||||
i32.const 1
|
||||
else
|
||||
local.get $1
|
||||
local.get $1
|
||||
f64.ne
|
||||
call $~lib/builtins/isNaN<f64>
|
||||
end
|
||||
if
|
||||
local.get $0
|
||||
@ -142,7 +148,7 @@
|
||||
local.get $2
|
||||
local.get $3
|
||||
i64.ge_u
|
||||
if
|
||||
if (result i64)
|
||||
local.get $2
|
||||
local.get $3
|
||||
i64.eq
|
||||
@ -150,9 +156,9 @@
|
||||
local.get $2
|
||||
local.get $3
|
||||
i64.sub
|
||||
local.set $2
|
||||
else
|
||||
local.get $2
|
||||
end
|
||||
local.get $2
|
||||
i64.const 1
|
||||
i64.shl
|
||||
local.set $2
|
||||
@ -187,21 +193,21 @@
|
||||
local.get $4
|
||||
local.get $3
|
||||
i64.sub
|
||||
local.tee $3
|
||||
local.tee $4
|
||||
i64.const 0
|
||||
i64.gt_s
|
||||
if (result i64)
|
||||
local.get $2
|
||||
i64.const 4503599627370496
|
||||
i64.sub
|
||||
local.get $3
|
||||
local.get $4
|
||||
i64.const 52
|
||||
i64.shl
|
||||
i64.or
|
||||
else
|
||||
local.get $2
|
||||
i64.const 0
|
||||
local.get $3
|
||||
local.get $4
|
||||
i64.sub
|
||||
i64.const 1
|
||||
i64.add
|
||||
@ -218,14 +224,12 @@
|
||||
local.get $0
|
||||
f64.mul
|
||||
)
|
||||
(func $std/mod/check<f64> (; 3 ;) (type $FUNCSIG$idd) (param $0 f64) (param $1 f64) (result i32)
|
||||
(func $std/mod/check<f64> (; 4 ;) (type $FUNCSIG$idd) (param $0 f64) (param $1 f64) (result i32)
|
||||
local.get $1
|
||||
local.get $1
|
||||
f64.ne
|
||||
call $~lib/builtins/isNaN<f64>
|
||||
if
|
||||
local.get $0
|
||||
local.get $0
|
||||
f64.ne
|
||||
call $~lib/builtins/isNaN<f64>
|
||||
return
|
||||
end
|
||||
local.get $1
|
||||
@ -245,7 +249,7 @@
|
||||
local.get $1
|
||||
f64.eq
|
||||
)
|
||||
(func $std/mod/test_fmod (; 4 ;) (type $FUNCSIG$iddd) (param $0 f64) (param $1 f64) (param $2 f64) (result i32)
|
||||
(func $std/mod/test_fmod (; 5 ;) (type $FUNCSIG$iddd) (param $0 f64) (param $1 f64) (param $2 f64) (result i32)
|
||||
local.get $0
|
||||
local.get $1
|
||||
call $~lib/math/NativeMath.mod
|
||||
@ -261,7 +265,12 @@
|
||||
i32.const 0
|
||||
end
|
||||
)
|
||||
(func $~lib/math/NativeMathf.mod (; 5 ;) (type $FUNCSIG$fff) (param $0 f32) (param $1 f32) (result f32)
|
||||
(func $~lib/builtins/isNaN<f32> (; 6 ;) (type $FUNCSIG$if) (param $0 f32) (result i32)
|
||||
local.get $0
|
||||
local.get $0
|
||||
f32.ne
|
||||
)
|
||||
(func $~lib/math/NativeMathf.mod (; 7 ;) (type $FUNCSIG$fff) (param $0 f32) (param $1 f32) (result f32)
|
||||
(local $2 i32)
|
||||
(local $3 i32)
|
||||
(local $4 i32)
|
||||
@ -304,8 +313,7 @@
|
||||
i32.const 1
|
||||
else
|
||||
local.get $1
|
||||
local.get $1
|
||||
f32.ne
|
||||
call $~lib/builtins/isNaN<f32>
|
||||
end
|
||||
if
|
||||
local.get $0
|
||||
@ -381,7 +389,7 @@
|
||||
local.get $2
|
||||
local.get $3
|
||||
i32.ge_u
|
||||
if
|
||||
if (result i32)
|
||||
local.get $2
|
||||
local.get $3
|
||||
i32.eq
|
||||
@ -389,9 +397,9 @@
|
||||
local.get $2
|
||||
local.get $3
|
||||
i32.sub
|
||||
local.set $2
|
||||
else
|
||||
local.get $2
|
||||
end
|
||||
local.get $2
|
||||
i32.const 1
|
||||
i32.shl
|
||||
local.set $2
|
||||
@ -426,21 +434,21 @@
|
||||
local.get $4
|
||||
local.get $3
|
||||
i32.sub
|
||||
local.tee $3
|
||||
local.tee $4
|
||||
i32.const 0
|
||||
i32.gt_s
|
||||
if (result i32)
|
||||
local.get $2
|
||||
i32.const 8388608
|
||||
i32.sub
|
||||
local.get $3
|
||||
local.get $4
|
||||
i32.const 23
|
||||
i32.shl
|
||||
i32.or
|
||||
else
|
||||
local.get $2
|
||||
i32.const 1
|
||||
local.get $3
|
||||
local.get $4
|
||||
i32.sub
|
||||
i32.shr_u
|
||||
end
|
||||
@ -453,14 +461,12 @@
|
||||
local.get $0
|
||||
f32.mul
|
||||
)
|
||||
(func $std/mod/check<f32> (; 6 ;) (type $FUNCSIG$iff) (param $0 f32) (param $1 f32) (result i32)
|
||||
(func $std/mod/check<f32> (; 8 ;) (type $FUNCSIG$iff) (param $0 f32) (param $1 f32) (result i32)
|
||||
local.get $1
|
||||
local.get $1
|
||||
f32.ne
|
||||
call $~lib/builtins/isNaN<f32>
|
||||
if
|
||||
local.get $0
|
||||
local.get $0
|
||||
f32.ne
|
||||
call $~lib/builtins/isNaN<f32>
|
||||
return
|
||||
end
|
||||
local.get $1
|
||||
@ -480,14 +486,14 @@
|
||||
local.get $1
|
||||
f32.eq
|
||||
)
|
||||
(func $std/mod/test_fmodf (; 7 ;) (type $FUNCSIG$ifff) (param $0 f32) (param $1 f32) (param $2 f32) (result i32)
|
||||
(func $std/mod/test_fmodf (; 9 ;) (type $FUNCSIG$ifff) (param $0 f32) (param $1 f32) (param $2 f32) (result i32)
|
||||
local.get $0
|
||||
local.get $1
|
||||
call $~lib/math/NativeMathf.mod
|
||||
local.get $2
|
||||
call $std/mod/check<f32>
|
||||
)
|
||||
(func $start:std/mod (; 8 ;) (type $FUNCSIG$v)
|
||||
(func $start:std/mod (; 10 ;) (type $FUNCSIG$v)
|
||||
f64.const 3
|
||||
f64.const 2
|
||||
f64.const 1
|
||||
@ -2244,10 +2250,10 @@
|
||||
unreachable
|
||||
end
|
||||
)
|
||||
(func $start (; 9 ;) (type $FUNCSIG$v)
|
||||
(func $start (; 11 ;) (type $FUNCSIG$v)
|
||||
call $start:std/mod
|
||||
)
|
||||
(func $null (; 10 ;) (type $FUNCSIG$v)
|
||||
(func $null (; 12 ;) (type $FUNCSIG$v)
|
||||
nop
|
||||
)
|
||||
)
|
||||
|
@ -1,9 +1,9 @@
|
||||
(module
|
||||
(type $FUNCSIG$iii (func (param i32 i32) (result i32)))
|
||||
(type $FUNCSIG$ii (func (param i32) (result i32)))
|
||||
(type $FUNCSIG$vi (func (param i32)))
|
||||
(type $FUNCSIG$viiii (func (param i32 i32 i32 i32)))
|
||||
(type $FUNCSIG$v (func))
|
||||
(type $FUNCSIG$ii (func (param i32) (result i32)))
|
||||
(import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32)))
|
||||
(memory $0 1)
|
||||
(data (i32.const 8) "\16\00\00\00\01\00\00\00\01\00\00\00\16\00\00\00h\00e\00l\00l\00o\00 \00w\00o\00r\00l\00d")
|
||||
@ -86,7 +86,15 @@
|
||||
i32.store offset=12
|
||||
local.get $3
|
||||
)
|
||||
(func $~lib/util/string/compareImpl (; 2 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
(func $~lib/string/String#get:length (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
|
||||
local.get $0
|
||||
i32.const 16
|
||||
i32.sub
|
||||
i32.load offset=12
|
||||
i32.const 1
|
||||
i32.shr_u
|
||||
)
|
||||
(func $~lib/util/string/compareImpl (; 3 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
(local $2 i32)
|
||||
(local $3 i32)
|
||||
i32.const 24
|
||||
@ -122,7 +130,7 @@
|
||||
end
|
||||
local.get $3
|
||||
)
|
||||
(func $~lib/string/String.__eq (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
|
||||
(func $~lib/string/String.__eq (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
|
||||
(local $1 i32)
|
||||
local.get $0
|
||||
i32.const 24
|
||||
@ -138,16 +146,10 @@
|
||||
select
|
||||
br_if $folding-inner0
|
||||
local.get $0
|
||||
i32.const 16
|
||||
i32.sub
|
||||
i32.load offset=12
|
||||
i32.const 1
|
||||
i32.shr_u
|
||||
call $~lib/string/String#get:length
|
||||
local.tee $1
|
||||
i32.const 20
|
||||
i32.load
|
||||
i32.const 1
|
||||
i32.shr_u
|
||||
i32.const 24
|
||||
call $~lib/string/String#get:length
|
||||
i32.ne
|
||||
br_if $folding-inner0
|
||||
local.get $0
|
||||
@ -158,7 +160,7 @@
|
||||
end
|
||||
i32.const 0
|
||||
)
|
||||
(func $std/object-literal/bar (; 4 ;) (type $FUNCSIG$vi) (param $0 i32)
|
||||
(func $std/object-literal/bar (; 5 ;) (type $FUNCSIG$vi) (param $0 i32)
|
||||
local.get $0
|
||||
i32.load
|
||||
i32.const 1
|
||||
@ -184,7 +186,7 @@
|
||||
unreachable
|
||||
end
|
||||
)
|
||||
(func $start:std/object-literal (; 5 ;) (type $FUNCSIG$v)
|
||||
(func $start:std/object-literal (; 6 ;) (type $FUNCSIG$v)
|
||||
(local $0 i32)
|
||||
i32.const 112
|
||||
global.set $~lib/rt/stub/startOffset
|
||||
@ -238,10 +240,10 @@
|
||||
unreachable
|
||||
end
|
||||
)
|
||||
(func $start (; 6 ;) (type $FUNCSIG$v)
|
||||
(func $start (; 7 ;) (type $FUNCSIG$v)
|
||||
call $start:std/object-literal
|
||||
)
|
||||
(func $null (; 7 ;) (type $FUNCSIG$v)
|
||||
(func $null (; 8 ;) (type $FUNCSIG$v)
|
||||
nop
|
||||
)
|
||||
)
|
||||
|
@ -282,37 +282,33 @@
|
||||
return
|
||||
end
|
||||
i32.const 1
|
||||
local.get $6
|
||||
i32.const 0
|
||||
i32.ne
|
||||
i32.const 0
|
||||
local.get $8
|
||||
i32.const 2146435072
|
||||
i32.eq
|
||||
select
|
||||
i32.const 1
|
||||
local.get $8
|
||||
i32.const 2146435072
|
||||
i32.gt_s
|
||||
i32.const 1
|
||||
local.get $19
|
||||
i32.const 0
|
||||
i32.ne
|
||||
i32.const 0
|
||||
local.get $4
|
||||
i32.const 2146435072
|
||||
i32.eq
|
||||
select
|
||||
local.get $4
|
||||
i32.const 2146435072
|
||||
i32.gt_s
|
||||
if (result i32)
|
||||
i32.const 1
|
||||
else
|
||||
local.get $19
|
||||
i32.const 0
|
||||
i32.ne
|
||||
i32.const 0
|
||||
local.get $4
|
||||
i32.const 2146435072
|
||||
i32.eq
|
||||
select
|
||||
end
|
||||
select
|
||||
if (result i32)
|
||||
i32.const 1
|
||||
else
|
||||
local.get $6
|
||||
i32.const 0
|
||||
i32.ne
|
||||
i32.const 0
|
||||
local.get $8
|
||||
i32.const 2146435072
|
||||
i32.eq
|
||||
select
|
||||
end
|
||||
select
|
||||
select
|
||||
if
|
||||
local.get $0
|
||||
local.get $1
|
||||
@ -576,44 +572,40 @@
|
||||
i32.const 1072693247
|
||||
i32.lt_s
|
||||
if
|
||||
local.get $7
|
||||
f64.const 1.e+300
|
||||
f64.mul
|
||||
f64.const 1.e+300
|
||||
f64.mul
|
||||
local.get $7
|
||||
f64.const 1e-300
|
||||
f64.mul
|
||||
f64.const 1e-300
|
||||
f64.mul
|
||||
local.get $9
|
||||
i32.const 0
|
||||
i32.lt_s
|
||||
if (result f64)
|
||||
local.get $7
|
||||
f64.const 1.e+300
|
||||
f64.mul
|
||||
f64.const 1.e+300
|
||||
f64.mul
|
||||
else
|
||||
local.get $7
|
||||
f64.const 1e-300
|
||||
f64.mul
|
||||
f64.const 1e-300
|
||||
f64.mul
|
||||
end
|
||||
select
|
||||
return
|
||||
end
|
||||
local.get $4
|
||||
i32.const 1072693248
|
||||
i32.gt_s
|
||||
if
|
||||
local.get $7
|
||||
f64.const 1.e+300
|
||||
f64.mul
|
||||
f64.const 1.e+300
|
||||
f64.mul
|
||||
local.get $7
|
||||
f64.const 1e-300
|
||||
f64.mul
|
||||
f64.const 1e-300
|
||||
f64.mul
|
||||
local.get $9
|
||||
i32.const 0
|
||||
i32.gt_s
|
||||
if (result f64)
|
||||
local.get $7
|
||||
f64.const 1.e+300
|
||||
f64.mul
|
||||
f64.const 1.e+300
|
||||
f64.mul
|
||||
else
|
||||
local.get $7
|
||||
f64.const 1e-300
|
||||
f64.mul
|
||||
f64.const 1e-300
|
||||
f64.mul
|
||||
end
|
||||
select
|
||||
return
|
||||
end
|
||||
local.get $3
|
||||
@ -934,7 +926,6 @@
|
||||
i32.sub
|
||||
local.get $5
|
||||
i32.or
|
||||
br_if $folding-inner0
|
||||
local.get $1
|
||||
f64.const 8.008566259537294e-17
|
||||
f64.add
|
||||
@ -942,6 +933,7 @@
|
||||
local.get $2
|
||||
f64.sub
|
||||
f64.gt
|
||||
i32.or
|
||||
br_if $folding-inner0
|
||||
else
|
||||
local.get $12
|
||||
@ -955,12 +947,12 @@
|
||||
i32.sub
|
||||
local.get $5
|
||||
i32.or
|
||||
br_if $folding-inner1
|
||||
local.get $1
|
||||
local.get $0
|
||||
local.get $2
|
||||
f64.sub
|
||||
f64.le
|
||||
i32.or
|
||||
br_if $folding-inner1
|
||||
end
|
||||
end
|
||||
@ -1167,7 +1159,39 @@
|
||||
i32.trunc_f64_s
|
||||
call $std/operator-overloading/Tester#constructor
|
||||
)
|
||||
(func $std/operator-overloading/TesterInlineStatic#constructor (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
(func $std/operator-overloading/Tester.equals (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
local.get $0
|
||||
i32.load
|
||||
local.get $1
|
||||
i32.load
|
||||
i32.eq
|
||||
if (result i32)
|
||||
local.get $0
|
||||
i32.load offset=4
|
||||
local.get $1
|
||||
i32.load offset=4
|
||||
i32.eq
|
||||
else
|
||||
i32.const 0
|
||||
end
|
||||
)
|
||||
(func $std/operator-overloading/Tester.notEquals (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
local.get $0
|
||||
i32.load
|
||||
local.get $1
|
||||
i32.load
|
||||
i32.ne
|
||||
if (result i32)
|
||||
local.get $0
|
||||
i32.load offset=4
|
||||
local.get $1
|
||||
i32.load offset=4
|
||||
i32.ne
|
||||
else
|
||||
i32.const 0
|
||||
end
|
||||
)
|
||||
(func $std/operator-overloading/TesterInlineStatic#constructor (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
(local $2 i32)
|
||||
i32.const 4
|
||||
call $~lib/rt/stub/__alloc
|
||||
@ -1179,7 +1203,7 @@
|
||||
i32.store offset=4
|
||||
local.get $2
|
||||
)
|
||||
(func $std/operator-overloading/TesterInlineInstance#constructor (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
(func $std/operator-overloading/TesterInlineInstance#constructor (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
(local $2 i32)
|
||||
i32.const 5
|
||||
call $~lib/rt/stub/__alloc
|
||||
@ -1191,7 +1215,7 @@
|
||||
i32.store offset=4
|
||||
local.get $2
|
||||
)
|
||||
(func $start:std/operator-overloading (; 8 ;) (type $FUNCSIG$v)
|
||||
(func $start:std/operator-overloading (; 10 ;) (type $FUNCSIG$v)
|
||||
(local $0 i32)
|
||||
(local $1 i32)
|
||||
i32.const 80
|
||||
@ -1581,21 +1605,8 @@
|
||||
call $std/operator-overloading/Tester#constructor
|
||||
global.set $std/operator-overloading/eq2
|
||||
global.get $std/operator-overloading/eq1
|
||||
local.tee $0
|
||||
i32.load
|
||||
global.get $std/operator-overloading/eq2
|
||||
local.tee $1
|
||||
i32.load
|
||||
i32.eq
|
||||
if (result i32)
|
||||
local.get $0
|
||||
i32.load offset=4
|
||||
local.get $1
|
||||
i32.load offset=4
|
||||
i32.eq
|
||||
else
|
||||
i32.const 0
|
||||
end
|
||||
call $std/operator-overloading/Tester.equals
|
||||
global.set $std/operator-overloading/eq
|
||||
global.get $std/operator-overloading/eq
|
||||
i32.const 1
|
||||
@ -1617,21 +1628,8 @@
|
||||
call $std/operator-overloading/Tester#constructor
|
||||
global.set $std/operator-overloading/eq4
|
||||
global.get $std/operator-overloading/eq3
|
||||
local.tee $0
|
||||
i32.load
|
||||
global.get $std/operator-overloading/eq4
|
||||
local.tee $1
|
||||
i32.load
|
||||
i32.eq
|
||||
if (result i32)
|
||||
local.get $0
|
||||
i32.load offset=4
|
||||
local.get $1
|
||||
i32.load offset=4
|
||||
i32.eq
|
||||
else
|
||||
i32.const 0
|
||||
end
|
||||
call $std/operator-overloading/Tester.equals
|
||||
global.set $std/operator-overloading/eqf
|
||||
global.get $std/operator-overloading/eqf
|
||||
if
|
||||
@ -1643,21 +1641,8 @@
|
||||
unreachable
|
||||
end
|
||||
global.get $std/operator-overloading/eq1
|
||||
local.tee $0
|
||||
i32.load
|
||||
global.get $std/operator-overloading/eq2
|
||||
local.tee $1
|
||||
i32.load
|
||||
i32.ne
|
||||
if (result i32)
|
||||
local.get $0
|
||||
i32.load offset=4
|
||||
local.get $1
|
||||
i32.load offset=4
|
||||
i32.ne
|
||||
else
|
||||
i32.const 0
|
||||
end
|
||||
call $std/operator-overloading/Tester.notEquals
|
||||
global.set $std/operator-overloading/eq
|
||||
global.get $std/operator-overloading/eq
|
||||
if
|
||||
@ -1669,21 +1654,8 @@
|
||||
unreachable
|
||||
end
|
||||
global.get $std/operator-overloading/eq3
|
||||
local.tee $0
|
||||
i32.load
|
||||
global.get $std/operator-overloading/eq4
|
||||
local.tee $1
|
||||
i32.load
|
||||
i32.ne
|
||||
if (result i32)
|
||||
local.get $0
|
||||
i32.load offset=4
|
||||
local.get $1
|
||||
i32.load offset=4
|
||||
i32.ne
|
||||
else
|
||||
i32.const 0
|
||||
end
|
||||
call $std/operator-overloading/Tester.notEquals
|
||||
global.set $std/operator-overloading/eqf
|
||||
global.get $std/operator-overloading/eqf
|
||||
i32.const 1
|
||||
@ -2404,10 +2376,10 @@
|
||||
unreachable
|
||||
end
|
||||
)
|
||||
(func $start (; 9 ;) (type $FUNCSIG$v)
|
||||
(func $start (; 11 ;) (type $FUNCSIG$v)
|
||||
call $start:std/operator-overloading
|
||||
)
|
||||
(func $null (; 10 ;) (type $FUNCSIG$v)
|
||||
(func $null (; 12 ;) (type $FUNCSIG$v)
|
||||
nop
|
||||
)
|
||||
)
|
||||
|
@ -1,5 +1,7 @@
|
||||
(module
|
||||
(type $FUNCSIG$ii (func (param i32) (result i32)))
|
||||
(type $FUNCSIG$viiii (func (param i32 i32 i32 i32)))
|
||||
(type $FUNCSIG$viif (func (param i32 i32 f32)))
|
||||
(type $FUNCSIG$v (func))
|
||||
(type $FUNCSIG$vi (func (param i32)))
|
||||
(type $FUNCSIG$vii (func (param i32 i32)))
|
||||
@ -14,7 +16,12 @@
|
||||
(global $std/pointer/buf (mut i32) (i32.const 0))
|
||||
(export "memory" (memory $0))
|
||||
(start $start)
|
||||
(func $~lib/memory/memory.fill (; 1 ;) (type $FUNCSIG$vi) (param $0 i32)
|
||||
(func $std/pointer/Pointer<std/pointer/Entry>#dec (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
|
||||
local.get $0
|
||||
i32.const 8
|
||||
i32.sub
|
||||
)
|
||||
(func $~lib/memory/memory.fill (; 2 ;) (type $FUNCSIG$vi) (param $0 i32)
|
||||
(local $1 i32)
|
||||
local.get $0
|
||||
i32.const 0
|
||||
@ -58,7 +65,7 @@
|
||||
i32.const 0
|
||||
i32.store8
|
||||
)
|
||||
(func $~lib/memory/memory.copy (; 2 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32)
|
||||
(func $~lib/memory/memory.copy (; 3 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32)
|
||||
(local $2 i32)
|
||||
(local $3 i32)
|
||||
(local $4 i32)
|
||||
@ -232,7 +239,16 @@
|
||||
end
|
||||
end
|
||||
)
|
||||
(func $start:std/pointer (; 3 ;) (type $FUNCSIG$v)
|
||||
(func $std/pointer/Pointer<f32>#set (; 4 ;) (type $FUNCSIG$viif) (param $0 i32) (param $1 i32) (param $2 f32)
|
||||
local.get $1
|
||||
i32.const 2
|
||||
i32.shl
|
||||
local.get $0
|
||||
i32.add
|
||||
local.get $2
|
||||
f32.store
|
||||
)
|
||||
(func $start:std/pointer (; 5 ;) (type $FUNCSIG$v)
|
||||
(local $0 i32)
|
||||
(local $1 i32)
|
||||
i32.const 8
|
||||
@ -262,13 +278,12 @@
|
||||
unreachable
|
||||
end
|
||||
global.get $std/pointer/one
|
||||
local.tee $0
|
||||
i32.const 1
|
||||
i32.store
|
||||
local.get $0
|
||||
global.get $std/pointer/one
|
||||
i32.const 2
|
||||
i32.store offset=4
|
||||
local.get $0
|
||||
global.get $std/pointer/one
|
||||
i32.load
|
||||
i32.const 1
|
||||
i32.ne
|
||||
@ -338,10 +353,9 @@
|
||||
i32.add
|
||||
global.set $std/pointer/one
|
||||
global.get $std/pointer/one
|
||||
local.tee $0
|
||||
global.set $std/pointer/nextOne
|
||||
global.get $std/pointer/nextOne
|
||||
local.get $0
|
||||
global.get $std/pointer/one
|
||||
i32.ne
|
||||
if
|
||||
i32.const 0
|
||||
@ -374,12 +388,10 @@
|
||||
unreachable
|
||||
end
|
||||
global.get $std/pointer/two
|
||||
i32.const 8
|
||||
i32.sub
|
||||
call $std/pointer/Pointer<std/pointer/Entry>#dec
|
||||
global.set $std/pointer/two
|
||||
global.get $std/pointer/two
|
||||
i32.const 8
|
||||
i32.sub
|
||||
call $std/pointer/Pointer<std/pointer/Entry>#dec
|
||||
global.set $std/pointer/two
|
||||
global.get $std/pointer/two
|
||||
i32.const 8
|
||||
@ -466,15 +478,14 @@
|
||||
i32.const 0
|
||||
global.set $std/pointer/buf
|
||||
global.get $std/pointer/buf
|
||||
local.tee $0
|
||||
i32.const 0
|
||||
f32.const 1.100000023841858
|
||||
f32.store
|
||||
local.get $0
|
||||
i32.const 4
|
||||
i32.add
|
||||
call $std/pointer/Pointer<f32>#set
|
||||
global.get $std/pointer/buf
|
||||
i32.const 1
|
||||
f32.const 1.2000000476837158
|
||||
f32.store
|
||||
local.get $0
|
||||
call $std/pointer/Pointer<f32>#set
|
||||
global.get $std/pointer/buf
|
||||
f32.load
|
||||
f32.const 1.100000023841858
|
||||
f32.ne
|
||||
@ -553,10 +564,11 @@
|
||||
global.get $std/pointer/buf
|
||||
i32.const 8
|
||||
i32.add
|
||||
local.tee $0
|
||||
f32.const 1.2999999523162842
|
||||
f32.store
|
||||
local.get $0
|
||||
global.get $std/pointer/buf
|
||||
i32.const 8
|
||||
i32.add
|
||||
f32.load
|
||||
f32.const 1.2999999523162842
|
||||
f32.ne
|
||||
@ -595,10 +607,9 @@
|
||||
unreachable
|
||||
end
|
||||
global.get $std/pointer/buf
|
||||
local.tee $0
|
||||
f32.const 1.399999976158142
|
||||
f32.store
|
||||
local.get $0
|
||||
global.get $std/pointer/buf
|
||||
f32.load
|
||||
f32.const 1.399999976158142
|
||||
f32.ne
|
||||
@ -623,10 +634,10 @@
|
||||
unreachable
|
||||
end
|
||||
)
|
||||
(func $start (; 4 ;) (type $FUNCSIG$v)
|
||||
(func $start (; 6 ;) (type $FUNCSIG$v)
|
||||
call $start:std/pointer
|
||||
)
|
||||
(func $null (; 5 ;) (type $FUNCSIG$v)
|
||||
(func $null (; 7 ;) (type $FUNCSIG$v)
|
||||
nop
|
||||
)
|
||||
)
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -22,7 +22,15 @@
|
||||
(global $std/string-utf8/ptr (mut i32) (i32.const 0))
|
||||
(export "memory" (memory $0))
|
||||
(start $start)
|
||||
(func $~lib/string/String#get:lengthUTF8 (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
|
||||
(func $~lib/string/String#get:length (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
|
||||
local.get $0
|
||||
i32.const 16
|
||||
i32.sub
|
||||
i32.load offset=12
|
||||
i32.const 1
|
||||
i32.shr_u
|
||||
)
|
||||
(func $~lib/string/String#get:lengthUTF8 (; 2 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
|
||||
(local $1 i32)
|
||||
(local $2 i32)
|
||||
(local $3 i32)
|
||||
@ -30,11 +38,7 @@
|
||||
i32.const 1
|
||||
local.set $1
|
||||
local.get $0
|
||||
i32.const 16
|
||||
i32.sub
|
||||
i32.load offset=12
|
||||
i32.const 1
|
||||
i32.shr_u
|
||||
call $~lib/string/String#get:length
|
||||
local.set $3
|
||||
loop $continue|0
|
||||
local.get $2
|
||||
@ -124,7 +128,7 @@
|
||||
end
|
||||
local.get $1
|
||||
)
|
||||
(func $~lib/rt/stub/__alloc (; 2 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
(func $~lib/rt/stub/__alloc (; 3 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
(local $2 i32)
|
||||
(local $3 i32)
|
||||
(local $4 i32)
|
||||
@ -198,7 +202,7 @@
|
||||
i32.store offset=12
|
||||
local.get $3
|
||||
)
|
||||
(func $~lib/string/String#toUTF8 (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
|
||||
(func $~lib/string/String#toUTF8 (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
|
||||
(local $1 i32)
|
||||
(local $2 i32)
|
||||
(local $3 i32)
|
||||
@ -212,18 +216,14 @@
|
||||
call $~lib/rt/stub/__alloc
|
||||
local.set $5
|
||||
local.get $0
|
||||
i32.const 16
|
||||
i32.sub
|
||||
i32.load offset=12
|
||||
i32.const 1
|
||||
i32.shr_u
|
||||
call $~lib/string/String#get:length
|
||||
local.set $6
|
||||
loop $continue|0
|
||||
local.get $4
|
||||
local.get $3
|
||||
local.get $6
|
||||
i32.lt_u
|
||||
if
|
||||
local.get $4
|
||||
local.get $3
|
||||
i32.const 1
|
||||
i32.shl
|
||||
local.get $0
|
||||
@ -232,7 +232,7 @@
|
||||
local.tee $1
|
||||
i32.const 128
|
||||
i32.lt_u
|
||||
if (result i32)
|
||||
if
|
||||
local.get $2
|
||||
local.get $5
|
||||
i32.add
|
||||
@ -241,22 +241,23 @@
|
||||
local.get $2
|
||||
i32.const 1
|
||||
i32.add
|
||||
local.set $2
|
||||
else
|
||||
local.get $1
|
||||
i32.const 2048
|
||||
i32.lt_u
|
||||
if (result i32)
|
||||
if
|
||||
local.get $2
|
||||
local.get $5
|
||||
i32.add
|
||||
local.tee $3
|
||||
local.tee $4
|
||||
local.get $1
|
||||
i32.const 6
|
||||
i32.shr_u
|
||||
i32.const 192
|
||||
i32.or
|
||||
i32.store8
|
||||
local.get $3
|
||||
local.get $4
|
||||
local.get $1
|
||||
i32.const 63
|
||||
i32.and
|
||||
@ -266,12 +267,13 @@
|
||||
local.get $2
|
||||
i32.const 2
|
||||
i32.add
|
||||
local.set $2
|
||||
else
|
||||
local.get $2
|
||||
local.get $5
|
||||
i32.add
|
||||
local.set $3
|
||||
local.get $4
|
||||
local.set $4
|
||||
local.get $3
|
||||
i32.const 1
|
||||
i32.add
|
||||
local.get $6
|
||||
@ -284,7 +286,7 @@
|
||||
i32.eq
|
||||
select
|
||||
if
|
||||
local.get $4
|
||||
local.get $3
|
||||
i32.const 1
|
||||
i32.add
|
||||
i32.const 1
|
||||
@ -298,7 +300,7 @@
|
||||
i32.const 56320
|
||||
i32.eq
|
||||
if
|
||||
local.get $3
|
||||
local.get $4
|
||||
local.get $1
|
||||
i32.const 1023
|
||||
i32.and
|
||||
@ -316,7 +318,7 @@
|
||||
i32.const 240
|
||||
i32.or
|
||||
i32.store8
|
||||
local.get $3
|
||||
local.get $4
|
||||
local.get $1
|
||||
i32.const 12
|
||||
i32.shr_u
|
||||
@ -325,7 +327,7 @@
|
||||
i32.const 128
|
||||
i32.or
|
||||
i32.store8 offset=1
|
||||
local.get $3
|
||||
local.get $4
|
||||
local.get $1
|
||||
i32.const 6
|
||||
i32.shr_u
|
||||
@ -334,7 +336,7 @@
|
||||
i32.const 128
|
||||
i32.or
|
||||
i32.store8 offset=2
|
||||
local.get $3
|
||||
local.get $4
|
||||
local.get $1
|
||||
i32.const 63
|
||||
i32.and
|
||||
@ -345,21 +347,21 @@
|
||||
i32.const 4
|
||||
i32.add
|
||||
local.set $2
|
||||
local.get $4
|
||||
local.get $3
|
||||
i32.const 2
|
||||
i32.add
|
||||
local.set $4
|
||||
local.set $3
|
||||
br $continue|0
|
||||
end
|
||||
end
|
||||
local.get $3
|
||||
local.get $4
|
||||
local.get $1
|
||||
i32.const 12
|
||||
i32.shr_u
|
||||
i32.const 224
|
||||
i32.or
|
||||
i32.store8
|
||||
local.get $3
|
||||
local.get $4
|
||||
local.get $1
|
||||
i32.const 6
|
||||
i32.shr_u
|
||||
@ -368,7 +370,7 @@
|
||||
i32.const 128
|
||||
i32.or
|
||||
i32.store8 offset=1
|
||||
local.get $3
|
||||
local.get $4
|
||||
local.get $1
|
||||
i32.const 63
|
||||
i32.and
|
||||
@ -378,13 +380,13 @@
|
||||
local.get $2
|
||||
i32.const 3
|
||||
i32.add
|
||||
local.set $2
|
||||
end
|
||||
end
|
||||
local.set $2
|
||||
local.get $4
|
||||
local.get $3
|
||||
i32.const 1
|
||||
i32.add
|
||||
local.set $4
|
||||
local.set $3
|
||||
br $continue|0
|
||||
end
|
||||
end
|
||||
@ -395,7 +397,7 @@
|
||||
i32.store8
|
||||
local.get $5
|
||||
)
|
||||
(func $~lib/memory/memory.copy (; 4 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32)
|
||||
(func $~lib/memory/memory.copy (; 5 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32)
|
||||
(local $3 i32)
|
||||
(local $4 i32)
|
||||
block $~lib/util/memory/memmove|inlined.0
|
||||
@ -568,7 +570,7 @@
|
||||
end
|
||||
end
|
||||
)
|
||||
(func $~lib/string/String.fromUTF8 (; 5 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
(func $~lib/string/String.fromUTF8 (; 6 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
(local $2 i32)
|
||||
(local $3 i32)
|
||||
(local $4 i32)
|
||||
@ -820,7 +822,7 @@
|
||||
call $~lib/memory/memory.copy
|
||||
local.get $0
|
||||
)
|
||||
(func $~lib/util/string/compareImpl (; 6 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
|
||||
(func $~lib/util/string/compareImpl (; 7 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
|
||||
(local $3 i32)
|
||||
loop $continue|0
|
||||
local.get $2
|
||||
@ -853,7 +855,7 @@
|
||||
end
|
||||
local.get $3
|
||||
)
|
||||
(func $~lib/string/String.__eq (; 7 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
(func $~lib/string/String.__eq (; 8 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
(local $2 i32)
|
||||
local.get $0
|
||||
local.get $1
|
||||
@ -870,18 +872,10 @@
|
||||
select
|
||||
br_if $folding-inner0
|
||||
local.get $0
|
||||
i32.const 16
|
||||
i32.sub
|
||||
i32.load offset=12
|
||||
i32.const 1
|
||||
i32.shr_u
|
||||
call $~lib/string/String#get:length
|
||||
local.tee $2
|
||||
local.get $1
|
||||
i32.const 16
|
||||
i32.sub
|
||||
i32.load offset=12
|
||||
i32.const 1
|
||||
i32.shr_u
|
||||
call $~lib/string/String#get:length
|
||||
i32.ne
|
||||
br_if $folding-inner0
|
||||
local.get $0
|
||||
@ -893,7 +887,7 @@
|
||||
end
|
||||
i32.const 0
|
||||
)
|
||||
(func $start:std/string-utf8 (; 8 ;) (type $FUNCSIG$v)
|
||||
(func $start:std/string-utf8 (; 9 ;) (type $FUNCSIG$v)
|
||||
global.get $std/string-utf8/str
|
||||
call $~lib/string/String#get:lengthUTF8
|
||||
global.set $std/string-utf8/len
|
||||
@ -1138,10 +1132,10 @@
|
||||
unreachable
|
||||
end
|
||||
)
|
||||
(func $start (; 9 ;) (type $FUNCSIG$v)
|
||||
(func $start (; 10 ;) (type $FUNCSIG$v)
|
||||
call $start:std/string-utf8
|
||||
)
|
||||
(func $null (; 10 ;) (type $FUNCSIG$v)
|
||||
(func $null (; 11 ;) (type $FUNCSIG$v)
|
||||
nop
|
||||
)
|
||||
)
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -305,3 +305,5 @@ export function getString(): string {
|
||||
// Unleak globals
|
||||
|
||||
__release(changetype<usize>(str));
|
||||
|
||||
@start export function main(): void {}
|
||||
|
@ -204,11 +204,12 @@
|
||||
(global $~lib/util/number/_exp_pow (mut i32) (i32.const 0))
|
||||
(global $~lib/builtins/f64.EPSILON f64 (f64.const 2.220446049250313e-16))
|
||||
(global $~lib/builtins/f64.MAX_VALUE f64 (f64.const 1797693134862315708145274e284))
|
||||
(global $~lib/started (mut i32) (i32.const 0))
|
||||
(global $~lib/rt/RTTI_BASE i32 (i32.const 6944))
|
||||
(global $~lib/heap/HEAP_BASE i32 (i32.const 7012))
|
||||
(export "memory" (memory $0))
|
||||
(export "getString" (func $std/string/getString))
|
||||
(start $start)
|
||||
(export "main" (func $std/string/main))
|
||||
(func $~lib/string/String#get:length (; 5 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
|
||||
local.get $0
|
||||
i32.const 16
|
||||
@ -10746,10 +10747,19 @@
|
||||
global.get $std/string/str
|
||||
call $~lib/rt/pure/__retain
|
||||
)
|
||||
(func $start (; 82 ;) (type $FUNCSIG$v)
|
||||
(func $std/string/main (; 82 ;) (type $FUNCSIG$v)
|
||||
global.get $~lib/started
|
||||
i32.eqz
|
||||
if
|
||||
call $start
|
||||
i32.const 1
|
||||
global.set $~lib/started
|
||||
end
|
||||
)
|
||||
(func $start (; 83 ;) (type $FUNCSIG$v)
|
||||
call $start:std/string
|
||||
)
|
||||
(func $~lib/rt/pure/markGray (; 83 ;) (type $FUNCSIG$vi) (param $0 i32)
|
||||
(func $~lib/rt/pure/markGray (; 84 ;) (type $FUNCSIG$vi) (param $0 i32)
|
||||
(local $1 i32)
|
||||
local.get $0
|
||||
i32.load offset=4
|
||||
@ -10776,7 +10786,7 @@
|
||||
call $~lib/rt/__visit_members
|
||||
end
|
||||
)
|
||||
(func $~lib/rt/pure/scanBlack (; 84 ;) (type $FUNCSIG$vi) (param $0 i32)
|
||||
(func $~lib/rt/pure/scanBlack (; 85 ;) (type $FUNCSIG$vi) (param $0 i32)
|
||||
local.get $0
|
||||
local.get $0
|
||||
i32.load offset=4
|
||||
@ -10793,7 +10803,7 @@
|
||||
i32.const 4
|
||||
call $~lib/rt/__visit_members
|
||||
)
|
||||
(func $~lib/rt/pure/scan (; 85 ;) (type $FUNCSIG$vi) (param $0 i32)
|
||||
(func $~lib/rt/pure/scan (; 86 ;) (type $FUNCSIG$vi) (param $0 i32)
|
||||
(local $1 i32)
|
||||
local.get $0
|
||||
i32.load offset=4
|
||||
@ -10830,7 +10840,7 @@
|
||||
end
|
||||
end
|
||||
)
|
||||
(func $~lib/rt/pure/collectWhite (; 86 ;) (type $FUNCSIG$vi) (param $0 i32)
|
||||
(func $~lib/rt/pure/collectWhite (; 87 ;) (type $FUNCSIG$vi) (param $0 i32)
|
||||
(local $1 i32)
|
||||
local.get $0
|
||||
i32.load offset=4
|
||||
@ -10859,7 +10869,7 @@
|
||||
local.get $0
|
||||
call $~lib/rt/tlsf/freeBlock
|
||||
)
|
||||
(func $~lib/rt/pure/__visit (; 87 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32)
|
||||
(func $~lib/rt/pure/__visit (; 88 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32)
|
||||
(local $2 i32)
|
||||
(local $3 i32)
|
||||
local.get $0
|
||||
@ -11013,7 +11023,7 @@
|
||||
end
|
||||
end
|
||||
)
|
||||
(func $~lib/array/Array<~lib/string/String>#__visit_impl (; 88 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32)
|
||||
(func $~lib/array/Array<~lib/string/String>#__visit_impl (; 89 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32)
|
||||
(local $2 i32)
|
||||
(local $3 i32)
|
||||
(local $4 i32)
|
||||
@ -11049,19 +11059,19 @@
|
||||
end
|
||||
end
|
||||
)
|
||||
(func $~lib/array/Array<i32>#__visit_impl (; 89 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32)
|
||||
(func $~lib/array/Array<i32>#__visit_impl (; 90 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32)
|
||||
nop
|
||||
)
|
||||
(func $~lib/array/Array<u32>#__visit_impl (; 90 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32)
|
||||
(func $~lib/array/Array<u32>#__visit_impl (; 91 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32)
|
||||
nop
|
||||
)
|
||||
(func $~lib/array/Array<u64>#__visit_impl (; 91 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32)
|
||||
(func $~lib/array/Array<u64>#__visit_impl (; 92 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32)
|
||||
nop
|
||||
)
|
||||
(func $~lib/array/Array<i16>#__visit_impl (; 92 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32)
|
||||
(func $~lib/array/Array<i16>#__visit_impl (; 93 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32)
|
||||
nop
|
||||
)
|
||||
(func $~lib/rt/__visit_members (; 93 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32)
|
||||
(func $~lib/rt/__visit_members (; 94 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32)
|
||||
(local $2 i32)
|
||||
block $block$4$break
|
||||
block
|
||||
@ -11211,6 +11221,6 @@
|
||||
end
|
||||
unreachable
|
||||
)
|
||||
(func $null (; 94 ;) (type $FUNCSIG$v)
|
||||
(func $null (; 95 ;) (type $FUNCSIG$v)
|
||||
)
|
||||
)
|
||||
|
@ -50,7 +50,20 @@
|
||||
(global $std/symbol/isConcatSpreadable (mut i32) (i32.const 0))
|
||||
(export "memory" (memory $0))
|
||||
(start $start)
|
||||
(func $~lib/rt/stub/__alloc (; 1 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
(func $~lib/symbol/Symbol (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
|
||||
global.get $~lib/symbol/nextId
|
||||
local.tee $0
|
||||
i32.const 1
|
||||
i32.add
|
||||
global.set $~lib/symbol/nextId
|
||||
local.get $0
|
||||
i32.eqz
|
||||
if
|
||||
unreachable
|
||||
end
|
||||
local.get $0
|
||||
)
|
||||
(func $~lib/rt/stub/__alloc (; 2 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
(local $2 i32)
|
||||
(local $3 i32)
|
||||
(local $4 i32)
|
||||
@ -124,7 +137,7 @@
|
||||
i32.store offset=12
|
||||
local.get $3
|
||||
)
|
||||
(func $~lib/memory/memory.fill (; 2 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32)
|
||||
(func $~lib/memory/memory.fill (; 3 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32)
|
||||
(local $2 i32)
|
||||
block $~lib/util/memory/memset|inlined.0
|
||||
local.get $1
|
||||
@ -335,7 +348,7 @@
|
||||
end
|
||||
end
|
||||
)
|
||||
(func $~lib/arraybuffer/ArrayBuffer#constructor (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
|
||||
(func $~lib/arraybuffer/ArrayBuffer#constructor (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
|
||||
(local $1 i32)
|
||||
local.get $0
|
||||
i32.const 1073741808
|
||||
@ -356,7 +369,7 @@
|
||||
call $~lib/memory/memory.fill
|
||||
local.get $1
|
||||
)
|
||||
(func $~lib/map/Map<~lib/string/String,usize>#clear (; 4 ;) (type $FUNCSIG$vi) (param $0 i32)
|
||||
(func $~lib/map/Map<~lib/string/String,usize>#clear (; 5 ;) (type $FUNCSIG$vi) (param $0 i32)
|
||||
local.get $0
|
||||
i32.load
|
||||
drop
|
||||
@ -384,7 +397,7 @@
|
||||
i32.const 0
|
||||
i32.store offset=20
|
||||
)
|
||||
(func $~lib/map/Map<~lib/string/String,usize>#constructor (; 5 ;) (type $FUNCSIG$i) (result i32)
|
||||
(func $~lib/map/Map<~lib/string/String,usize>#constructor (; 6 ;) (type $FUNCSIG$i) (result i32)
|
||||
(local $0 i32)
|
||||
i32.const 24
|
||||
i32.const 3
|
||||
@ -411,7 +424,7 @@
|
||||
call $~lib/map/Map<~lib/string/String,usize>#clear
|
||||
local.get $0
|
||||
)
|
||||
(func $~lib/map/Map<usize,~lib/string/String>#constructor (; 6 ;) (type $FUNCSIG$i) (result i32)
|
||||
(func $~lib/map/Map<usize,~lib/string/String>#constructor (; 7 ;) (type $FUNCSIG$i) (result i32)
|
||||
(local $0 i32)
|
||||
i32.const 24
|
||||
i32.const 4
|
||||
@ -438,7 +451,15 @@
|
||||
call $~lib/map/Map<~lib/string/String,usize>#clear
|
||||
local.get $0
|
||||
)
|
||||
(func $~lib/util/hash/hashStr (; 7 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
|
||||
(func $~lib/string/String#get:length (; 8 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
|
||||
local.get $0
|
||||
i32.const 16
|
||||
i32.sub
|
||||
i32.load offset=12
|
||||
i32.const 1
|
||||
i32.shr_u
|
||||
)
|
||||
(func $~lib/util/hash/hashStr (; 9 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
|
||||
(local $1 i32)
|
||||
(local $2 i32)
|
||||
(local $3 i32)
|
||||
@ -448,11 +469,7 @@
|
||||
if
|
||||
block $break|0
|
||||
local.get $0
|
||||
i32.const 16
|
||||
i32.sub
|
||||
i32.load offset=12
|
||||
i32.const 1
|
||||
i32.shr_u
|
||||
call $~lib/string/String#get:length
|
||||
i32.const 1
|
||||
i32.shl
|
||||
local.set $3
|
||||
@ -482,7 +499,7 @@
|
||||
end
|
||||
local.get $1
|
||||
)
|
||||
(func $~lib/util/string/compareImpl (; 8 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
|
||||
(func $~lib/util/string/compareImpl (; 10 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
|
||||
(local $3 i32)
|
||||
loop $continue|0
|
||||
local.get $2
|
||||
@ -515,7 +532,7 @@
|
||||
end
|
||||
local.get $3
|
||||
)
|
||||
(func $~lib/string/String.__eq (; 9 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
(func $~lib/string/String.__eq (; 11 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
(local $2 i32)
|
||||
local.get $0
|
||||
local.get $1
|
||||
@ -532,18 +549,10 @@
|
||||
select
|
||||
br_if $folding-inner0
|
||||
local.get $0
|
||||
i32.const 16
|
||||
i32.sub
|
||||
i32.load offset=12
|
||||
i32.const 1
|
||||
i32.shr_u
|
||||
call $~lib/string/String#get:length
|
||||
local.tee $2
|
||||
local.get $1
|
||||
i32.const 16
|
||||
i32.sub
|
||||
i32.load offset=12
|
||||
i32.const 1
|
||||
i32.shr_u
|
||||
call $~lib/string/String#get:length
|
||||
i32.ne
|
||||
br_if $folding-inner0
|
||||
local.get $0
|
||||
@ -555,7 +564,7 @@
|
||||
end
|
||||
i32.const 0
|
||||
)
|
||||
(func $~lib/map/Map<~lib/string/String,usize>#find (; 10 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
(func $~lib/map/Map<~lib/string/String,usize>#find (; 12 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
local.get $0
|
||||
i32.load
|
||||
local.get $0
|
||||
@ -596,7 +605,7 @@
|
||||
end
|
||||
i32.const 0
|
||||
)
|
||||
(func $~lib/map/Map<~lib/string/String,usize>#rehash (; 11 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32)
|
||||
(func $~lib/map/Map<~lib/string/String,usize>#rehash (; 13 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32)
|
||||
(local $2 i32)
|
||||
(local $3 i32)
|
||||
(local $4 i32)
|
||||
@ -703,7 +712,7 @@
|
||||
i32.load offset=20
|
||||
i32.store offset=16
|
||||
)
|
||||
(func $~lib/map/Map<~lib/string/String,usize>#set (; 12 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32)
|
||||
(func $~lib/map/Map<~lib/string/String,usize>#set (; 14 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32)
|
||||
(local $2 i32)
|
||||
(local $3 i32)
|
||||
(local $4 i32)
|
||||
@ -792,7 +801,7 @@
|
||||
i32.store
|
||||
end
|
||||
)
|
||||
(func $~lib/util/hash/hash32 (; 13 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
|
||||
(func $~lib/util/hash/hash32 (; 15 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
|
||||
local.get $0
|
||||
i32.const 255
|
||||
i32.and
|
||||
@ -823,7 +832,7 @@
|
||||
i32.const 16777619
|
||||
i32.mul
|
||||
)
|
||||
(func $~lib/map/Map<usize,~lib/string/String>#find (; 14 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
|
||||
(func $~lib/map/Map<usize,~lib/string/String>#find (; 16 ;) (type $FUNCSIG$iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
|
||||
local.get $0
|
||||
i32.load
|
||||
local.get $0
|
||||
@ -864,7 +873,7 @@
|
||||
end
|
||||
i32.const 0
|
||||
)
|
||||
(func $~lib/map/Map<usize,~lib/string/String>#rehash (; 15 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32)
|
||||
(func $~lib/map/Map<usize,~lib/string/String>#rehash (; 17 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32)
|
||||
(local $2 i32)
|
||||
(local $3 i32)
|
||||
(local $4 i32)
|
||||
@ -971,7 +980,7 @@
|
||||
i32.load offset=20
|
||||
i32.store offset=16
|
||||
)
|
||||
(func $~lib/map/Map<usize,~lib/string/String>#set (; 16 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32)
|
||||
(func $~lib/map/Map<usize,~lib/string/String>#set (; 18 ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32)
|
||||
(local $2 i32)
|
||||
(local $3 i32)
|
||||
(local $4 i32)
|
||||
@ -1064,7 +1073,7 @@
|
||||
i32.store
|
||||
end
|
||||
)
|
||||
(func $~lib/symbol/_Symbol.for (; 17 ;) (type $FUNCSIG$i) (result i32)
|
||||
(func $~lib/symbol/_Symbol.for (; 19 ;) (type $FUNCSIG$i) (result i32)
|
||||
(local $0 i32)
|
||||
global.get $~lib/symbol/stringToId
|
||||
if
|
||||
@ -1110,7 +1119,7 @@
|
||||
call $~lib/map/Map<usize,~lib/string/String>#set
|
||||
local.get $0
|
||||
)
|
||||
(func $~lib/map/Map<usize,~lib/string/String>#has (; 18 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
(func $~lib/map/Map<usize,~lib/string/String>#has (; 20 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
local.get $0
|
||||
local.get $1
|
||||
local.get $1
|
||||
@ -1119,7 +1128,7 @@
|
||||
i32.const 0
|
||||
i32.ne
|
||||
)
|
||||
(func $~lib/map/Map<usize,~lib/string/String>#get (; 19 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
(func $~lib/map/Map<usize,~lib/string/String>#get (; 21 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
local.get $0
|
||||
local.get $1
|
||||
local.get $1
|
||||
@ -1133,7 +1142,7 @@
|
||||
unreachable
|
||||
end
|
||||
)
|
||||
(func $~lib/symbol/_Symbol.keyFor (; 20 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
|
||||
(func $~lib/symbol/_Symbol.keyFor (; 22 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
|
||||
global.get $~lib/symbol/idToString
|
||||
if (result i32)
|
||||
global.get $~lib/symbol/idToString
|
||||
@ -1150,7 +1159,7 @@
|
||||
i32.const 0
|
||||
end
|
||||
)
|
||||
(func $~lib/memory/memory.copy (; 21 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32)
|
||||
(func $~lib/memory/memory.copy (; 23 ;) (type $FUNCSIG$viii) (param $0 i32) (param $1 i32) (param $2 i32)
|
||||
(local $3 i32)
|
||||
(local $4 i32)
|
||||
block $~lib/util/memory/memmove|inlined.0
|
||||
@ -1323,32 +1332,24 @@
|
||||
end
|
||||
end
|
||||
)
|
||||
(func $~lib/string/String#concat (; 22 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
(func $~lib/string/String#concat (; 24 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
(local $2 i32)
|
||||
(local $3 i32)
|
||||
(local $4 i32)
|
||||
local.get $0
|
||||
call $~lib/string/String#get:length
|
||||
i32.const 1
|
||||
i32.shl
|
||||
local.tee $3
|
||||
local.get $1
|
||||
i32.const 656
|
||||
local.get $1
|
||||
select
|
||||
local.tee $1
|
||||
i32.const 16
|
||||
i32.sub
|
||||
i32.load offset=12
|
||||
i32.const 1
|
||||
i32.shr_u
|
||||
call $~lib/string/String#get:length
|
||||
i32.const 1
|
||||
i32.shl
|
||||
local.tee $4
|
||||
local.get $0
|
||||
i32.const 16
|
||||
i32.sub
|
||||
i32.load offset=12
|
||||
i32.const 1
|
||||
i32.shr_u
|
||||
i32.const 1
|
||||
i32.shl
|
||||
local.tee $3
|
||||
i32.add
|
||||
local.tee $2
|
||||
i32.eqz
|
||||
@ -1371,7 +1372,7 @@
|
||||
call $~lib/memory/memory.copy
|
||||
local.get $2
|
||||
)
|
||||
(func $~lib/string/String.__concat (; 23 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
(func $~lib/string/String.__concat (; 25 ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
local.get $0
|
||||
i32.const 656
|
||||
local.get $0
|
||||
@ -1379,7 +1380,7 @@
|
||||
local.get $1
|
||||
call $~lib/string/String#concat
|
||||
)
|
||||
(func $~lib/symbol/_Symbol#toString (; 24 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
|
||||
(func $~lib/symbol/_Symbol#toString (; 26 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
|
||||
i32.const 624
|
||||
block $break|0 (result i32)
|
||||
block $case11|0
|
||||
@ -1462,31 +1463,12 @@
|
||||
i32.const 680
|
||||
call $~lib/string/String.__concat
|
||||
)
|
||||
(func $start:std/symbol (; 25 ;) (type $FUNCSIG$v)
|
||||
(local $0 i32)
|
||||
global.get $~lib/symbol/nextId
|
||||
local.tee $0
|
||||
i32.const 1
|
||||
i32.add
|
||||
global.set $~lib/symbol/nextId
|
||||
local.get $0
|
||||
i32.eqz
|
||||
if
|
||||
unreachable
|
||||
end
|
||||
local.get $0
|
||||
(func $start:std/symbol (; 27 ;) (type $FUNCSIG$v)
|
||||
i32.const 24
|
||||
call $~lib/symbol/Symbol
|
||||
global.set $std/symbol/sym1
|
||||
global.get $~lib/symbol/nextId
|
||||
local.tee $0
|
||||
i32.const 1
|
||||
i32.add
|
||||
global.set $~lib/symbol/nextId
|
||||
local.get $0
|
||||
i32.eqz
|
||||
if
|
||||
unreachable
|
||||
end
|
||||
local.get $0
|
||||
i32.const 24
|
||||
call $~lib/symbol/Symbol
|
||||
global.set $std/symbol/sym2
|
||||
global.get $std/symbol/sym1
|
||||
global.get $std/symbol/sym2
|
||||
@ -1572,17 +1554,8 @@
|
||||
call $~lib/builtins/abort
|
||||
unreachable
|
||||
end
|
||||
global.get $~lib/symbol/nextId
|
||||
local.tee $0
|
||||
i32.const 1
|
||||
i32.add
|
||||
global.set $~lib/symbol/nextId
|
||||
local.get $0
|
||||
i32.eqz
|
||||
if
|
||||
unreachable
|
||||
end
|
||||
local.get $0
|
||||
i32.const 0
|
||||
call $~lib/symbol/Symbol
|
||||
call $~lib/symbol/_Symbol#toString
|
||||
i32.const 704
|
||||
call $~lib/string/String.__eq
|
||||
@ -1639,10 +1612,10 @@
|
||||
unreachable
|
||||
end
|
||||
)
|
||||
(func $start (; 26 ;) (type $FUNCSIG$v)
|
||||
(func $start (; 28 ;) (type $FUNCSIG$v)
|
||||
call $start:std/symbol
|
||||
)
|
||||
(func $null (; 27 ;) (type $FUNCSIG$v)
|
||||
(func $null (; 29 ;) (type $FUNCSIG$v)
|
||||
nop
|
||||
)
|
||||
)
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -20,10 +20,10 @@
|
||||
local.get $0
|
||||
i32.const 2
|
||||
i32.eq
|
||||
br_if $case4|0
|
||||
local.get $0
|
||||
i32.const 3
|
||||
i32.eq
|
||||
i32.or
|
||||
br_if $case4|0
|
||||
br $case2|0
|
||||
end
|
||||
@ -45,10 +45,10 @@
|
||||
local.get $0
|
||||
i32.const 2
|
||||
i32.eq
|
||||
br_if $case2|0
|
||||
local.get $0
|
||||
i32.const 3
|
||||
i32.eq
|
||||
i32.or
|
||||
br_if $case2|0
|
||||
br $break|0
|
||||
end
|
||||
@ -60,7 +60,27 @@
|
||||
end
|
||||
i32.const 0
|
||||
)
|
||||
(func $start:switch (; 3 ;) (type $FUNCSIG$v)
|
||||
(func $switch/doSwitchBreakCase (; 3 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
|
||||
local.get $0
|
||||
i32.const 1
|
||||
i32.ne
|
||||
if
|
||||
i32.const 2
|
||||
return
|
||||
end
|
||||
i32.const 1
|
||||
)
|
||||
(func $switch/doSwitchBreakDefault (; 4 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
|
||||
local.get $0
|
||||
i32.const 1
|
||||
i32.eq
|
||||
if
|
||||
i32.const 1
|
||||
return
|
||||
end
|
||||
i32.const 2
|
||||
)
|
||||
(func $start:switch (; 5 ;) (type $FUNCSIG$v)
|
||||
i32.const 0
|
||||
call $switch/doSwitch
|
||||
if
|
||||
@ -229,11 +249,155 @@
|
||||
call $~lib/builtins/abort
|
||||
unreachable
|
||||
end
|
||||
i32.const 0
|
||||
call $switch/doSwitchBreakCase
|
||||
i32.const 2
|
||||
i32.ne
|
||||
if
|
||||
i32.const 0
|
||||
i32.const 24
|
||||
i32.const 51
|
||||
i32.const 0
|
||||
call $~lib/builtins/abort
|
||||
unreachable
|
||||
end
|
||||
i32.const 1
|
||||
call $switch/doSwitchBreakCase
|
||||
i32.const 1
|
||||
i32.ne
|
||||
if
|
||||
i32.const 0
|
||||
i32.const 24
|
||||
i32.const 52
|
||||
i32.const 0
|
||||
call $~lib/builtins/abort
|
||||
unreachable
|
||||
end
|
||||
i32.const 2
|
||||
call $switch/doSwitchBreakCase
|
||||
i32.const 2
|
||||
i32.ne
|
||||
if
|
||||
i32.const 0
|
||||
i32.const 24
|
||||
i32.const 53
|
||||
i32.const 0
|
||||
call $~lib/builtins/abort
|
||||
unreachable
|
||||
end
|
||||
i32.const 0
|
||||
call $switch/doSwitchBreakDefault
|
||||
i32.const 2
|
||||
i32.ne
|
||||
if
|
||||
i32.const 0
|
||||
i32.const 24
|
||||
i32.const 62
|
||||
i32.const 0
|
||||
call $~lib/builtins/abort
|
||||
unreachable
|
||||
end
|
||||
i32.const 1
|
||||
call $switch/doSwitchBreakDefault
|
||||
i32.const 1
|
||||
i32.ne
|
||||
if
|
||||
i32.const 0
|
||||
i32.const 24
|
||||
i32.const 63
|
||||
i32.const 0
|
||||
call $~lib/builtins/abort
|
||||
unreachable
|
||||
end
|
||||
i32.const 2
|
||||
call $switch/doSwitchBreakDefault
|
||||
i32.const 2
|
||||
i32.ne
|
||||
if
|
||||
i32.const 0
|
||||
i32.const 24
|
||||
i32.const 64
|
||||
i32.const 0
|
||||
call $~lib/builtins/abort
|
||||
unreachable
|
||||
end
|
||||
i32.const 0
|
||||
call $switch/doSwitchBreakCase
|
||||
i32.const 2
|
||||
i32.ne
|
||||
if
|
||||
i32.const 0
|
||||
i32.const 24
|
||||
i32.const 73
|
||||
i32.const 0
|
||||
call $~lib/builtins/abort
|
||||
unreachable
|
||||
end
|
||||
i32.const 1
|
||||
call $switch/doSwitchBreakCase
|
||||
i32.const 1
|
||||
i32.ne
|
||||
if
|
||||
i32.const 0
|
||||
i32.const 24
|
||||
i32.const 74
|
||||
i32.const 0
|
||||
call $~lib/builtins/abort
|
||||
unreachable
|
||||
end
|
||||
i32.const 2
|
||||
call $switch/doSwitchBreakCase
|
||||
i32.const 2
|
||||
i32.ne
|
||||
if
|
||||
i32.const 0
|
||||
i32.const 24
|
||||
i32.const 75
|
||||
i32.const 0
|
||||
call $~lib/builtins/abort
|
||||
unreachable
|
||||
end
|
||||
i32.const 0
|
||||
call $switch/doSwitchBreakDefault
|
||||
i32.const 2
|
||||
i32.ne
|
||||
if
|
||||
i32.const 0
|
||||
i32.const 24
|
||||
i32.const 84
|
||||
i32.const 0
|
||||
call $~lib/builtins/abort
|
||||
unreachable
|
||||
end
|
||||
i32.const 1
|
||||
call $switch/doSwitchBreakDefault
|
||||
i32.const 1
|
||||
i32.ne
|
||||
if
|
||||
i32.const 0
|
||||
i32.const 24
|
||||
i32.const 85
|
||||
i32.const 0
|
||||
call $~lib/builtins/abort
|
||||
unreachable
|
||||
end
|
||||
i32.const 2
|
||||
call $switch/doSwitchBreakDefault
|
||||
i32.const 2
|
||||
i32.ne
|
||||
if
|
||||
i32.const 0
|
||||
i32.const 24
|
||||
i32.const 86
|
||||
i32.const 0
|
||||
call $~lib/builtins/abort
|
||||
unreachable
|
||||
end
|
||||
)
|
||||
(func $start (; 4 ;) (type $FUNCSIG$v)
|
||||
(func $start (; 6 ;) (type $FUNCSIG$v)
|
||||
call $start:switch
|
||||
)
|
||||
(func $null (; 5 ;) (type $FUNCSIG$v)
|
||||
(func $null (; 7 ;) (type $FUNCSIG$v)
|
||||
nop
|
||||
)
|
||||
)
|
||||
|
@ -8,10 +8,10 @@
|
||||
(export "memory" (memory $0))
|
||||
(start $start)
|
||||
(func $start:unary (; 0 ;) (type $FUNCSIG$v)
|
||||
(local $0 f32)
|
||||
(local $1 f64)
|
||||
(local $2 i32)
|
||||
(local $3 i64)
|
||||
(local $0 i32)
|
||||
(local $1 i64)
|
||||
(local $2 f32)
|
||||
(local $3 f64)
|
||||
global.get $unary/i
|
||||
i32.const 1
|
||||
i32.add
|
||||
@ -56,18 +56,18 @@
|
||||
i32.sub
|
||||
global.set $unary/i
|
||||
global.get $unary/i
|
||||
local.tee $2
|
||||
local.tee $0
|
||||
i32.const 1
|
||||
i32.add
|
||||
global.set $unary/i
|
||||
local.get $2
|
||||
local.get $0
|
||||
global.set $unary/i
|
||||
global.get $unary/i
|
||||
local.tee $2
|
||||
local.tee $0
|
||||
i32.const 1
|
||||
i32.sub
|
||||
global.set $unary/i
|
||||
local.get $2
|
||||
local.get $0
|
||||
global.set $unary/i
|
||||
global.get $unary/I
|
||||
i64.const 1
|
||||
@ -114,18 +114,18 @@
|
||||
i64.sub
|
||||
global.set $unary/I
|
||||
global.get $unary/I
|
||||
local.tee $3
|
||||
local.tee $1
|
||||
i64.const 1
|
||||
i64.add
|
||||
global.set $unary/I
|
||||
local.get $3
|
||||
local.get $1
|
||||
global.set $unary/I
|
||||
global.get $unary/I
|
||||
local.tee $3
|
||||
local.tee $1
|
||||
i64.const 1
|
||||
i64.sub
|
||||
global.set $unary/I
|
||||
local.get $3
|
||||
local.get $1
|
||||
global.set $unary/I
|
||||
global.get $unary/f
|
||||
f32.const 1
|
||||
@ -153,11 +153,10 @@
|
||||
f32.neg
|
||||
global.set $unary/f
|
||||
global.get $unary/f
|
||||
local.tee $0
|
||||
f32.const 0
|
||||
f32.eq
|
||||
global.set $unary/i
|
||||
local.get $0
|
||||
global.get $unary/f
|
||||
f32.const 1
|
||||
f32.add
|
||||
global.set $unary/f
|
||||
@ -166,18 +165,18 @@
|
||||
f32.sub
|
||||
global.set $unary/f
|
||||
global.get $unary/f
|
||||
local.tee $0
|
||||
local.tee $2
|
||||
f32.const 1
|
||||
f32.add
|
||||
global.set $unary/f
|
||||
local.get $0
|
||||
local.get $2
|
||||
global.set $unary/f
|
||||
global.get $unary/f
|
||||
local.tee $0
|
||||
local.tee $2
|
||||
f32.const 1
|
||||
f32.sub
|
||||
global.set $unary/f
|
||||
local.get $0
|
||||
local.get $2
|
||||
global.set $unary/f
|
||||
global.get $unary/F
|
||||
f64.const 1
|
||||
@ -205,12 +204,11 @@
|
||||
f64.neg
|
||||
global.set $unary/F
|
||||
global.get $unary/F
|
||||
local.tee $1
|
||||
f64.const 0
|
||||
f64.eq
|
||||
i64.extend_i32_u
|
||||
global.set $unary/I
|
||||
local.get $1
|
||||
global.get $unary/F
|
||||
f64.const 1
|
||||
f64.add
|
||||
global.set $unary/F
|
||||
@ -219,18 +217,18 @@
|
||||
f64.sub
|
||||
global.set $unary/F
|
||||
global.get $unary/F
|
||||
local.tee $1
|
||||
local.tee $3
|
||||
f64.const 1
|
||||
f64.add
|
||||
global.set $unary/F
|
||||
local.get $1
|
||||
local.get $3
|
||||
global.set $unary/F
|
||||
global.get $unary/F
|
||||
local.tee $1
|
||||
local.tee $3
|
||||
f64.const 1
|
||||
f64.sub
|
||||
global.set $unary/F
|
||||
local.get $1
|
||||
local.get $3
|
||||
global.set $unary/F
|
||||
)
|
||||
(func $start (; 1 ;) (type $FUNCSIG$v)
|
||||
|
Loading…
x
Reference in New Issue
Block a user