mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-05-23 04:31:27 +00:00
Inline isNaN and isFinite
Looking at our existing tests it seems that inlining these can be performed by reusing locals most of the time, and sometimes enables erasing quite a bit of unnecessary code when optimizing.
This commit is contained in:
parent
cf8e3dfa12
commit
34839353fd
@ -12,8 +12,8 @@
|
|||||||
@builtin export declare function isArray<T>(value?: T): bool;
|
@builtin export declare function isArray<T>(value?: T): bool;
|
||||||
@builtin export declare function isDefined(expression: void): bool;
|
@builtin export declare function isDefined(expression: void): bool;
|
||||||
@builtin export declare function isConstant(expression: void): bool;
|
@builtin export declare function isConstant(expression: void): bool;
|
||||||
export function isNaN<T>(value: T): bool { return value != value; }
|
@inline export function isNaN<T>(value: T): bool { return value != value; }
|
||||||
export function isFinite<T>(value: T): bool { return value - value == 0; }
|
@inline export function isFinite<T>(value: T): bool { return value - value == 0; }
|
||||||
|
|
||||||
@builtin export declare function clz<T>(value: T): T;
|
@builtin export declare function clz<T>(value: T): T;
|
||||||
@builtin export declare function ctz<T>(value: T): T;
|
@builtin export declare function ctz<T>(value: T): T;
|
||||||
|
@ -2,9 +2,7 @@
|
|||||||
(type $FFF (func (param f64 f64) (result f64)))
|
(type $FFF (func (param f64 f64) (result f64)))
|
||||||
(type $FiF (func (param f64 i32) (result f64)))
|
(type $FiF (func (param f64 i32) (result f64)))
|
||||||
(type $fff (func (param f32 f32) (result f32)))
|
(type $fff (func (param f32 f32) (result f32)))
|
||||||
(type $fi (func (param f32) (result i32)))
|
|
||||||
(type $fif (func (param f32 i32) (result f32)))
|
(type $fif (func (param f32 i32) (result f32)))
|
||||||
(type $Fi (func (param f64) (result i32)))
|
|
||||||
(type $v (func))
|
(type $v (func))
|
||||||
(global $binary/b (mut i32) (i32.const 0))
|
(global $binary/b (mut i32) (i32.const 0))
|
||||||
(global $binary/i (mut i32) (i32.const 0))
|
(global $binary/i (mut i32) (i32.const 0))
|
||||||
@ -1555,13 +1553,7 @@
|
|||||||
(f64.const 1.e+300)
|
(f64.const 1.e+300)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
(func $~lib/builtins/isNaN<f32> (; 2 ;) (type $fi) (param $0 f32) (result i32)
|
(func $~lib/math/NativeMathf.mod (; 2 ;) (type $fff) (param $0 f32) (param $1 f32) (result f32)
|
||||||
(f32.ne
|
|
||||||
(get_local $0)
|
|
||||||
(get_local $0)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
(func $~lib/math/NativeMathf.mod (; 3 ;) (type $fff) (param $0 f32) (param $1 f32) (result f32)
|
|
||||||
(local $2 i32)
|
(local $2 i32)
|
||||||
(local $3 i32)
|
(local $3 i32)
|
||||||
(local $4 i32)
|
(local $4 i32)
|
||||||
@ -1613,14 +1605,18 @@
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
(set_local $3
|
(set_local $3
|
||||||
(call $~lib/builtins/isNaN<f32>
|
(f32.ne
|
||||||
|
(get_local $1)
|
||||||
(get_local $1)
|
(get_local $1)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
(if
|
(if
|
||||||
(i32.eqz
|
(i32.eqz
|
||||||
(get_local $3)
|
(i32.and
|
||||||
|
(get_local $3)
|
||||||
|
(i32.const 1)
|
||||||
|
)
|
||||||
)
|
)
|
||||||
(set_local $3
|
(set_local $3
|
||||||
(i32.eq
|
(i32.eq
|
||||||
@ -1630,7 +1626,10 @@
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
(if
|
(if
|
||||||
(get_local $3)
|
(i32.and
|
||||||
|
(get_local $3)
|
||||||
|
(i32.const 1)
|
||||||
|
)
|
||||||
(return
|
(return
|
||||||
(f32.div
|
(f32.div
|
||||||
(tee_local $0
|
(tee_local $0
|
||||||
@ -1902,7 +1901,7 @@
|
|||||||
(get_local $0)
|
(get_local $0)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
(func $~lib/math/NativeMathf.scalbn (; 4 ;) (type $fif) (param $0 f32) (param $1 i32) (result f32)
|
(func $~lib/math/NativeMathf.scalbn (; 3 ;) (type $fif) (param $0 f32) (param $1 i32) (result f32)
|
||||||
(local $2 f32)
|
(local $2 f32)
|
||||||
(set_local $2
|
(set_local $2
|
||||||
(get_local $0)
|
(get_local $0)
|
||||||
@ -2014,7 +2013,7 @@
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
(func $~lib/math/NativeMathf.pow (; 5 ;) (type $fff) (param $0 f32) (param $1 f32) (result f32)
|
(func $~lib/math/NativeMathf.pow (; 4 ;) (type $fff) (param $0 f32) (param $1 f32) (result f32)
|
||||||
(local $2 f32)
|
(local $2 f32)
|
||||||
(local $3 f32)
|
(local $3 f32)
|
||||||
(local $4 i32)
|
(local $4 i32)
|
||||||
@ -3201,13 +3200,7 @@
|
|||||||
(f32.const 1.0000000031710769e-30)
|
(f32.const 1.0000000031710769e-30)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
(func $~lib/builtins/isNaN<f64> (; 6 ;) (type $Fi) (param $0 f64) (result i32)
|
(func $~lib/math/NativeMath.mod (; 5 ;) (type $FFF) (param $0 f64) (param $1 f64) (result f64)
|
||||||
(f64.ne
|
|
||||||
(get_local $0)
|
|
||||||
(get_local $0)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
(func $~lib/math/NativeMath.mod (; 7 ;) (type $FFF) (param $0 f64) (param $1 f64) (result f64)
|
|
||||||
(local $2 i64)
|
(local $2 i64)
|
||||||
(local $3 i32)
|
(local $3 i32)
|
||||||
(local $4 i64)
|
(local $4 i64)
|
||||||
@ -3267,7 +3260,8 @@
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
(set_local $7
|
(set_local $7
|
||||||
(call $~lib/builtins/isNaN<f64>
|
(f64.ne
|
||||||
|
(get_local $1)
|
||||||
(get_local $1)
|
(get_local $1)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
@ -3581,7 +3575,7 @@
|
|||||||
(get_local $0)
|
(get_local $0)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
(func $start (; 8 ;) (type $v)
|
(func $start (; 6 ;) (type $v)
|
||||||
(drop
|
(drop
|
||||||
(i32.rem_s
|
(i32.rem_s
|
||||||
(get_global $binary/i)
|
(get_global $binary/i)
|
||||||
|
@ -2,9 +2,7 @@
|
|||||||
(type $FFF (func (param f64 f64) (result f64)))
|
(type $FFF (func (param f64 f64) (result f64)))
|
||||||
(type $FiF (func (param f64 i32) (result f64)))
|
(type $FiF (func (param f64 i32) (result f64)))
|
||||||
(type $fff (func (param f32 f32) (result f32)))
|
(type $fff (func (param f32 f32) (result f32)))
|
||||||
(type $fi (func (param f32) (result i32)))
|
|
||||||
(type $fif (func (param f32 i32) (result f32)))
|
(type $fif (func (param f32 i32) (result f32)))
|
||||||
(type $Fi (func (param f64) (result i32)))
|
|
||||||
(type $v (func))
|
(type $v (func))
|
||||||
(global $binary/b (mut i32) (i32.const 0))
|
(global $binary/b (mut i32) (i32.const 0))
|
||||||
(global $binary/i (mut i32) (i32.const 0))
|
(global $binary/i (mut i32) (i32.const 0))
|
||||||
@ -1692,13 +1690,7 @@
|
|||||||
(get_local $13)
|
(get_local $13)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
(func $~lib/builtins/isNaN<f32> (; 2 ;) (type $fi) (param $0 f32) (result i32)
|
(func $~lib/math/NativeMathf.mod (; 2 ;) (type $fff) (param $0 f32) (param $1 f32) (result f32)
|
||||||
(f32.ne
|
|
||||||
(get_local $0)
|
|
||||||
(get_local $0)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
(func $~lib/math/NativeMathf.mod (; 3 ;) (type $fff) (param $0 f32) (param $1 f32) (result f32)
|
|
||||||
(local $2 i32)
|
(local $2 i32)
|
||||||
(local $3 i32)
|
(local $3 i32)
|
||||||
(local $4 i32)
|
(local $4 i32)
|
||||||
@ -1741,29 +1733,38 @@
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
(if
|
(if
|
||||||
(if (result i32)
|
(i32.and
|
||||||
(tee_local $7
|
(if (result i32)
|
||||||
(if (result i32)
|
(i32.and
|
||||||
(tee_local $7
|
(tee_local $7
|
||||||
(i32.eq
|
(if (result i32)
|
||||||
(i32.shl
|
(tee_local $7
|
||||||
(get_local $3)
|
(i32.eq
|
||||||
(i32.const 1)
|
(i32.shl
|
||||||
|
(get_local $3)
|
||||||
|
(i32.const 1)
|
||||||
|
)
|
||||||
|
(i32.const 0)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
(get_local $7)
|
||||||
|
(block $~lib/builtins/isNaN<f32>|inlined.1 (result i32)
|
||||||
|
(f32.ne
|
||||||
|
(get_local $1)
|
||||||
|
(get_local $1)
|
||||||
|
)
|
||||||
)
|
)
|
||||||
(i32.const 0)
|
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
(get_local $7)
|
(i32.const 1)
|
||||||
(call $~lib/builtins/isNaN<f32>
|
)
|
||||||
(get_local $1)
|
(get_local $7)
|
||||||
)
|
(i32.eq
|
||||||
|
(get_local $4)
|
||||||
|
(i32.const 255)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
(get_local $7)
|
(i32.const 1)
|
||||||
(i32.eq
|
|
||||||
(get_local $4)
|
|
||||||
(i32.const 255)
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
(return
|
(return
|
||||||
(f32.div
|
(f32.div
|
||||||
@ -2119,7 +2120,7 @@
|
|||||||
(get_local $2)
|
(get_local $2)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
(func $~lib/math/NativeMathf.scalbn (; 4 ;) (type $fif) (param $0 f32) (param $1 i32) (result f32)
|
(func $~lib/math/NativeMathf.scalbn (; 3 ;) (type $fif) (param $0 f32) (param $1 i32) (result f32)
|
||||||
(local $2 f32)
|
(local $2 f32)
|
||||||
(set_local $2
|
(set_local $2
|
||||||
(get_local $0)
|
(get_local $0)
|
||||||
@ -2235,7 +2236,7 @@
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
(func $~lib/math/NativeMathf.pow (; 5 ;) (type $fff) (param $0 f32) (param $1 f32) (result f32)
|
(func $~lib/math/NativeMathf.pow (; 4 ;) (type $fff) (param $0 f32) (param $1 f32) (result f32)
|
||||||
(local $2 i32)
|
(local $2 i32)
|
||||||
(local $3 i32)
|
(local $3 i32)
|
||||||
(local $4 i32)
|
(local $4 i32)
|
||||||
@ -3550,13 +3551,7 @@
|
|||||||
(get_local $11)
|
(get_local $11)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
(func $~lib/builtins/isNaN<f64> (; 6 ;) (type $Fi) (param $0 f64) (result i32)
|
(func $~lib/math/NativeMath.mod (; 5 ;) (type $FFF) (param $0 f64) (param $1 f64) (result f64)
|
||||||
(f64.ne
|
|
||||||
(get_local $0)
|
|
||||||
(get_local $0)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
(func $~lib/math/NativeMath.mod (; 7 ;) (type $FFF) (param $0 f64) (param $1 f64) (result f64)
|
|
||||||
(local $2 i64)
|
(local $2 i64)
|
||||||
(local $3 i64)
|
(local $3 i64)
|
||||||
(local $4 i32)
|
(local $4 i32)
|
||||||
@ -3605,29 +3600,38 @@
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
(if
|
(if
|
||||||
(if (result i32)
|
(i32.and
|
||||||
(tee_local $7
|
(if (result i32)
|
||||||
(if (result i32)
|
(i32.and
|
||||||
(tee_local $7
|
(tee_local $7
|
||||||
(i64.eq
|
(if (result i32)
|
||||||
(i64.shl
|
(tee_local $7
|
||||||
(get_local $3)
|
(i64.eq
|
||||||
(i64.const 1)
|
(i64.shl
|
||||||
|
(get_local $3)
|
||||||
|
(i64.const 1)
|
||||||
|
)
|
||||||
|
(i64.const 0)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
(get_local $7)
|
||||||
|
(block $~lib/builtins/isNaN<f64>|inlined.1 (result i32)
|
||||||
|
(f64.ne
|
||||||
|
(get_local $1)
|
||||||
|
(get_local $1)
|
||||||
|
)
|
||||||
)
|
)
|
||||||
(i64.const 0)
|
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
(get_local $7)
|
(i32.const 1)
|
||||||
(call $~lib/builtins/isNaN<f64>
|
)
|
||||||
(get_local $1)
|
(get_local $7)
|
||||||
)
|
(i32.eq
|
||||||
|
(get_local $4)
|
||||||
|
(i32.const 2047)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
(get_local $7)
|
(i32.const 1)
|
||||||
(i32.eq
|
|
||||||
(get_local $4)
|
|
||||||
(i32.const 2047)
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
(return
|
(return
|
||||||
(f64.div
|
(f64.div
|
||||||
@ -3996,7 +4000,7 @@
|
|||||||
(get_local $2)
|
(get_local $2)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
(func $start (; 8 ;) (type $v)
|
(func $start (; 6 ;) (type $v)
|
||||||
(drop
|
(drop
|
||||||
(i32.lt_s
|
(i32.lt_s
|
||||||
(get_global $binary/i)
|
(get_global $binary/i)
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
(module
|
(module
|
||||||
(type $iiiiv (func (param i32 i32 i32 i32)))
|
(type $iiiiv (func (param i32 i32 i32 i32)))
|
||||||
(type $fi (func (param f32) (result i32)))
|
|
||||||
(type $Fi (func (param f64) (result i32)))
|
|
||||||
(type $iiv (func (param i32 i32)))
|
(type $iiv (func (param i32 i32)))
|
||||||
(type $v (func))
|
(type $v (func))
|
||||||
(import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32)))
|
(import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32)))
|
||||||
@ -23,43 +21,13 @@
|
|||||||
(export "table" (table $0))
|
(export "table" (table $0))
|
||||||
(export "test" (func $builtins/test))
|
(export "test" (func $builtins/test))
|
||||||
(start $start)
|
(start $start)
|
||||||
(func $~lib/builtins/isNaN<f32> (; 1 ;) (type $fi) (param $0 f32) (result i32)
|
(func $start~anonymous|0 (; 1 ;) (type $iiv) (param $0 i32) (param $1 i32)
|
||||||
(f32.ne
|
|
||||||
(get_local $0)
|
|
||||||
(get_local $0)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
(func $~lib/builtins/isFinite<f32> (; 2 ;) (type $fi) (param $0 f32) (result i32)
|
|
||||||
(f32.eq
|
|
||||||
(f32.sub
|
|
||||||
(get_local $0)
|
|
||||||
(get_local $0)
|
|
||||||
)
|
|
||||||
(f32.const 0)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
(func $~lib/builtins/isNaN<f64> (; 3 ;) (type $Fi) (param $0 f64) (result i32)
|
|
||||||
(f64.ne
|
|
||||||
(get_local $0)
|
|
||||||
(get_local $0)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
(func $~lib/builtins/isFinite<f64> (; 4 ;) (type $Fi) (param $0 f64) (result i32)
|
|
||||||
(f64.eq
|
|
||||||
(f64.sub
|
|
||||||
(get_local $0)
|
|
||||||
(get_local $0)
|
|
||||||
)
|
|
||||||
(f64.const 0)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
(func $start~anonymous|0 (; 5 ;) (type $iiv) (param $0 i32) (param $1 i32)
|
|
||||||
(nop)
|
(nop)
|
||||||
)
|
)
|
||||||
(func $builtins/test (; 6 ;) (type $v)
|
(func $builtins/test (; 2 ;) (type $v)
|
||||||
(nop)
|
(nop)
|
||||||
)
|
)
|
||||||
(func $start (; 7 ;) (type $v)
|
(func $start (; 3 ;) (type $v)
|
||||||
(set_global $builtins/i
|
(set_global $builtins/i
|
||||||
(i32.const 31)
|
(i32.const 31)
|
||||||
)
|
)
|
||||||
@ -198,96 +166,6 @@
|
|||||||
(unreachable)
|
(unreachable)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
(if
|
|
||||||
(call $~lib/builtins/isNaN<f32>
|
|
||||||
(f32.const 1.25)
|
|
||||||
)
|
|
||||||
(block
|
|
||||||
(call $~lib/env/abort
|
|
||||||
(i32.const 0)
|
|
||||||
(i32.const 8)
|
|
||||||
(i32.const 87)
|
|
||||||
(i32.const 0)
|
|
||||||
)
|
|
||||||
(unreachable)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
(if
|
|
||||||
(i32.ne
|
|
||||||
(call $~lib/builtins/isNaN<f32>
|
|
||||||
(f32.const nan:0x400000)
|
|
||||||
)
|
|
||||||
(i32.const 1)
|
|
||||||
)
|
|
||||||
(block
|
|
||||||
(call $~lib/env/abort
|
|
||||||
(i32.const 0)
|
|
||||||
(i32.const 8)
|
|
||||||
(i32.const 88)
|
|
||||||
(i32.const 0)
|
|
||||||
)
|
|
||||||
(unreachable)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
(if
|
|
||||||
(i32.ne
|
|
||||||
(call $~lib/builtins/isFinite<f32>
|
|
||||||
(f32.const 1.25)
|
|
||||||
)
|
|
||||||
(i32.const 1)
|
|
||||||
)
|
|
||||||
(block
|
|
||||||
(call $~lib/env/abort
|
|
||||||
(i32.const 0)
|
|
||||||
(i32.const 8)
|
|
||||||
(i32.const 89)
|
|
||||||
(i32.const 0)
|
|
||||||
)
|
|
||||||
(unreachable)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
(if
|
|
||||||
(call $~lib/builtins/isFinite<f32>
|
|
||||||
(f32.const inf)
|
|
||||||
)
|
|
||||||
(block
|
|
||||||
(call $~lib/env/abort
|
|
||||||
(i32.const 0)
|
|
||||||
(i32.const 8)
|
|
||||||
(i32.const 90)
|
|
||||||
(i32.const 0)
|
|
||||||
)
|
|
||||||
(unreachable)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
(if
|
|
||||||
(call $~lib/builtins/isFinite<f32>
|
|
||||||
(f32.const -inf)
|
|
||||||
)
|
|
||||||
(block
|
|
||||||
(call $~lib/env/abort
|
|
||||||
(i32.const 0)
|
|
||||||
(i32.const 8)
|
|
||||||
(i32.const 91)
|
|
||||||
(i32.const 0)
|
|
||||||
)
|
|
||||||
(unreachable)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
(if
|
|
||||||
(call $~lib/builtins/isFinite<f32>
|
|
||||||
(f32.const nan:0x400000)
|
|
||||||
)
|
|
||||||
(block
|
|
||||||
(call $~lib/env/abort
|
|
||||||
(i32.const 0)
|
|
||||||
(i32.const 8)
|
|
||||||
(i32.const 92)
|
|
||||||
(i32.const 0)
|
|
||||||
)
|
|
||||||
(unreachable)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
(set_global $builtins/f
|
(set_global $builtins/f
|
||||||
(f32.const nan:0x400000)
|
(f32.const nan:0x400000)
|
||||||
)
|
)
|
||||||
@ -322,104 +200,10 @@
|
|||||||
(f32.const 1)
|
(f32.const 1)
|
||||||
)
|
)
|
||||||
(set_global $builtins/b
|
(set_global $builtins/b
|
||||||
(call $~lib/builtins/isNaN<f32>
|
(i32.const 0)
|
||||||
(f32.const 1.25)
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
(set_global $builtins/b
|
(set_global $builtins/b
|
||||||
(call $~lib/builtins/isFinite<f32>
|
(i32.const 1)
|
||||||
(f32.const 1.25)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
(if
|
|
||||||
(call $~lib/builtins/isNaN<f64>
|
|
||||||
(f64.const 1.25)
|
|
||||||
)
|
|
||||||
(block
|
|
||||||
(call $~lib/env/abort
|
|
||||||
(i32.const 0)
|
|
||||||
(i32.const 8)
|
|
||||||
(i32.const 123)
|
|
||||||
(i32.const 0)
|
|
||||||
)
|
|
||||||
(unreachable)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
(if
|
|
||||||
(i32.ne
|
|
||||||
(call $~lib/builtins/isNaN<f64>
|
|
||||||
(f64.const nan:0x8000000000000)
|
|
||||||
)
|
|
||||||
(i32.const 1)
|
|
||||||
)
|
|
||||||
(block
|
|
||||||
(call $~lib/env/abort
|
|
||||||
(i32.const 0)
|
|
||||||
(i32.const 8)
|
|
||||||
(i32.const 124)
|
|
||||||
(i32.const 0)
|
|
||||||
)
|
|
||||||
(unreachable)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
(if
|
|
||||||
(i32.ne
|
|
||||||
(call $~lib/builtins/isFinite<f64>
|
|
||||||
(f64.const 1.25)
|
|
||||||
)
|
|
||||||
(i32.const 1)
|
|
||||||
)
|
|
||||||
(block
|
|
||||||
(call $~lib/env/abort
|
|
||||||
(i32.const 0)
|
|
||||||
(i32.const 8)
|
|
||||||
(i32.const 125)
|
|
||||||
(i32.const 0)
|
|
||||||
)
|
|
||||||
(unreachable)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
(if
|
|
||||||
(call $~lib/builtins/isFinite<f64>
|
|
||||||
(f64.const inf)
|
|
||||||
)
|
|
||||||
(block
|
|
||||||
(call $~lib/env/abort
|
|
||||||
(i32.const 0)
|
|
||||||
(i32.const 8)
|
|
||||||
(i32.const 126)
|
|
||||||
(i32.const 0)
|
|
||||||
)
|
|
||||||
(unreachable)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
(if
|
|
||||||
(call $~lib/builtins/isFinite<f64>
|
|
||||||
(f64.const -inf)
|
|
||||||
)
|
|
||||||
(block
|
|
||||||
(call $~lib/env/abort
|
|
||||||
(i32.const 0)
|
|
||||||
(i32.const 8)
|
|
||||||
(i32.const 127)
|
|
||||||
(i32.const 0)
|
|
||||||
)
|
|
||||||
(unreachable)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
(if
|
|
||||||
(call $~lib/builtins/isFinite<f64>
|
|
||||||
(f64.const nan:0x8000000000000)
|
|
||||||
)
|
|
||||||
(block
|
|
||||||
(call $~lib/env/abort
|
|
||||||
(i32.const 0)
|
|
||||||
(i32.const 8)
|
|
||||||
(i32.const 128)
|
|
||||||
(i32.const 0)
|
|
||||||
)
|
|
||||||
(unreachable)
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
(set_global $builtins/F
|
(set_global $builtins/F
|
||||||
(f64.const nan:0x8000000000000)
|
(f64.const nan:0x8000000000000)
|
||||||
@ -455,14 +239,10 @@
|
|||||||
(f64.const 1)
|
(f64.const 1)
|
||||||
)
|
)
|
||||||
(set_global $builtins/b
|
(set_global $builtins/b
|
||||||
(call $~lib/builtins/isNaN<f64>
|
(i32.const 0)
|
||||||
(f64.const 1.25)
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
(set_global $builtins/b
|
(set_global $builtins/b
|
||||||
(call $~lib/builtins/isFinite<f64>
|
(i32.const 1)
|
||||||
(f64.const 1.25)
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
(set_global $builtins/i
|
(set_global $builtins/i
|
||||||
(i32.load
|
(i32.load
|
||||||
@ -767,126 +547,6 @@
|
|||||||
(i32.const 2)
|
(i32.const 2)
|
||||||
(get_global $builtins/fn)
|
(get_global $builtins/fn)
|
||||||
)
|
)
|
||||||
(if
|
|
||||||
(i32.eqz
|
|
||||||
(call $~lib/builtins/isNaN<f32>
|
|
||||||
(f32.const nan:0x400000)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
(block
|
|
||||||
(call $~lib/env/abort
|
|
||||||
(i32.const 0)
|
|
||||||
(i32.const 8)
|
|
||||||
(i32.const 271)
|
|
||||||
(i32.const 0)
|
|
||||||
)
|
|
||||||
(unreachable)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
(if
|
|
||||||
(i32.eqz
|
|
||||||
(call $~lib/builtins/isNaN<f64>
|
|
||||||
(f64.const nan:0x8000000000000)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
(block
|
|
||||||
(call $~lib/env/abort
|
|
||||||
(i32.const 0)
|
|
||||||
(i32.const 8)
|
|
||||||
(i32.const 272)
|
|
||||||
(i32.const 0)
|
|
||||||
)
|
|
||||||
(unreachable)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
(if
|
|
||||||
(call $~lib/builtins/isFinite<f32>
|
|
||||||
(f32.const nan:0x400000)
|
|
||||||
)
|
|
||||||
(block
|
|
||||||
(call $~lib/env/abort
|
|
||||||
(i32.const 0)
|
|
||||||
(i32.const 8)
|
|
||||||
(i32.const 273)
|
|
||||||
(i32.const 0)
|
|
||||||
)
|
|
||||||
(unreachable)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
(if
|
|
||||||
(call $~lib/builtins/isFinite<f32>
|
|
||||||
(f32.const inf)
|
|
||||||
)
|
|
||||||
(block
|
|
||||||
(call $~lib/env/abort
|
|
||||||
(i32.const 0)
|
|
||||||
(i32.const 8)
|
|
||||||
(i32.const 274)
|
|
||||||
(i32.const 0)
|
|
||||||
)
|
|
||||||
(unreachable)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
(if
|
|
||||||
(call $~lib/builtins/isFinite<f64>
|
|
||||||
(f64.const nan:0x8000000000000)
|
|
||||||
)
|
|
||||||
(block
|
|
||||||
(call $~lib/env/abort
|
|
||||||
(i32.const 0)
|
|
||||||
(i32.const 8)
|
|
||||||
(i32.const 275)
|
|
||||||
(i32.const 0)
|
|
||||||
)
|
|
||||||
(unreachable)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
(if
|
|
||||||
(call $~lib/builtins/isFinite<f64>
|
|
||||||
(f64.const inf)
|
|
||||||
)
|
|
||||||
(block
|
|
||||||
(call $~lib/env/abort
|
|
||||||
(i32.const 0)
|
|
||||||
(i32.const 8)
|
|
||||||
(i32.const 276)
|
|
||||||
(i32.const 0)
|
|
||||||
)
|
|
||||||
(unreachable)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
(if
|
|
||||||
(i32.eqz
|
|
||||||
(call $~lib/builtins/isFinite<f32>
|
|
||||||
(f32.const 0)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
(block
|
|
||||||
(call $~lib/env/abort
|
|
||||||
(i32.const 0)
|
|
||||||
(i32.const 8)
|
|
||||||
(i32.const 277)
|
|
||||||
(i32.const 0)
|
|
||||||
)
|
|
||||||
(unreachable)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
(if
|
|
||||||
(i32.eqz
|
|
||||||
(call $~lib/builtins/isFinite<f64>
|
|
||||||
(f64.const 0)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
(block
|
|
||||||
(call $~lib/env/abort
|
|
||||||
(i32.const 0)
|
|
||||||
(i32.const 8)
|
|
||||||
(i32.const 278)
|
|
||||||
(i32.const 0)
|
|
||||||
)
|
|
||||||
(unreachable)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
(drop
|
(drop
|
||||||
(i32.load8_s
|
(i32.load8_s
|
||||||
(i32.const 8)
|
(i32.const 8)
|
||||||
@ -993,10 +653,5 @@
|
|||||||
(i32.const 8)
|
(i32.const 8)
|
||||||
(f64.const 1)
|
(f64.const 1)
|
||||||
)
|
)
|
||||||
(drop
|
|
||||||
(call $~lib/builtins/isNaN<f64>
|
|
||||||
(f64.const 1)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
(module
|
(module
|
||||||
(type $iiiiv (func (param i32 i32 i32 i32)))
|
(type $iiiiv (func (param i32 i32 i32 i32)))
|
||||||
(type $fi (func (param f32) (result i32)))
|
|
||||||
(type $Fi (func (param f64) (result i32)))
|
|
||||||
(type $iiv (func (param i32 i32)))
|
(type $iiv (func (param i32 i32)))
|
||||||
(type $v (func))
|
(type $v (func))
|
||||||
(import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32)))
|
(import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32)))
|
||||||
@ -55,47 +53,19 @@
|
|||||||
(export "table" (table $0))
|
(export "table" (table $0))
|
||||||
(export "test" (func $builtins/test))
|
(export "test" (func $builtins/test))
|
||||||
(start $start)
|
(start $start)
|
||||||
(func $~lib/builtins/isNaN<f32> (; 1 ;) (type $fi) (param $0 f32) (result i32)
|
(func $start~anonymous|0 (; 1 ;) (type $iiv) (param $0 i32) (param $1 i32)
|
||||||
(f32.ne
|
|
||||||
(get_local $0)
|
|
||||||
(get_local $0)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
(func $~lib/builtins/isFinite<f32> (; 2 ;) (type $fi) (param $0 f32) (result i32)
|
|
||||||
(f32.eq
|
|
||||||
(f32.sub
|
|
||||||
(get_local $0)
|
|
||||||
(get_local $0)
|
|
||||||
)
|
|
||||||
(f32.const 0)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
(func $~lib/builtins/isNaN<f64> (; 3 ;) (type $Fi) (param $0 f64) (result i32)
|
|
||||||
(f64.ne
|
|
||||||
(get_local $0)
|
|
||||||
(get_local $0)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
(func $~lib/builtins/isFinite<f64> (; 4 ;) (type $Fi) (param $0 f64) (result i32)
|
|
||||||
(f64.eq
|
|
||||||
(f64.sub
|
|
||||||
(get_local $0)
|
|
||||||
(get_local $0)
|
|
||||||
)
|
|
||||||
(f64.const 0)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
(func $start~anonymous|0 (; 5 ;) (type $iiv) (param $0 i32) (param $1 i32)
|
|
||||||
(nop)
|
(nop)
|
||||||
)
|
)
|
||||||
(func $builtins/test (; 6 ;) (type $v)
|
(func $builtins/test (; 2 ;) (type $v)
|
||||||
(nop)
|
(nop)
|
||||||
)
|
)
|
||||||
(func $start (; 7 ;) (type $v)
|
(func $start (; 3 ;) (type $v)
|
||||||
(local $0 i32)
|
(local $0 i32)
|
||||||
(local $1 i32)
|
(local $1 i32)
|
||||||
(local $2 i64)
|
(local $2 i64)
|
||||||
(local $3 i64)
|
(local $3 i64)
|
||||||
|
(local $4 f32)
|
||||||
|
(local $5 f64)
|
||||||
(if
|
(if
|
||||||
(i32.eqz
|
(i32.eqz
|
||||||
(i32.const 1)
|
(i32.const 1)
|
||||||
@ -837,8 +807,17 @@
|
|||||||
(if
|
(if
|
||||||
(i32.eqz
|
(i32.eqz
|
||||||
(i32.eq
|
(i32.eq
|
||||||
(call $~lib/builtins/isNaN<f32>
|
(i32.and
|
||||||
(f32.const 1.25)
|
(block $~lib/builtins/isNaN<f32>|inlined.0 (result i32)
|
||||||
|
(set_local $4
|
||||||
|
(f32.const 1.25)
|
||||||
|
)
|
||||||
|
(f32.ne
|
||||||
|
(get_local $4)
|
||||||
|
(get_local $4)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
(i32.const 1)
|
||||||
)
|
)
|
||||||
(i32.const 0)
|
(i32.const 0)
|
||||||
)
|
)
|
||||||
@ -856,8 +835,17 @@
|
|||||||
(if
|
(if
|
||||||
(i32.eqz
|
(i32.eqz
|
||||||
(i32.eq
|
(i32.eq
|
||||||
(call $~lib/builtins/isNaN<f32>
|
(i32.and
|
||||||
(f32.const nan:0x400000)
|
(block $~lib/builtins/isNaN<f32>|inlined.1 (result i32)
|
||||||
|
(set_local $4
|
||||||
|
(f32.const nan:0x400000)
|
||||||
|
)
|
||||||
|
(f32.ne
|
||||||
|
(get_local $4)
|
||||||
|
(get_local $4)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
(i32.const 1)
|
||||||
)
|
)
|
||||||
(i32.const 1)
|
(i32.const 1)
|
||||||
)
|
)
|
||||||
@ -875,8 +863,20 @@
|
|||||||
(if
|
(if
|
||||||
(i32.eqz
|
(i32.eqz
|
||||||
(i32.eq
|
(i32.eq
|
||||||
(call $~lib/builtins/isFinite<f32>
|
(i32.and
|
||||||
(f32.const 1.25)
|
(block $~lib/builtins/isFinite<f32>|inlined.0 (result i32)
|
||||||
|
(set_local $4
|
||||||
|
(f32.const 1.25)
|
||||||
|
)
|
||||||
|
(f32.eq
|
||||||
|
(f32.sub
|
||||||
|
(get_local $4)
|
||||||
|
(get_local $4)
|
||||||
|
)
|
||||||
|
(f32.const 0)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
(i32.const 1)
|
||||||
)
|
)
|
||||||
(i32.const 1)
|
(i32.const 1)
|
||||||
)
|
)
|
||||||
@ -894,8 +894,20 @@
|
|||||||
(if
|
(if
|
||||||
(i32.eqz
|
(i32.eqz
|
||||||
(i32.eq
|
(i32.eq
|
||||||
(call $~lib/builtins/isFinite<f32>
|
(i32.and
|
||||||
(f32.const inf)
|
(block $~lib/builtins/isFinite<f32>|inlined.1 (result i32)
|
||||||
|
(set_local $4
|
||||||
|
(f32.const inf)
|
||||||
|
)
|
||||||
|
(f32.eq
|
||||||
|
(f32.sub
|
||||||
|
(get_local $4)
|
||||||
|
(get_local $4)
|
||||||
|
)
|
||||||
|
(f32.const 0)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
(i32.const 1)
|
||||||
)
|
)
|
||||||
(i32.const 0)
|
(i32.const 0)
|
||||||
)
|
)
|
||||||
@ -913,10 +925,22 @@
|
|||||||
(if
|
(if
|
||||||
(i32.eqz
|
(i32.eqz
|
||||||
(i32.eq
|
(i32.eq
|
||||||
(call $~lib/builtins/isFinite<f32>
|
(i32.and
|
||||||
(f32.neg
|
(block $~lib/builtins/isFinite<f32>|inlined.2 (result i32)
|
||||||
(f32.const inf)
|
(set_local $4
|
||||||
|
(f32.neg
|
||||||
|
(f32.const inf)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
(f32.eq
|
||||||
|
(f32.sub
|
||||||
|
(get_local $4)
|
||||||
|
(get_local $4)
|
||||||
|
)
|
||||||
|
(f32.const 0)
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
(i32.const 1)
|
||||||
)
|
)
|
||||||
(i32.const 0)
|
(i32.const 0)
|
||||||
)
|
)
|
||||||
@ -934,8 +958,20 @@
|
|||||||
(if
|
(if
|
||||||
(i32.eqz
|
(i32.eqz
|
||||||
(i32.eq
|
(i32.eq
|
||||||
(call $~lib/builtins/isFinite<f32>
|
(i32.and
|
||||||
(f32.const nan:0x400000)
|
(block $~lib/builtins/isFinite<f32>|inlined.3 (result i32)
|
||||||
|
(set_local $4
|
||||||
|
(f32.const nan:0x400000)
|
||||||
|
)
|
||||||
|
(f32.eq
|
||||||
|
(f32.sub
|
||||||
|
(get_local $4)
|
||||||
|
(get_local $4)
|
||||||
|
)
|
||||||
|
(f32.const 0)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
(i32.const 1)
|
||||||
)
|
)
|
||||||
(i32.const 0)
|
(i32.const 0)
|
||||||
)
|
)
|
||||||
@ -1005,13 +1041,34 @@
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
(set_global $builtins/b
|
(set_global $builtins/b
|
||||||
(call $~lib/builtins/isNaN<f32>
|
(i32.and
|
||||||
(f32.const 1.25)
|
(block $~lib/builtins/isNaN<f32>|inlined.2 (result i32)
|
||||||
|
(set_local $4
|
||||||
|
(f32.const 1.25)
|
||||||
|
)
|
||||||
|
(f32.ne
|
||||||
|
(get_local $4)
|
||||||
|
(get_local $4)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
(i32.const 1)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
(set_global $builtins/b
|
(set_global $builtins/b
|
||||||
(call $~lib/builtins/isFinite<f32>
|
(i32.and
|
||||||
(f32.const 1.25)
|
(block $~lib/builtins/isFinite<f32>|inlined.4 (result i32)
|
||||||
|
(set_local $4
|
||||||
|
(f32.const 1.25)
|
||||||
|
)
|
||||||
|
(f32.eq
|
||||||
|
(f32.sub
|
||||||
|
(get_local $4)
|
||||||
|
(get_local $4)
|
||||||
|
)
|
||||||
|
(f32.const 0)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
(i32.const 1)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
(drop
|
(drop
|
||||||
@ -1077,8 +1134,17 @@
|
|||||||
(if
|
(if
|
||||||
(i32.eqz
|
(i32.eqz
|
||||||
(i32.eq
|
(i32.eq
|
||||||
(call $~lib/builtins/isNaN<f64>
|
(i32.and
|
||||||
(f64.const 1.25)
|
(block $~lib/builtins/isNaN<f64>|inlined.0 (result i32)
|
||||||
|
(set_local $5
|
||||||
|
(f64.const 1.25)
|
||||||
|
)
|
||||||
|
(f64.ne
|
||||||
|
(get_local $5)
|
||||||
|
(get_local $5)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
(i32.const 1)
|
||||||
)
|
)
|
||||||
(i32.const 0)
|
(i32.const 0)
|
||||||
)
|
)
|
||||||
@ -1096,8 +1162,17 @@
|
|||||||
(if
|
(if
|
||||||
(i32.eqz
|
(i32.eqz
|
||||||
(i32.eq
|
(i32.eq
|
||||||
(call $~lib/builtins/isNaN<f64>
|
(i32.and
|
||||||
(f64.const nan:0x8000000000000)
|
(block $~lib/builtins/isNaN<f64>|inlined.1 (result i32)
|
||||||
|
(set_local $5
|
||||||
|
(f64.const nan:0x8000000000000)
|
||||||
|
)
|
||||||
|
(f64.ne
|
||||||
|
(get_local $5)
|
||||||
|
(get_local $5)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
(i32.const 1)
|
||||||
)
|
)
|
||||||
(i32.const 1)
|
(i32.const 1)
|
||||||
)
|
)
|
||||||
@ -1115,8 +1190,20 @@
|
|||||||
(if
|
(if
|
||||||
(i32.eqz
|
(i32.eqz
|
||||||
(i32.eq
|
(i32.eq
|
||||||
(call $~lib/builtins/isFinite<f64>
|
(i32.and
|
||||||
(f64.const 1.25)
|
(block $~lib/builtins/isFinite<f64>|inlined.0 (result i32)
|
||||||
|
(set_local $5
|
||||||
|
(f64.const 1.25)
|
||||||
|
)
|
||||||
|
(f64.eq
|
||||||
|
(f64.sub
|
||||||
|
(get_local $5)
|
||||||
|
(get_local $5)
|
||||||
|
)
|
||||||
|
(f64.const 0)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
(i32.const 1)
|
||||||
)
|
)
|
||||||
(i32.const 1)
|
(i32.const 1)
|
||||||
)
|
)
|
||||||
@ -1134,8 +1221,20 @@
|
|||||||
(if
|
(if
|
||||||
(i32.eqz
|
(i32.eqz
|
||||||
(i32.eq
|
(i32.eq
|
||||||
(call $~lib/builtins/isFinite<f64>
|
(i32.and
|
||||||
(f64.const inf)
|
(block $~lib/builtins/isFinite<f64>|inlined.1 (result i32)
|
||||||
|
(set_local $5
|
||||||
|
(f64.const inf)
|
||||||
|
)
|
||||||
|
(f64.eq
|
||||||
|
(f64.sub
|
||||||
|
(get_local $5)
|
||||||
|
(get_local $5)
|
||||||
|
)
|
||||||
|
(f64.const 0)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
(i32.const 1)
|
||||||
)
|
)
|
||||||
(i32.const 0)
|
(i32.const 0)
|
||||||
)
|
)
|
||||||
@ -1153,10 +1252,22 @@
|
|||||||
(if
|
(if
|
||||||
(i32.eqz
|
(i32.eqz
|
||||||
(i32.eq
|
(i32.eq
|
||||||
(call $~lib/builtins/isFinite<f64>
|
(i32.and
|
||||||
(f64.neg
|
(block $~lib/builtins/isFinite<f64>|inlined.2 (result i32)
|
||||||
(f64.const inf)
|
(set_local $5
|
||||||
|
(f64.neg
|
||||||
|
(f64.const inf)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
(f64.eq
|
||||||
|
(f64.sub
|
||||||
|
(get_local $5)
|
||||||
|
(get_local $5)
|
||||||
|
)
|
||||||
|
(f64.const 0)
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
(i32.const 1)
|
||||||
)
|
)
|
||||||
(i32.const 0)
|
(i32.const 0)
|
||||||
)
|
)
|
||||||
@ -1174,8 +1285,20 @@
|
|||||||
(if
|
(if
|
||||||
(i32.eqz
|
(i32.eqz
|
||||||
(i32.eq
|
(i32.eq
|
||||||
(call $~lib/builtins/isFinite<f64>
|
(i32.and
|
||||||
(f64.const nan:0x8000000000000)
|
(block $~lib/builtins/isFinite<f64>|inlined.3 (result i32)
|
||||||
|
(set_local $5
|
||||||
|
(f64.const nan:0x8000000000000)
|
||||||
|
)
|
||||||
|
(f64.eq
|
||||||
|
(f64.sub
|
||||||
|
(get_local $5)
|
||||||
|
(get_local $5)
|
||||||
|
)
|
||||||
|
(f64.const 0)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
(i32.const 1)
|
||||||
)
|
)
|
||||||
(i32.const 0)
|
(i32.const 0)
|
||||||
)
|
)
|
||||||
@ -1245,13 +1368,34 @@
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
(set_global $builtins/b
|
(set_global $builtins/b
|
||||||
(call $~lib/builtins/isNaN<f64>
|
(i32.and
|
||||||
(f64.const 1.25)
|
(block $~lib/builtins/isNaN<f64>|inlined.2 (result i32)
|
||||||
|
(set_local $5
|
||||||
|
(f64.const 1.25)
|
||||||
|
)
|
||||||
|
(f64.ne
|
||||||
|
(get_local $5)
|
||||||
|
(get_local $5)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
(i32.const 1)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
(set_global $builtins/b
|
(set_global $builtins/b
|
||||||
(call $~lib/builtins/isFinite<f64>
|
(i32.and
|
||||||
(f64.const 1.25)
|
(block $~lib/builtins/isFinite<f64>|inlined.4 (result i32)
|
||||||
|
(set_local $5
|
||||||
|
(f64.const 1.25)
|
||||||
|
)
|
||||||
|
(f64.eq
|
||||||
|
(f64.sub
|
||||||
|
(get_local $5)
|
||||||
|
(get_local $5)
|
||||||
|
)
|
||||||
|
(f64.const 0)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
(i32.const 1)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
(set_global $builtins/i
|
(set_global $builtins/i
|
||||||
@ -1945,8 +2089,17 @@
|
|||||||
)
|
)
|
||||||
(if
|
(if
|
||||||
(i32.eqz
|
(i32.eqz
|
||||||
(call $~lib/builtins/isNaN<f32>
|
(i32.and
|
||||||
(f32.const nan:0x400000)
|
(block $~lib/builtins/isNaN<f32>|inlined.3 (result i32)
|
||||||
|
(set_local $4
|
||||||
|
(f32.const nan:0x400000)
|
||||||
|
)
|
||||||
|
(f32.ne
|
||||||
|
(get_local $4)
|
||||||
|
(get_local $4)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
(i32.const 1)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
(block
|
(block
|
||||||
@ -1961,8 +2114,17 @@
|
|||||||
)
|
)
|
||||||
(if
|
(if
|
||||||
(i32.eqz
|
(i32.eqz
|
||||||
(call $~lib/builtins/isNaN<f64>
|
(i32.and
|
||||||
(f64.const nan:0x8000000000000)
|
(block $~lib/builtins/isNaN<f64>|inlined.3 (result i32)
|
||||||
|
(set_local $5
|
||||||
|
(f64.const nan:0x8000000000000)
|
||||||
|
)
|
||||||
|
(f64.ne
|
||||||
|
(get_local $5)
|
||||||
|
(get_local $5)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
(i32.const 1)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
(block
|
(block
|
||||||
@ -1978,8 +2140,20 @@
|
|||||||
(if
|
(if
|
||||||
(i32.eqz
|
(i32.eqz
|
||||||
(i32.eqz
|
(i32.eqz
|
||||||
(call $~lib/builtins/isFinite<f32>
|
(i32.and
|
||||||
(f32.const nan:0x400000)
|
(block $~lib/builtins/isFinite<f32>|inlined.5 (result i32)
|
||||||
|
(set_local $4
|
||||||
|
(f32.const nan:0x400000)
|
||||||
|
)
|
||||||
|
(f32.eq
|
||||||
|
(f32.sub
|
||||||
|
(get_local $4)
|
||||||
|
(get_local $4)
|
||||||
|
)
|
||||||
|
(f32.const 0)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
(i32.const 1)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
@ -1996,8 +2170,20 @@
|
|||||||
(if
|
(if
|
||||||
(i32.eqz
|
(i32.eqz
|
||||||
(i32.eqz
|
(i32.eqz
|
||||||
(call $~lib/builtins/isFinite<f32>
|
(i32.and
|
||||||
(f32.const inf)
|
(block $~lib/builtins/isFinite<f32>|inlined.6 (result i32)
|
||||||
|
(set_local $4
|
||||||
|
(f32.const inf)
|
||||||
|
)
|
||||||
|
(f32.eq
|
||||||
|
(f32.sub
|
||||||
|
(get_local $4)
|
||||||
|
(get_local $4)
|
||||||
|
)
|
||||||
|
(f32.const 0)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
(i32.const 1)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
@ -2014,8 +2200,20 @@
|
|||||||
(if
|
(if
|
||||||
(i32.eqz
|
(i32.eqz
|
||||||
(i32.eqz
|
(i32.eqz
|
||||||
(call $~lib/builtins/isFinite<f64>
|
(i32.and
|
||||||
(f64.const nan:0x8000000000000)
|
(block $~lib/builtins/isFinite<f64>|inlined.5 (result i32)
|
||||||
|
(set_local $5
|
||||||
|
(f64.const nan:0x8000000000000)
|
||||||
|
)
|
||||||
|
(f64.eq
|
||||||
|
(f64.sub
|
||||||
|
(get_local $5)
|
||||||
|
(get_local $5)
|
||||||
|
)
|
||||||
|
(f64.const 0)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
(i32.const 1)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
@ -2032,8 +2230,20 @@
|
|||||||
(if
|
(if
|
||||||
(i32.eqz
|
(i32.eqz
|
||||||
(i32.eqz
|
(i32.eqz
|
||||||
(call $~lib/builtins/isFinite<f64>
|
(i32.and
|
||||||
(f64.const inf)
|
(block $~lib/builtins/isFinite<f64>|inlined.6 (result i32)
|
||||||
|
(set_local $5
|
||||||
|
(f64.const inf)
|
||||||
|
)
|
||||||
|
(f64.eq
|
||||||
|
(f64.sub
|
||||||
|
(get_local $5)
|
||||||
|
(get_local $5)
|
||||||
|
)
|
||||||
|
(f64.const 0)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
(i32.const 1)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
@ -2049,8 +2259,20 @@
|
|||||||
)
|
)
|
||||||
(if
|
(if
|
||||||
(i32.eqz
|
(i32.eqz
|
||||||
(call $~lib/builtins/isFinite<f32>
|
(i32.and
|
||||||
(f32.const 0)
|
(block $~lib/builtins/isFinite<f32>|inlined.7 (result i32)
|
||||||
|
(set_local $4
|
||||||
|
(f32.const 0)
|
||||||
|
)
|
||||||
|
(f32.eq
|
||||||
|
(f32.sub
|
||||||
|
(get_local $4)
|
||||||
|
(get_local $4)
|
||||||
|
)
|
||||||
|
(f32.const 0)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
(i32.const 1)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
(block
|
(block
|
||||||
@ -2065,8 +2287,20 @@
|
|||||||
)
|
)
|
||||||
(if
|
(if
|
||||||
(i32.eqz
|
(i32.eqz
|
||||||
(call $~lib/builtins/isFinite<f64>
|
(i32.and
|
||||||
(f64.const 0)
|
(block $~lib/builtins/isFinite<f64>|inlined.7 (result i32)
|
||||||
|
(set_local $5
|
||||||
|
(f64.const 0)
|
||||||
|
)
|
||||||
|
(f64.eq
|
||||||
|
(f64.sub
|
||||||
|
(get_local $5)
|
||||||
|
(get_local $5)
|
||||||
|
)
|
||||||
|
(f64.const 0)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
(i32.const 1)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
(block
|
(block
|
||||||
@ -2878,8 +3112,14 @@
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
(drop
|
(drop
|
||||||
(call $~lib/builtins/isNaN<f64>
|
(block $~lib/builtins/isNaN<f64>|inlined.4 (result i32)
|
||||||
(f64.const 1)
|
(set_local $5
|
||||||
|
(f64.const 1)
|
||||||
|
)
|
||||||
|
(f64.ne
|
||||||
|
(get_local $5)
|
||||||
|
(get_local $5)
|
||||||
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
@ -8598,7 +8598,8 @@
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
(set_local $7
|
(set_local $7
|
||||||
(call $~lib/builtins/isNaN<f64>
|
(f64.ne
|
||||||
|
(get_local $1)
|
||||||
(get_local $1)
|
(get_local $1)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
@ -8994,14 +8995,18 @@
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
(set_local $3
|
(set_local $3
|
||||||
(call $~lib/builtins/isNaN<f32>
|
(f32.ne
|
||||||
|
(get_local $1)
|
||||||
(get_local $1)
|
(get_local $1)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
(if
|
(if
|
||||||
(i32.eqz
|
(i32.eqz
|
||||||
(get_local $3)
|
(i32.and
|
||||||
|
(get_local $3)
|
||||||
|
(i32.const 1)
|
||||||
|
)
|
||||||
)
|
)
|
||||||
(set_local $3
|
(set_local $3
|
||||||
(i32.eq
|
(i32.eq
|
||||||
@ -9011,7 +9016,10 @@
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
(if
|
(if
|
||||||
(get_local $3)
|
(i32.and
|
||||||
|
(get_local $3)
|
||||||
|
(i32.const 1)
|
||||||
|
)
|
||||||
(return
|
(return
|
||||||
(f32.div
|
(f32.div
|
||||||
(tee_local $0
|
(tee_local $0
|
||||||
|
@ -9937,29 +9937,38 @@
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
(if
|
(if
|
||||||
(if (result i32)
|
(i32.and
|
||||||
(tee_local $7
|
(if (result i32)
|
||||||
(if (result i32)
|
(i32.and
|
||||||
(tee_local $7
|
(tee_local $7
|
||||||
(i64.eq
|
(if (result i32)
|
||||||
(i64.shl
|
(tee_local $7
|
||||||
(get_local $3)
|
(i64.eq
|
||||||
(i64.const 1)
|
(i64.shl
|
||||||
|
(get_local $3)
|
||||||
|
(i64.const 1)
|
||||||
|
)
|
||||||
|
(i64.const 0)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
(get_local $7)
|
||||||
|
(block $~lib/builtins/isNaN<f64>|inlined.1 (result i32)
|
||||||
|
(f64.ne
|
||||||
|
(get_local $1)
|
||||||
|
(get_local $1)
|
||||||
|
)
|
||||||
)
|
)
|
||||||
(i64.const 0)
|
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
(get_local $7)
|
(i32.const 1)
|
||||||
(call $~lib/builtins/isNaN<f64>
|
)
|
||||||
(get_local $1)
|
(get_local $7)
|
||||||
)
|
(i32.eq
|
||||||
|
(get_local $4)
|
||||||
|
(i32.const 2047)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
(get_local $7)
|
(i32.const 1)
|
||||||
(i32.eq
|
|
||||||
(get_local $4)
|
|
||||||
(i32.const 2047)
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
(return
|
(return
|
||||||
(f64.div
|
(f64.div
|
||||||
@ -10405,29 +10414,38 @@
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
(if
|
(if
|
||||||
(if (result i32)
|
(i32.and
|
||||||
(tee_local $7
|
(if (result i32)
|
||||||
(if (result i32)
|
(i32.and
|
||||||
(tee_local $7
|
(tee_local $7
|
||||||
(i32.eq
|
(if (result i32)
|
||||||
(i32.shl
|
(tee_local $7
|
||||||
(get_local $3)
|
(i32.eq
|
||||||
(i32.const 1)
|
(i32.shl
|
||||||
|
(get_local $3)
|
||||||
|
(i32.const 1)
|
||||||
|
)
|
||||||
|
(i32.const 0)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
(get_local $7)
|
||||||
|
(block $~lib/builtins/isNaN<f32>|inlined.1 (result i32)
|
||||||
|
(f32.ne
|
||||||
|
(get_local $1)
|
||||||
|
(get_local $1)
|
||||||
|
)
|
||||||
)
|
)
|
||||||
(i32.const 0)
|
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
(get_local $7)
|
(i32.const 1)
|
||||||
(call $~lib/builtins/isNaN<f32>
|
)
|
||||||
(get_local $1)
|
(get_local $7)
|
||||||
)
|
(i32.eq
|
||||||
|
(get_local $4)
|
||||||
|
(i32.const 255)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
(get_local $7)
|
(i32.const 1)
|
||||||
(i32.eq
|
|
||||||
(get_local $4)
|
|
||||||
(i32.const 255)
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
(return
|
(return
|
||||||
(f32.div
|
(f32.div
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
(module
|
(module
|
||||||
(type $FFFi (func (param f64 f64 f64) (result i32)))
|
(type $FFFi (func (param f64 f64 f64) (result i32)))
|
||||||
(type $FFF (func (param f64 f64) (result f64)))
|
(type $FFF (func (param f64 f64) (result f64)))
|
||||||
(type $Fi (func (param f64) (result i32)))
|
|
||||||
(type $FFi (func (param f64 f64) (result i32)))
|
(type $FFi (func (param f64 f64) (result i32)))
|
||||||
|
(type $Fi (func (param f64) (result i32)))
|
||||||
(type $iiiiv (func (param i32 i32 i32 i32)))
|
(type $iiiiv (func (param i32 i32 i32 i32)))
|
||||||
(type $fffi (func (param f32 f32 f32) (result i32)))
|
(type $fffi (func (param f32 f32 f32) (result i32)))
|
||||||
(type $fff (func (param f32 f32) (result f32)))
|
(type $fff (func (param f32 f32) (result f32)))
|
||||||
(type $fi (func (param f32) (result i32)))
|
|
||||||
(type $ffi (func (param f32 f32) (result i32)))
|
(type $ffi (func (param f32 f32) (result i32)))
|
||||||
|
(type $fi (func (param f32) (result i32)))
|
||||||
(type $v (func))
|
(type $v (func))
|
||||||
(import "JSOp" "mod" (func $std/mod/JSOp.mod (param f64 f64) (result f64)))
|
(import "JSOp" "mod" (func $std/mod/JSOp.mod (param f64 f64) (result f64)))
|
||||||
(import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32)))
|
(import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32)))
|
||||||
@ -15,13 +15,7 @@
|
|||||||
(data (i32.const 8) "\n\00\00\00s\00t\00d\00/\00m\00o\00d\00.\00t\00s")
|
(data (i32.const 8) "\n\00\00\00s\00t\00d\00/\00m\00o\00d\00.\00t\00s")
|
||||||
(export "memory" (memory $0))
|
(export "memory" (memory $0))
|
||||||
(start $start)
|
(start $start)
|
||||||
(func $~lib/builtins/isNaN<f64> (; 2 ;) (type $Fi) (param $0 f64) (result i32)
|
(func $~lib/math/NativeMath.mod (; 2 ;) (type $FFF) (param $0 f64) (param $1 f64) (result f64)
|
||||||
(f64.ne
|
|
||||||
(get_local $0)
|
|
||||||
(get_local $0)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
(func $~lib/math/NativeMath.mod (; 3 ;) (type $FFF) (param $0 f64) (param $1 f64) (result f64)
|
|
||||||
(local $2 i64)
|
(local $2 i64)
|
||||||
(local $3 i32)
|
(local $3 i32)
|
||||||
(local $4 i64)
|
(local $4 i64)
|
||||||
@ -81,7 +75,8 @@
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
(set_local $7
|
(set_local $7
|
||||||
(call $~lib/builtins/isNaN<f64>
|
(f64.ne
|
||||||
|
(get_local $1)
|
||||||
(get_local $1)
|
(get_local $1)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
@ -395,6 +390,12 @@
|
|||||||
(get_local $0)
|
(get_local $0)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
(func $~lib/builtins/isNaN<f64> (; 3 ;) (type $Fi) (param $0 f64) (result i32)
|
||||||
|
(f64.ne
|
||||||
|
(get_local $0)
|
||||||
|
(get_local $0)
|
||||||
|
)
|
||||||
|
)
|
||||||
(func $std/mod/check<f64> (; 4 ;) (type $FFi) (param $0 f64) (param $1 f64) (result i32)
|
(func $std/mod/check<f64> (; 4 ;) (type $FFi) (param $0 f64) (param $1 f64) (result i32)
|
||||||
(if
|
(if
|
||||||
(call $~lib/builtins/isNaN<f64>
|
(call $~lib/builtins/isNaN<f64>
|
||||||
@ -455,13 +456,7 @@
|
|||||||
)
|
)
|
||||||
(get_local $3)
|
(get_local $3)
|
||||||
)
|
)
|
||||||
(func $~lib/builtins/isNaN<f32> (; 6 ;) (type $fi) (param $0 f32) (result i32)
|
(func $~lib/math/NativeMathf.mod (; 6 ;) (type $fff) (param $0 f32) (param $1 f32) (result f32)
|
||||||
(f32.ne
|
|
||||||
(get_local $0)
|
|
||||||
(get_local $0)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
(func $~lib/math/NativeMathf.mod (; 7 ;) (type $fff) (param $0 f32) (param $1 f32) (result f32)
|
|
||||||
(local $2 i32)
|
(local $2 i32)
|
||||||
(local $3 i32)
|
(local $3 i32)
|
||||||
(local $4 i32)
|
(local $4 i32)
|
||||||
@ -513,14 +508,18 @@
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
(set_local $3
|
(set_local $3
|
||||||
(call $~lib/builtins/isNaN<f32>
|
(f32.ne
|
||||||
|
(get_local $1)
|
||||||
(get_local $1)
|
(get_local $1)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
(if
|
(if
|
||||||
(i32.eqz
|
(i32.eqz
|
||||||
(get_local $3)
|
(i32.and
|
||||||
|
(get_local $3)
|
||||||
|
(i32.const 1)
|
||||||
|
)
|
||||||
)
|
)
|
||||||
(set_local $3
|
(set_local $3
|
||||||
(i32.eq
|
(i32.eq
|
||||||
@ -530,7 +529,10 @@
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
(if
|
(if
|
||||||
(get_local $3)
|
(i32.and
|
||||||
|
(get_local $3)
|
||||||
|
(i32.const 1)
|
||||||
|
)
|
||||||
(return
|
(return
|
||||||
(f32.div
|
(f32.div
|
||||||
(tee_local $0
|
(tee_local $0
|
||||||
@ -802,6 +804,12 @@
|
|||||||
(get_local $0)
|
(get_local $0)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
(func $~lib/builtins/isNaN<f32> (; 7 ;) (type $fi) (param $0 f32) (result i32)
|
||||||
|
(f32.ne
|
||||||
|
(get_local $0)
|
||||||
|
(get_local $0)
|
||||||
|
)
|
||||||
|
)
|
||||||
(func $std/mod/check<f32> (; 8 ;) (type $ffi) (param $0 f32) (param $1 f32) (result i32)
|
(func $std/mod/check<f32> (; 8 ;) (type $ffi) (param $0 f32) (param $1 f32) (result i32)
|
||||||
(if
|
(if
|
||||||
(call $~lib/builtins/isNaN<f32>
|
(call $~lib/builtins/isNaN<f32>
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
(module
|
(module
|
||||||
(type $FFFi (func (param f64 f64 f64) (result i32)))
|
(type $FFFi (func (param f64 f64 f64) (result i32)))
|
||||||
(type $FFF (func (param f64 f64) (result f64)))
|
(type $FFF (func (param f64 f64) (result f64)))
|
||||||
(type $Fi (func (param f64) (result i32)))
|
|
||||||
(type $FFi (func (param f64 f64) (result i32)))
|
(type $FFi (func (param f64 f64) (result i32)))
|
||||||
|
(type $Fi (func (param f64) (result i32)))
|
||||||
(type $iiiiv (func (param i32 i32 i32 i32)))
|
(type $iiiiv (func (param i32 i32 i32 i32)))
|
||||||
(type $fffi (func (param f32 f32 f32) (result i32)))
|
(type $fffi (func (param f32 f32 f32) (result i32)))
|
||||||
(type $fff (func (param f32 f32) (result f32)))
|
(type $fff (func (param f32 f32) (result f32)))
|
||||||
(type $fi (func (param f32) (result i32)))
|
|
||||||
(type $ffi (func (param f32 f32) (result i32)))
|
(type $ffi (func (param f32 f32) (result i32)))
|
||||||
|
(type $fi (func (param f32) (result i32)))
|
||||||
(type $v (func))
|
(type $v (func))
|
||||||
(import "JSOp" "mod" (func $std/mod/JSOp.mod (param f64 f64) (result f64)))
|
(import "JSOp" "mod" (func $std/mod/JSOp.mod (param f64 f64) (result f64)))
|
||||||
(import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32)))
|
(import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32)))
|
||||||
@ -19,13 +19,7 @@
|
|||||||
(data (i32.const 8) "\n\00\00\00s\00t\00d\00/\00m\00o\00d\00.\00t\00s\00")
|
(data (i32.const 8) "\n\00\00\00s\00t\00d\00/\00m\00o\00d\00.\00t\00s\00")
|
||||||
(export "memory" (memory $0))
|
(export "memory" (memory $0))
|
||||||
(start $start)
|
(start $start)
|
||||||
(func $~lib/builtins/isNaN<f64> (; 2 ;) (type $Fi) (param $0 f64) (result i32)
|
(func $~lib/math/NativeMath.mod (; 2 ;) (type $FFF) (param $0 f64) (param $1 f64) (result f64)
|
||||||
(f64.ne
|
|
||||||
(get_local $0)
|
|
||||||
(get_local $0)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
(func $~lib/math/NativeMath.mod (; 3 ;) (type $FFF) (param $0 f64) (param $1 f64) (result f64)
|
|
||||||
(local $2 i64)
|
(local $2 i64)
|
||||||
(local $3 i64)
|
(local $3 i64)
|
||||||
(local $4 i32)
|
(local $4 i32)
|
||||||
@ -74,29 +68,38 @@
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
(if
|
(if
|
||||||
(if (result i32)
|
(i32.and
|
||||||
(tee_local $7
|
(if (result i32)
|
||||||
(if (result i32)
|
(i32.and
|
||||||
(tee_local $7
|
(tee_local $7
|
||||||
(i64.eq
|
(if (result i32)
|
||||||
(i64.shl
|
(tee_local $7
|
||||||
(get_local $3)
|
(i64.eq
|
||||||
(i64.const 1)
|
(i64.shl
|
||||||
|
(get_local $3)
|
||||||
|
(i64.const 1)
|
||||||
|
)
|
||||||
|
(i64.const 0)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
(get_local $7)
|
||||||
|
(block $~lib/builtins/isNaN<f64>|inlined.1 (result i32)
|
||||||
|
(f64.ne
|
||||||
|
(get_local $1)
|
||||||
|
(get_local $1)
|
||||||
|
)
|
||||||
)
|
)
|
||||||
(i64.const 0)
|
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
(get_local $7)
|
(i32.const 1)
|
||||||
(call $~lib/builtins/isNaN<f64>
|
)
|
||||||
(get_local $1)
|
(get_local $7)
|
||||||
)
|
(i32.eq
|
||||||
|
(get_local $4)
|
||||||
|
(i32.const 2047)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
(get_local $7)
|
(i32.const 1)
|
||||||
(i32.eq
|
|
||||||
(get_local $4)
|
|
||||||
(i32.const 2047)
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
(return
|
(return
|
||||||
(f64.div
|
(f64.div
|
||||||
@ -465,6 +468,12 @@
|
|||||||
(get_local $2)
|
(get_local $2)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
(func $~lib/builtins/isNaN<f64> (; 3 ;) (type $Fi) (param $0 f64) (result i32)
|
||||||
|
(f64.ne
|
||||||
|
(get_local $0)
|
||||||
|
(get_local $0)
|
||||||
|
)
|
||||||
|
)
|
||||||
(func $std/mod/check<f64> (; 4 ;) (type $FFi) (param $0 f64) (param $1 f64) (result i32)
|
(func $std/mod/check<f64> (; 4 ;) (type $FFi) (param $0 f64) (param $1 f64) (result i32)
|
||||||
(if
|
(if
|
||||||
(call $~lib/builtins/isNaN<f64>
|
(call $~lib/builtins/isNaN<f64>
|
||||||
@ -531,13 +540,7 @@
|
|||||||
(get_local $3)
|
(get_local $3)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
(func $~lib/builtins/isNaN<f32> (; 6 ;) (type $fi) (param $0 f32) (result i32)
|
(func $~lib/math/NativeMathf.mod (; 6 ;) (type $fff) (param $0 f32) (param $1 f32) (result f32)
|
||||||
(f32.ne
|
|
||||||
(get_local $0)
|
|
||||||
(get_local $0)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
(func $~lib/math/NativeMathf.mod (; 7 ;) (type $fff) (param $0 f32) (param $1 f32) (result f32)
|
|
||||||
(local $2 i32)
|
(local $2 i32)
|
||||||
(local $3 i32)
|
(local $3 i32)
|
||||||
(local $4 i32)
|
(local $4 i32)
|
||||||
@ -580,29 +583,38 @@
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
(if
|
(if
|
||||||
(if (result i32)
|
(i32.and
|
||||||
(tee_local $7
|
(if (result i32)
|
||||||
(if (result i32)
|
(i32.and
|
||||||
(tee_local $7
|
(tee_local $7
|
||||||
(i32.eq
|
(if (result i32)
|
||||||
(i32.shl
|
(tee_local $7
|
||||||
(get_local $3)
|
(i32.eq
|
||||||
(i32.const 1)
|
(i32.shl
|
||||||
|
(get_local $3)
|
||||||
|
(i32.const 1)
|
||||||
|
)
|
||||||
|
(i32.const 0)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
(get_local $7)
|
||||||
|
(block $~lib/builtins/isNaN<f32>|inlined.1 (result i32)
|
||||||
|
(f32.ne
|
||||||
|
(get_local $1)
|
||||||
|
(get_local $1)
|
||||||
|
)
|
||||||
)
|
)
|
||||||
(i32.const 0)
|
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
(get_local $7)
|
(i32.const 1)
|
||||||
(call $~lib/builtins/isNaN<f32>
|
)
|
||||||
(get_local $1)
|
(get_local $7)
|
||||||
)
|
(i32.eq
|
||||||
|
(get_local $4)
|
||||||
|
(i32.const 255)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
(get_local $7)
|
(i32.const 1)
|
||||||
(i32.eq
|
|
||||||
(get_local $4)
|
|
||||||
(i32.const 255)
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
(return
|
(return
|
||||||
(f32.div
|
(f32.div
|
||||||
@ -958,6 +970,12 @@
|
|||||||
(get_local $2)
|
(get_local $2)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
(func $~lib/builtins/isNaN<f32> (; 7 ;) (type $fi) (param $0 f32) (result i32)
|
||||||
|
(f32.ne
|
||||||
|
(get_local $0)
|
||||||
|
(get_local $0)
|
||||||
|
)
|
||||||
|
)
|
||||||
(func $std/mod/check<f32> (; 8 ;) (type $ffi) (param $0 f32) (param $1 f32) (result i32)
|
(func $std/mod/check<f32> (; 8 ;) (type $ffi) (param $0 f32) (param $1 f32) (result i32)
|
||||||
(if
|
(if
|
||||||
(call $~lib/builtins/isNaN<f32>
|
(call $~lib/builtins/isNaN<f32>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user