mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-06-19 01:41:30 +00:00
Move some numeric builtins to stdlib; Minor refactoring
This commit is contained in:
@ -2,7 +2,9 @@
|
||||
(type $FFF (func (param f64 f64) (result f64)))
|
||||
(type $FiF (func (param f64 i32) (result f64)))
|
||||
(type $fff (func (param f32 f32) (result f32)))
|
||||
(type $fi (func (param f32) (result i32)))
|
||||
(type $fif (func (param f32 i32) (result f32)))
|
||||
(type $Fi (func (param f64) (result i32)))
|
||||
(type $v (func))
|
||||
(global $binary/b (mut i32) (i32.const 0))
|
||||
(global $binary/i (mut i32) (i32.const 0))
|
||||
@ -1525,7 +1527,20 @@
|
||||
(f64.const 1.e+300)
|
||||
)
|
||||
)
|
||||
(func $~lib/math/NativeMathf.mod (; 2 ;) (type $fff) (param $0 f32) (param $1 f32) (result f32)
|
||||
(func $isNaN<f32> (; 2 ;) (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)
|
||||
)
|
||||
)
|
||||
(func $~lib/math/NativeMathf.mod (; 3 ;) (type $fff) (param $0 f32) (param $1 f32) (result f32)
|
||||
(local $2 i32)
|
||||
(local $3 i32)
|
||||
(local $4 i32)
|
||||
@ -1574,14 +1589,8 @@
|
||||
)
|
||||
)
|
||||
(get_local $3)
|
||||
(i32.gt_u
|
||||
(i32.and
|
||||
(i32.reinterpret/f32
|
||||
(get_local $1)
|
||||
)
|
||||
(i32.const 2147483647)
|
||||
)
|
||||
(i32.const 2139095040)
|
||||
(call $isNaN<f32>
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
(i32.const 1)
|
||||
@ -1879,7 +1888,7 @@
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
(func $~lib/math/NativeMathf.scalbn (; 3 ;) (type $fif) (param $0 f32) (param $1 i32) (result f32)
|
||||
(func $~lib/math/NativeMathf.scalbn (; 4 ;) (type $fif) (param $0 f32) (param $1 i32) (result f32)
|
||||
(local $2 f32)
|
||||
(set_local $2
|
||||
(get_local $0)
|
||||
@ -1991,7 +2000,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(func $~lib/math/NativeMathf.pow (; 4 ;) (type $fff) (param $0 f32) (param $1 f32) (result f32)
|
||||
(func $~lib/math/NativeMathf.pow (; 5 ;) (type $fff) (param $0 f32) (param $1 f32) (result f32)
|
||||
(local $2 f32)
|
||||
(local $3 f32)
|
||||
(local $4 i32)
|
||||
@ -3156,7 +3165,18 @@
|
||||
(f32.const 1000000015047466219876688e6)
|
||||
)
|
||||
)
|
||||
(func $~lib/math/NativeMath.mod (; 5 ;) (type $FFF) (param $0 f64) (param $1 f64) (result f64)
|
||||
(func $isNaN<f64> (; 6 ;) (type $Fi) (param $0 f64) (result i32)
|
||||
(i64.gt_u
|
||||
(i64.and
|
||||
(i64.reinterpret/f64
|
||||
(get_local $0)
|
||||
)
|
||||
(i64.const 9223372036854775807)
|
||||
)
|
||||
(i64.const 9218868437227405312)
|
||||
)
|
||||
)
|
||||
(func $~lib/math/NativeMath.mod (; 7 ;) (type $FFF) (param $0 f64) (param $1 f64) (result f64)
|
||||
(local $2 i64)
|
||||
(local $3 i32)
|
||||
(local $4 i64)
|
||||
@ -3210,14 +3230,8 @@
|
||||
)
|
||||
)
|
||||
(get_local $7)
|
||||
(i64.gt_u
|
||||
(i64.and
|
||||
(i64.reinterpret/f64
|
||||
(get_local $1)
|
||||
)
|
||||
(i64.const 9223372036854775807)
|
||||
)
|
||||
(i64.const 9218868437227405312)
|
||||
(call $isNaN<f64>
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
(i32.const 1)
|
||||
@ -3530,7 +3544,7 @@
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
(func $start (; 6 ;) (type $v)
|
||||
(func $start (; 8 ;) (type $v)
|
||||
(drop
|
||||
(i32.rem_s
|
||||
(get_global $binary/i)
|
||||
|
Reference in New Issue
Block a user