mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-06-24 20:21:48 +00:00
Simplify isFinite & isNaN (#78)
This commit is contained in:
@ -1577,16 +1577,9 @@
|
||||
)
|
||||
)
|
||||
(func $isNaN<f32> (; 3 ;) (type $fi) (param $0 f32) (result i32)
|
||||
(i64.gt_u
|
||||
(i64.and
|
||||
(i64.reinterpret/f64
|
||||
(f64.promote/f32
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
(i64.const 9223372036854775807)
|
||||
)
|
||||
(i64.const 9218868437227405312)
|
||||
(f32.ne
|
||||
(get_local $0)
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
(func $~lib/math/NativeMathf.mod (; 4 ;) (type $fff) (param $0 f32) (param $1 f32) (result f32)
|
||||
@ -3215,14 +3208,9 @@
|
||||
)
|
||||
)
|
||||
(func $isNaN<f64> (; 7 ;) (type $Fi) (param $0 f64) (result i32)
|
||||
(i64.gt_u
|
||||
(i64.and
|
||||
(i64.reinterpret/f64
|
||||
(get_local $0)
|
||||
)
|
||||
(i64.const 9223372036854775807)
|
||||
)
|
||||
(i64.const 9218868437227405312)
|
||||
(f64.ne
|
||||
(get_local $0)
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
(func $~lib/math/NativeMath.mod (; 8 ;) (type $FFF) (param $0 f64) (param $1 f64) (result f64)
|
||||
@ -3594,27 +3582,21 @@
|
||||
)
|
||||
)
|
||||
(func $isFinite<f32> (; 9 ;) (type $fi) (param $0 f32) (result i32)
|
||||
(i64.lt_u
|
||||
(i64.and
|
||||
(i64.reinterpret/f64
|
||||
(f64.promote/f32
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
(i64.const 9223372036854775807)
|
||||
(f32.eq
|
||||
(f32.sub
|
||||
(get_local $0)
|
||||
(get_local $0)
|
||||
)
|
||||
(i64.const 9218868437227405312)
|
||||
(f32.const 0)
|
||||
)
|
||||
)
|
||||
(func $isFinite<f64> (; 10 ;) (type $Fi) (param $0 f64) (result i32)
|
||||
(i64.lt_u
|
||||
(i64.and
|
||||
(i64.reinterpret/f64
|
||||
(get_local $0)
|
||||
)
|
||||
(i64.const 9223372036854775807)
|
||||
(f64.eq
|
||||
(f64.sub
|
||||
(get_local $0)
|
||||
(get_local $0)
|
||||
)
|
||||
(i64.const 9218868437227405312)
|
||||
(f64.const 0)
|
||||
)
|
||||
)
|
||||
(func $showcase/ANamespace.aNamespacedFunction (; 11 ;) (type $ii) (param $0 i32) (result i32)
|
||||
|
Reference in New Issue
Block a user