assemblyscript/tests/compiler/infer-type.optimized.wat

63 lines
1.3 KiB
Plaintext
Raw Normal View History

2017-12-23 13:48:04 +01:00
(module
(type $v (func))
(type $i (func (result i32)))
(type $I (func (result i64)))
(type $f (func (result f32)))
(type $F (func (result f64)))
2017-12-23 17:49:06 +01:00
(global $infer-type/ri (mut i32) (i32.const 0))
(global $infer-type/rI (mut i64) (i64.const 0))
(global $infer-type/rf (mut f32) (f32.const 0))
(global $infer-type/rF (mut f64) (f64.const 0))
2017-12-23 13:48:04 +01:00
(memory $0 1)
(export "memory" (memory $0))
(start $start)
(func $infer-type/locals (; 0 ;) (type $v)
(nop)
)
(func $infer-type/reti (; 1 ;) (type $i) (result i32)
(i32.const 0)
)
(func $infer-type/retI (; 2 ;) (type $I) (result i64)
(i64.const 0)
)
(func $infer-type/retf (; 3 ;) (type $f) (result f32)
(f32.const 0)
)
(func $infer-type/refF (; 4 ;) (type $F) (result f64)
(f64.const 0)
)
(func $start (; 5 ;) (type $v)
(local $0 i32)
(call $infer-type/locals)
2017-12-23 17:49:06 +01:00
(set_global $infer-type/ri
(call $infer-type/reti)
2017-12-23 17:49:06 +01:00
)
(set_global $infer-type/rI
(call $infer-type/retI)
2017-12-23 17:49:06 +01:00
)
(set_global $infer-type/rf
(call $infer-type/retf)
2017-12-23 17:49:06 +01:00
)
(set_global $infer-type/rF
(call $infer-type/refF)
)
(block $break|0
(loop $repeat|0
(br_if $break|0
(i32.ge_s
(get_local $0)
(i32.const 10)
)
)
(set_local $0
(i32.add
(get_local $0)
(i32.const 1)
)
)
(br $repeat|0)
)
)
2017-12-23 13:48:04 +01:00
)
)