mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-04-25 23:12:19 +00:00
873 lines
13 KiB
Plaintext
873 lines
13 KiB
Plaintext
(module
|
|
(type $v (func))
|
|
(global $binary/b (mut i32) (i32.const 0))
|
|
(global $binary/i (mut i32) (i32.const 0))
|
|
(global $binary/I (mut i64) (i64.const 0))
|
|
(global $binary/f (mut f32) (f32.const 0))
|
|
(global $binary/F (mut f64) (f64.const 0))
|
|
(global $HEAP_BASE i32 (i32.const 4))
|
|
(memory $0 1)
|
|
(export "memory" (memory $0))
|
|
(start $start)
|
|
(func $start (; 0 ;) (type $v)
|
|
(drop
|
|
(i32.lt_s
|
|
(get_global $binary/i)
|
|
(i32.const 1)
|
|
)
|
|
)
|
|
(drop
|
|
(i32.gt_s
|
|
(get_global $binary/i)
|
|
(i32.const 1)
|
|
)
|
|
)
|
|
(drop
|
|
(i32.le_s
|
|
(get_global $binary/i)
|
|
(i32.const 1)
|
|
)
|
|
)
|
|
(drop
|
|
(i32.ge_s
|
|
(get_global $binary/i)
|
|
(i32.const 1)
|
|
)
|
|
)
|
|
(drop
|
|
(i32.eq
|
|
(get_global $binary/i)
|
|
(i32.const 1)
|
|
)
|
|
)
|
|
(drop
|
|
(i32.eq
|
|
(get_global $binary/i)
|
|
(i32.const 1)
|
|
)
|
|
)
|
|
(drop
|
|
(i32.add
|
|
(get_global $binary/i)
|
|
(i32.const 1)
|
|
)
|
|
)
|
|
(drop
|
|
(i32.sub
|
|
(get_global $binary/i)
|
|
(i32.const 1)
|
|
)
|
|
)
|
|
(drop
|
|
(i32.mul
|
|
(get_global $binary/i)
|
|
(i32.const 1)
|
|
)
|
|
)
|
|
(drop
|
|
(i32.div_s
|
|
(get_global $binary/i)
|
|
(i32.const 1)
|
|
)
|
|
)
|
|
(drop
|
|
(i32.rem_s
|
|
(get_global $binary/i)
|
|
(i32.const 1)
|
|
)
|
|
)
|
|
(drop
|
|
(i32.shl
|
|
(get_global $binary/i)
|
|
(i32.const 1)
|
|
)
|
|
)
|
|
(drop
|
|
(i32.shr_s
|
|
(get_global $binary/i)
|
|
(i32.const 1)
|
|
)
|
|
)
|
|
(drop
|
|
(i32.shr_u
|
|
(get_global $binary/i)
|
|
(i32.const 1)
|
|
)
|
|
)
|
|
(drop
|
|
(i32.and
|
|
(get_global $binary/i)
|
|
(i32.const 1)
|
|
)
|
|
)
|
|
(drop
|
|
(i32.or
|
|
(get_global $binary/i)
|
|
(i32.const 1)
|
|
)
|
|
)
|
|
(drop
|
|
(i32.xor
|
|
(get_global $binary/i)
|
|
(i32.const 1)
|
|
)
|
|
)
|
|
(set_global $binary/b
|
|
(i32.lt_s
|
|
(get_global $binary/i)
|
|
(i32.const 1)
|
|
)
|
|
)
|
|
(set_global $binary/b
|
|
(i32.gt_s
|
|
(get_global $binary/i)
|
|
(i32.const 1)
|
|
)
|
|
)
|
|
(set_global $binary/b
|
|
(i32.le_s
|
|
(get_global $binary/i)
|
|
(i32.const 1)
|
|
)
|
|
)
|
|
(set_global $binary/b
|
|
(i32.ge_s
|
|
(get_global $binary/i)
|
|
(i32.const 1)
|
|
)
|
|
)
|
|
(set_global $binary/b
|
|
(i32.eq
|
|
(get_global $binary/i)
|
|
(i32.const 1)
|
|
)
|
|
)
|
|
(set_global $binary/b
|
|
(i32.eq
|
|
(get_global $binary/i)
|
|
(i32.const 1)
|
|
)
|
|
)
|
|
(set_global $binary/i
|
|
(i32.add
|
|
(get_global $binary/i)
|
|
(i32.const 1)
|
|
)
|
|
)
|
|
(set_global $binary/i
|
|
(i32.sub
|
|
(get_global $binary/i)
|
|
(i32.const 1)
|
|
)
|
|
)
|
|
(set_global $binary/i
|
|
(i32.mul
|
|
(get_global $binary/i)
|
|
(i32.const 1)
|
|
)
|
|
)
|
|
(set_global $binary/i
|
|
(i32.div_s
|
|
(get_global $binary/i)
|
|
(i32.const 1)
|
|
)
|
|
)
|
|
(set_global $binary/i
|
|
(i32.rem_s
|
|
(get_global $binary/i)
|
|
(i32.const 1)
|
|
)
|
|
)
|
|
(set_global $binary/i
|
|
(i32.shl
|
|
(get_global $binary/i)
|
|
(i32.const 1)
|
|
)
|
|
)
|
|
(set_global $binary/i
|
|
(i32.shr_s
|
|
(get_global $binary/i)
|
|
(i32.const 1)
|
|
)
|
|
)
|
|
(set_global $binary/i
|
|
(i32.shr_u
|
|
(get_global $binary/i)
|
|
(i32.const 1)
|
|
)
|
|
)
|
|
(set_global $binary/i
|
|
(i32.and
|
|
(get_global $binary/i)
|
|
(i32.const 1)
|
|
)
|
|
)
|
|
(set_global $binary/i
|
|
(i32.or
|
|
(get_global $binary/i)
|
|
(i32.const 1)
|
|
)
|
|
)
|
|
(set_global $binary/i
|
|
(i32.xor
|
|
(get_global $binary/i)
|
|
(i32.const 1)
|
|
)
|
|
)
|
|
(set_global $binary/i
|
|
(i32.add
|
|
(get_global $binary/i)
|
|
(i32.const 1)
|
|
)
|
|
)
|
|
(set_global $binary/i
|
|
(i32.sub
|
|
(get_global $binary/i)
|
|
(i32.const 1)
|
|
)
|
|
)
|
|
(set_global $binary/i
|
|
(i32.mul
|
|
(get_global $binary/i)
|
|
(i32.const 1)
|
|
)
|
|
)
|
|
(set_global $binary/i
|
|
(i32.rem_s
|
|
(get_global $binary/i)
|
|
(i32.const 1)
|
|
)
|
|
)
|
|
(set_global $binary/i
|
|
(i32.shl
|
|
(get_global $binary/i)
|
|
(i32.const 1)
|
|
)
|
|
)
|
|
(set_global $binary/i
|
|
(i32.shr_s
|
|
(get_global $binary/i)
|
|
(i32.const 1)
|
|
)
|
|
)
|
|
(set_global $binary/i
|
|
(i32.shr_u
|
|
(get_global $binary/i)
|
|
(i32.const 1)
|
|
)
|
|
)
|
|
(set_global $binary/i
|
|
(i32.and
|
|
(get_global $binary/i)
|
|
(i32.const 1)
|
|
)
|
|
)
|
|
(set_global $binary/i
|
|
(i32.or
|
|
(get_global $binary/i)
|
|
(i32.const 1)
|
|
)
|
|
)
|
|
(set_global $binary/i
|
|
(i32.xor
|
|
(get_global $binary/i)
|
|
(i32.const 1)
|
|
)
|
|
)
|
|
(drop
|
|
(i64.lt_s
|
|
(get_global $binary/I)
|
|
(i64.const 1)
|
|
)
|
|
)
|
|
(drop
|
|
(i64.gt_s
|
|
(get_global $binary/I)
|
|
(i64.const 1)
|
|
)
|
|
)
|
|
(drop
|
|
(i64.le_s
|
|
(get_global $binary/I)
|
|
(i64.const 1)
|
|
)
|
|
)
|
|
(drop
|
|
(i64.ge_s
|
|
(get_global $binary/I)
|
|
(i64.const 1)
|
|
)
|
|
)
|
|
(drop
|
|
(i64.eq
|
|
(get_global $binary/I)
|
|
(i64.const 1)
|
|
)
|
|
)
|
|
(drop
|
|
(i64.eq
|
|
(get_global $binary/I)
|
|
(i64.const 1)
|
|
)
|
|
)
|
|
(drop
|
|
(i64.add
|
|
(get_global $binary/I)
|
|
(i64.const 1)
|
|
)
|
|
)
|
|
(drop
|
|
(i64.sub
|
|
(get_global $binary/I)
|
|
(i64.const 1)
|
|
)
|
|
)
|
|
(drop
|
|
(i64.mul
|
|
(get_global $binary/I)
|
|
(i64.const 1)
|
|
)
|
|
)
|
|
(drop
|
|
(i64.div_s
|
|
(get_global $binary/I)
|
|
(i64.const 1)
|
|
)
|
|
)
|
|
(drop
|
|
(i64.rem_s
|
|
(get_global $binary/I)
|
|
(i64.const 1)
|
|
)
|
|
)
|
|
(drop
|
|
(i64.shl
|
|
(get_global $binary/I)
|
|
(i64.const 1)
|
|
)
|
|
)
|
|
(drop
|
|
(i64.shr_s
|
|
(get_global $binary/I)
|
|
(i64.const 1)
|
|
)
|
|
)
|
|
(drop
|
|
(i64.shr_u
|
|
(get_global $binary/I)
|
|
(i64.const 1)
|
|
)
|
|
)
|
|
(drop
|
|
(i64.and
|
|
(get_global $binary/I)
|
|
(i64.const 1)
|
|
)
|
|
)
|
|
(drop
|
|
(i64.or
|
|
(get_global $binary/I)
|
|
(i64.const 1)
|
|
)
|
|
)
|
|
(drop
|
|
(i64.xor
|
|
(get_global $binary/I)
|
|
(i64.const 1)
|
|
)
|
|
)
|
|
(set_global $binary/b
|
|
(i64.lt_s
|
|
(get_global $binary/I)
|
|
(i64.const 1)
|
|
)
|
|
)
|
|
(set_global $binary/b
|
|
(i64.gt_s
|
|
(get_global $binary/I)
|
|
(i64.const 1)
|
|
)
|
|
)
|
|
(set_global $binary/b
|
|
(i64.le_s
|
|
(get_global $binary/I)
|
|
(i64.const 1)
|
|
)
|
|
)
|
|
(set_global $binary/b
|
|
(i64.ge_s
|
|
(get_global $binary/I)
|
|
(i64.const 1)
|
|
)
|
|
)
|
|
(set_global $binary/b
|
|
(i64.eq
|
|
(get_global $binary/I)
|
|
(i64.const 1)
|
|
)
|
|
)
|
|
(set_global $binary/b
|
|
(i64.eq
|
|
(get_global $binary/I)
|
|
(i64.const 1)
|
|
)
|
|
)
|
|
(set_global $binary/I
|
|
(i64.add
|
|
(get_global $binary/I)
|
|
(i64.const 1)
|
|
)
|
|
)
|
|
(set_global $binary/I
|
|
(i64.sub
|
|
(get_global $binary/I)
|
|
(i64.const 1)
|
|
)
|
|
)
|
|
(set_global $binary/I
|
|
(i64.mul
|
|
(get_global $binary/I)
|
|
(i64.const 1)
|
|
)
|
|
)
|
|
(set_global $binary/I
|
|
(i64.div_s
|
|
(get_global $binary/I)
|
|
(i64.const 1)
|
|
)
|
|
)
|
|
(set_global $binary/I
|
|
(i64.rem_s
|
|
(get_global $binary/I)
|
|
(i64.const 1)
|
|
)
|
|
)
|
|
(set_global $binary/I
|
|
(i64.shl
|
|
(get_global $binary/I)
|
|
(i64.const 1)
|
|
)
|
|
)
|
|
(set_global $binary/I
|
|
(i64.shr_s
|
|
(get_global $binary/I)
|
|
(i64.const 1)
|
|
)
|
|
)
|
|
(set_global $binary/I
|
|
(i64.shr_u
|
|
(get_global $binary/I)
|
|
(i64.const 1)
|
|
)
|
|
)
|
|
(set_global $binary/I
|
|
(i64.and
|
|
(get_global $binary/I)
|
|
(i64.const 1)
|
|
)
|
|
)
|
|
(set_global $binary/I
|
|
(i64.or
|
|
(get_global $binary/I)
|
|
(i64.const 1)
|
|
)
|
|
)
|
|
(set_global $binary/I
|
|
(i64.xor
|
|
(get_global $binary/I)
|
|
(i64.const 1)
|
|
)
|
|
)
|
|
(set_global $binary/I
|
|
(i64.add
|
|
(get_global $binary/I)
|
|
(i64.const 1)
|
|
)
|
|
)
|
|
(set_global $binary/I
|
|
(i64.sub
|
|
(get_global $binary/I)
|
|
(i64.const 1)
|
|
)
|
|
)
|
|
(set_global $binary/I
|
|
(i64.mul
|
|
(get_global $binary/I)
|
|
(i64.const 1)
|
|
)
|
|
)
|
|
(set_global $binary/I
|
|
(i64.rem_s
|
|
(get_global $binary/I)
|
|
(i64.const 1)
|
|
)
|
|
)
|
|
(set_global $binary/I
|
|
(i64.shl
|
|
(get_global $binary/I)
|
|
(i64.const 1)
|
|
)
|
|
)
|
|
(set_global $binary/I
|
|
(i64.shr_s
|
|
(get_global $binary/I)
|
|
(i64.const 1)
|
|
)
|
|
)
|
|
(set_global $binary/I
|
|
(i64.shr_u
|
|
(get_global $binary/I)
|
|
(i64.const 1)
|
|
)
|
|
)
|
|
(set_global $binary/I
|
|
(i64.and
|
|
(get_global $binary/I)
|
|
(i64.const 1)
|
|
)
|
|
)
|
|
(set_global $binary/I
|
|
(i64.or
|
|
(get_global $binary/I)
|
|
(i64.const 1)
|
|
)
|
|
)
|
|
(set_global $binary/I
|
|
(i64.xor
|
|
(get_global $binary/I)
|
|
(i64.const 1)
|
|
)
|
|
)
|
|
(drop
|
|
(f32.lt
|
|
(get_global $binary/f)
|
|
(f32.const 1)
|
|
)
|
|
)
|
|
(drop
|
|
(f32.gt
|
|
(get_global $binary/f)
|
|
(f32.const 1)
|
|
)
|
|
)
|
|
(drop
|
|
(f32.le
|
|
(get_global $binary/f)
|
|
(f32.const 1)
|
|
)
|
|
)
|
|
(drop
|
|
(f32.ge
|
|
(get_global $binary/f)
|
|
(f32.const 1)
|
|
)
|
|
)
|
|
(drop
|
|
(f32.eq
|
|
(get_global $binary/f)
|
|
(f32.const 1)
|
|
)
|
|
)
|
|
(drop
|
|
(f32.eq
|
|
(get_global $binary/f)
|
|
(f32.const 1)
|
|
)
|
|
)
|
|
(drop
|
|
(f32.add
|
|
(get_global $binary/f)
|
|
(f32.const 1)
|
|
)
|
|
)
|
|
(drop
|
|
(f32.sub
|
|
(get_global $binary/f)
|
|
(f32.const 1)
|
|
)
|
|
)
|
|
(drop
|
|
(f32.mul
|
|
(get_global $binary/f)
|
|
(f32.const 1)
|
|
)
|
|
)
|
|
(drop
|
|
(f32.div
|
|
(get_global $binary/f)
|
|
(f32.const 1)
|
|
)
|
|
)
|
|
(set_global $binary/b
|
|
(f32.lt
|
|
(get_global $binary/f)
|
|
(f32.const 1)
|
|
)
|
|
)
|
|
(set_global $binary/b
|
|
(f32.gt
|
|
(get_global $binary/f)
|
|
(f32.const 1)
|
|
)
|
|
)
|
|
(set_global $binary/b
|
|
(f32.le
|
|
(get_global $binary/f)
|
|
(f32.const 1)
|
|
)
|
|
)
|
|
(set_global $binary/b
|
|
(f32.ge
|
|
(get_global $binary/f)
|
|
(f32.const 1)
|
|
)
|
|
)
|
|
(set_global $binary/b
|
|
(f32.eq
|
|
(get_global $binary/f)
|
|
(f32.const 1)
|
|
)
|
|
)
|
|
(set_global $binary/b
|
|
(f32.eq
|
|
(get_global $binary/f)
|
|
(f32.const 1)
|
|
)
|
|
)
|
|
(set_global $binary/f
|
|
(f32.add
|
|
(get_global $binary/f)
|
|
(f32.const 1)
|
|
)
|
|
)
|
|
(set_global $binary/f
|
|
(f32.sub
|
|
(get_global $binary/f)
|
|
(f32.const 1)
|
|
)
|
|
)
|
|
(set_global $binary/f
|
|
(f32.mul
|
|
(get_global $binary/f)
|
|
(f32.const 1)
|
|
)
|
|
)
|
|
(set_global $binary/f
|
|
(f32.div
|
|
(get_global $binary/f)
|
|
(f32.const 1)
|
|
)
|
|
)
|
|
(set_global $binary/f
|
|
(f32.add
|
|
(get_global $binary/f)
|
|
(f32.const 1)
|
|
)
|
|
)
|
|
(set_global $binary/f
|
|
(f32.sub
|
|
(get_global $binary/f)
|
|
(f32.const 1)
|
|
)
|
|
)
|
|
(set_global $binary/f
|
|
(f32.mul
|
|
(get_global $binary/f)
|
|
(f32.const 1)
|
|
)
|
|
)
|
|
(drop
|
|
(f64.lt
|
|
(get_global $binary/F)
|
|
(f64.const 1)
|
|
)
|
|
)
|
|
(drop
|
|
(f64.gt
|
|
(get_global $binary/F)
|
|
(f64.const 1)
|
|
)
|
|
)
|
|
(drop
|
|
(f64.le
|
|
(get_global $binary/F)
|
|
(f64.const 1)
|
|
)
|
|
)
|
|
(drop
|
|
(f64.ge
|
|
(get_global $binary/F)
|
|
(f64.const 1)
|
|
)
|
|
)
|
|
(drop
|
|
(f64.eq
|
|
(get_global $binary/F)
|
|
(f64.const 1)
|
|
)
|
|
)
|
|
(drop
|
|
(f64.eq
|
|
(get_global $binary/F)
|
|
(f64.const 1)
|
|
)
|
|
)
|
|
(drop
|
|
(f64.add
|
|
(get_global $binary/F)
|
|
(f64.const 1)
|
|
)
|
|
)
|
|
(drop
|
|
(f64.sub
|
|
(get_global $binary/F)
|
|
(f64.const 1)
|
|
)
|
|
)
|
|
(drop
|
|
(f64.mul
|
|
(get_global $binary/F)
|
|
(f64.const 1)
|
|
)
|
|
)
|
|
(drop
|
|
(f64.div
|
|
(get_global $binary/F)
|
|
(f64.const 1)
|
|
)
|
|
)
|
|
(set_global $binary/b
|
|
(f64.lt
|
|
(get_global $binary/F)
|
|
(f64.const 1)
|
|
)
|
|
)
|
|
(set_global $binary/b
|
|
(f64.gt
|
|
(get_global $binary/F)
|
|
(f64.const 1)
|
|
)
|
|
)
|
|
(set_global $binary/b
|
|
(f64.le
|
|
(get_global $binary/F)
|
|
(f64.const 1)
|
|
)
|
|
)
|
|
(set_global $binary/b
|
|
(f64.ge
|
|
(get_global $binary/F)
|
|
(f64.const 1)
|
|
)
|
|
)
|
|
(set_global $binary/b
|
|
(f64.eq
|
|
(get_global $binary/F)
|
|
(f64.const 1)
|
|
)
|
|
)
|
|
(set_global $binary/b
|
|
(f64.eq
|
|
(get_global $binary/F)
|
|
(f64.const 1)
|
|
)
|
|
)
|
|
(set_global $binary/F
|
|
(f64.add
|
|
(get_global $binary/F)
|
|
(f64.const 1)
|
|
)
|
|
)
|
|
(set_global $binary/F
|
|
(f64.sub
|
|
(get_global $binary/F)
|
|
(f64.const 1)
|
|
)
|
|
)
|
|
(set_global $binary/F
|
|
(f64.mul
|
|
(get_global $binary/F)
|
|
(f64.const 1)
|
|
)
|
|
)
|
|
(set_global $binary/F
|
|
(f64.div
|
|
(get_global $binary/F)
|
|
(f64.const 1)
|
|
)
|
|
)
|
|
(set_global $binary/F
|
|
(f64.add
|
|
(get_global $binary/F)
|
|
(f64.const 1)
|
|
)
|
|
)
|
|
(set_global $binary/F
|
|
(f64.sub
|
|
(get_global $binary/F)
|
|
(f64.const 1)
|
|
)
|
|
)
|
|
(set_global $binary/F
|
|
(f64.mul
|
|
(get_global $binary/F)
|
|
(f64.const 1)
|
|
)
|
|
)
|
|
)
|
|
)
|
|
(;
|
|
[program.elements]
|
|
GLOBAL: NaN
|
|
GLOBAL: Infinity
|
|
FUNCTION_PROTOTYPE: isNaN
|
|
FUNCTION_PROTOTYPE: isFinite
|
|
FUNCTION_PROTOTYPE: clz
|
|
FUNCTION_PROTOTYPE: ctz
|
|
FUNCTION_PROTOTYPE: popcnt
|
|
FUNCTION_PROTOTYPE: rotl
|
|
FUNCTION_PROTOTYPE: rotr
|
|
FUNCTION_PROTOTYPE: abs
|
|
FUNCTION_PROTOTYPE: max
|
|
FUNCTION_PROTOTYPE: min
|
|
FUNCTION_PROTOTYPE: ceil
|
|
FUNCTION_PROTOTYPE: floor
|
|
FUNCTION_PROTOTYPE: copysign
|
|
FUNCTION_PROTOTYPE: nearest
|
|
FUNCTION_PROTOTYPE: reinterpret
|
|
FUNCTION_PROTOTYPE: sqrt
|
|
FUNCTION_PROTOTYPE: trunc
|
|
FUNCTION_PROTOTYPE: load
|
|
FUNCTION_PROTOTYPE: store
|
|
FUNCTION_PROTOTYPE: sizeof
|
|
FUNCTION_PROTOTYPE: select
|
|
FUNCTION_PROTOTYPE: unreachable
|
|
FUNCTION_PROTOTYPE: current_memory
|
|
FUNCTION_PROTOTYPE: grow_memory
|
|
FUNCTION_PROTOTYPE: parseInt
|
|
FUNCTION_PROTOTYPE: parseFloat
|
|
FUNCTION_PROTOTYPE: changetype
|
|
FUNCTION_PROTOTYPE: assert
|
|
FUNCTION_PROTOTYPE: i8
|
|
FUNCTION_PROTOTYPE: i16
|
|
FUNCTION_PROTOTYPE: i32
|
|
FUNCTION_PROTOTYPE: i64
|
|
FUNCTION_PROTOTYPE: u8
|
|
FUNCTION_PROTOTYPE: u16
|
|
FUNCTION_PROTOTYPE: u32
|
|
FUNCTION_PROTOTYPE: u64
|
|
FUNCTION_PROTOTYPE: bool
|
|
FUNCTION_PROTOTYPE: f32
|
|
FUNCTION_PROTOTYPE: f64
|
|
FUNCTION_PROTOTYPE: isize
|
|
FUNCTION_PROTOTYPE: usize
|
|
GLOBAL: HEAP_BASE
|
|
GLOBAL: binary/b
|
|
GLOBAL: binary/i
|
|
GLOBAL: binary/I
|
|
GLOBAL: binary/f
|
|
GLOBAL: binary/F
|
|
[program.exports]
|
|
|
|
;)
|