mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-06-18 01:11:32 +00:00
Better resolve infrastructure; Instance fields
This commit is contained in:
@ -1,8 +1,10 @@
|
||||
(module
|
||||
(type $FFF (func (param f64 f64) (result f64)))
|
||||
(type $fff (func (param f32 f32) (result f32)))
|
||||
(type $v (func))
|
||||
(memory $0 1)
|
||||
(export "fmod" (func $fmod/fmod))
|
||||
(export "fmodf" (func $fmod/fmodf))
|
||||
(export "memory" (memory $0))
|
||||
(start $start)
|
||||
(func $fmod/fmod (; 0 ;) (type $FFF) (param $0 f64) (param $1 f64) (result f64)
|
||||
@ -391,8 +393,374 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(func $start (; 1 ;) (type $v)
|
||||
(func $fmod/fmodf (; 1 ;) (type $fff) (param $0 f32) (param $1 f32) (result f32)
|
||||
(local $2 i32)
|
||||
(local $3 i32)
|
||||
(local $4 i32)
|
||||
(local $5 i32)
|
||||
(local $6 i32)
|
||||
(local $7 i32)
|
||||
(local $8 f32)
|
||||
(set_local $4
|
||||
(i32.and
|
||||
(i32.shr_u
|
||||
(tee_local $2
|
||||
(i32.reinterpret/f32
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
(i32.const 23)
|
||||
)
|
||||
(i32.const 255)
|
||||
)
|
||||
)
|
||||
(set_local $6
|
||||
(i32.and
|
||||
(i32.shr_u
|
||||
(tee_local $5
|
||||
(i32.reinterpret/f32
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
(i32.const 23)
|
||||
)
|
||||
(i32.const 255)
|
||||
)
|
||||
)
|
||||
(set_local $7
|
||||
(i32.and
|
||||
(get_local $2)
|
||||
(i32.const -2147483648)
|
||||
)
|
||||
)
|
||||
(if
|
||||
(if (result i32)
|
||||
(if (result i32)
|
||||
(tee_local $3
|
||||
(i32.eqz
|
||||
(i32.shl
|
||||
(get_local $5)
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
(get_local $3)
|
||||
(tee_local $3
|
||||
(f32.ne
|
||||
(tee_local $8
|
||||
(get_local $1)
|
||||
)
|
||||
(get_local $8)
|
||||
)
|
||||
)
|
||||
)
|
||||
(get_local $3)
|
||||
(i32.eq
|
||||
(get_local $4)
|
||||
(i32.const 255)
|
||||
)
|
||||
)
|
||||
(return
|
||||
(f32.div
|
||||
(f32.mul
|
||||
(get_local $0)
|
||||
(get_local $1)
|
||||
)
|
||||
(f32.mul
|
||||
(get_local $0)
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(if
|
||||
(i32.le_u
|
||||
(i32.shl
|
||||
(get_local $2)
|
||||
(i32.const 1)
|
||||
)
|
||||
(i32.shl
|
||||
(get_local $5)
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
(block
|
||||
(if
|
||||
(i32.eq
|
||||
(i32.shl
|
||||
(get_local $2)
|
||||
(i32.const 1)
|
||||
)
|
||||
(i32.shl
|
||||
(get_local $5)
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
(return
|
||||
(f32.mul
|
||||
(f32.const 0)
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
)
|
||||
(return
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set_local $2
|
||||
(if (result i32)
|
||||
(get_local $4)
|
||||
(i32.or
|
||||
(i32.and
|
||||
(get_local $2)
|
||||
(i32.const 8388607)
|
||||
)
|
||||
(i32.const 8388608)
|
||||
)
|
||||
(block (result i32)
|
||||
(set_local $3
|
||||
(i32.shl
|
||||
(get_local $2)
|
||||
(i32.const 9)
|
||||
)
|
||||
)
|
||||
(loop $continue|0
|
||||
(if
|
||||
(i32.eqz
|
||||
(i32.shr_u
|
||||
(get_local $3)
|
||||
(i32.const 31)
|
||||
)
|
||||
)
|
||||
(block
|
||||
(set_local $4
|
||||
(i32.sub
|
||||
(get_local $4)
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
(set_local $3
|
||||
(i32.shl
|
||||
(get_local $3)
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
(br $continue|0)
|
||||
)
|
||||
)
|
||||
)
|
||||
(i32.shl
|
||||
(get_local $2)
|
||||
(i32.add
|
||||
(i32.sub
|
||||
(i32.const 0)
|
||||
(get_local $4)
|
||||
)
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set_local $5
|
||||
(if (result i32)
|
||||
(get_local $6)
|
||||
(i32.or
|
||||
(i32.and
|
||||
(get_local $5)
|
||||
(i32.const 8388607)
|
||||
)
|
||||
(i32.const 8388608)
|
||||
)
|
||||
(block (result i32)
|
||||
(set_local $3
|
||||
(i32.shl
|
||||
(get_local $5)
|
||||
(i32.const 9)
|
||||
)
|
||||
)
|
||||
(loop $continue|1
|
||||
(if
|
||||
(i32.eqz
|
||||
(i32.shr_u
|
||||
(get_local $3)
|
||||
(i32.const 31)
|
||||
)
|
||||
)
|
||||
(block
|
||||
(set_local $6
|
||||
(i32.sub
|
||||
(get_local $6)
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
(set_local $3
|
||||
(i32.shl
|
||||
(get_local $3)
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
(br $continue|1)
|
||||
)
|
||||
)
|
||||
)
|
||||
(i32.shl
|
||||
(get_local $5)
|
||||
(i32.add
|
||||
(i32.sub
|
||||
(i32.const 0)
|
||||
(get_local $6)
|
||||
)
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(loop $continue|2
|
||||
(if
|
||||
(i32.gt_s
|
||||
(get_local $4)
|
||||
(get_local $6)
|
||||
)
|
||||
(block
|
||||
(if
|
||||
(i32.eqz
|
||||
(i32.shr_u
|
||||
(tee_local $3
|
||||
(i32.sub
|
||||
(get_local $2)
|
||||
(get_local $5)
|
||||
)
|
||||
)
|
||||
(i32.const 31)
|
||||
)
|
||||
)
|
||||
(block
|
||||
(if
|
||||
(i32.eqz
|
||||
(get_local $3)
|
||||
)
|
||||
(return
|
||||
(f32.mul
|
||||
(f32.const 0)
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set_local $2
|
||||
(get_local $3)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set_local $2
|
||||
(i32.shl
|
||||
(get_local $2)
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
(set_local $4
|
||||
(i32.sub
|
||||
(get_local $4)
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
(br $continue|2)
|
||||
)
|
||||
)
|
||||
)
|
||||
(if
|
||||
(i32.eqz
|
||||
(i32.shr_u
|
||||
(tee_local $3
|
||||
(i32.sub
|
||||
(get_local $2)
|
||||
(get_local $5)
|
||||
)
|
||||
)
|
||||
(i32.const 31)
|
||||
)
|
||||
)
|
||||
(block
|
||||
(if
|
||||
(i32.eqz
|
||||
(get_local $3)
|
||||
)
|
||||
(return
|
||||
(f32.mul
|
||||
(f32.const 0)
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
)
|
||||
(set_local $2
|
||||
(get_local $3)
|
||||
)
|
||||
)
|
||||
)
|
||||
(loop $continue|3
|
||||
(if
|
||||
(i32.eqz
|
||||
(i32.shr_u
|
||||
(get_local $2)
|
||||
(i32.const 23)
|
||||
)
|
||||
)
|
||||
(block
|
||||
(set_local $4
|
||||
(i32.sub
|
||||
(get_local $4)
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
(set_local $2
|
||||
(i32.shl
|
||||
(get_local $2)
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
(br $continue|3)
|
||||
)
|
||||
)
|
||||
)
|
||||
(f32.reinterpret/i32
|
||||
(i32.or
|
||||
(tee_local $2
|
||||
(if (result i32)
|
||||
(i32.gt_s
|
||||
(get_local $4)
|
||||
(i32.const 0)
|
||||
)
|
||||
(i32.or
|
||||
(i32.sub
|
||||
(get_local $2)
|
||||
(i32.const 8388608)
|
||||
)
|
||||
(i32.shl
|
||||
(get_local $4)
|
||||
(i32.const 23)
|
||||
)
|
||||
)
|
||||
(i32.shr_u
|
||||
(get_local $2)
|
||||
(i32.add
|
||||
(i32.sub
|
||||
(i32.const 0)
|
||||
(get_local $4)
|
||||
)
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(get_local $7)
|
||||
)
|
||||
)
|
||||
)
|
||||
(func $start (; 2 ;) (type $v)
|
||||
(local $0 f64)
|
||||
(local $1 f32)
|
||||
(if
|
||||
(f64.eq
|
||||
(tee_local $0
|
||||
@ -445,5 +813,57 @@
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
(if
|
||||
(f32.eq
|
||||
(tee_local $1
|
||||
(call $fmod/fmodf
|
||||
(f32.const 1)
|
||||
(f32.const nan:0x400000)
|
||||
)
|
||||
)
|
||||
(get_local $1)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
(if
|
||||
(f32.ne
|
||||
(call $fmod/fmodf
|
||||
(f32.const 1.5)
|
||||
(f32.const 1)
|
||||
)
|
||||
(f32.const 0.5)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
(if
|
||||
(i32.eqz
|
||||
(f32.lt
|
||||
(f32.sub
|
||||
(call $fmod/fmodf
|
||||
(f32.const 9.199999809265137)
|
||||
(f32.const 2)
|
||||
)
|
||||
(f32.const 1.2000000476837158)
|
||||
)
|
||||
(f32.const 1.1920928955078125e-07)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
(if
|
||||
(i32.eqz
|
||||
(f32.lt
|
||||
(f32.sub
|
||||
(call $fmod/fmodf
|
||||
(f32.const 9.199999809265137)
|
||||
(f32.const 3.700000047683716)
|
||||
)
|
||||
(f32.const 1.7999999523162842)
|
||||
)
|
||||
(f32.const 1.1920928955078125e-07)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
Reference in New Issue
Block a user