2018-04-13 12:25:27 +02:00
|
|
|
(module
|
2019-03-01 00:01:23 +01:00
|
|
|
(type $FUNCSIG$ii (func (param i32) (result i32)))
|
|
|
|
(type $FUNCSIG$viiii (func (param i32 i32 i32 i32)))
|
|
|
|
(type $FUNCSIG$dd (func (param f64) (result f64)))
|
|
|
|
(type $FUNCSIG$ff (func (param f32) (result f32)))
|
|
|
|
(type $FUNCSIG$v (func))
|
2019-06-05 23:15:39 +02:00
|
|
|
(import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32)))
|
2018-04-13 12:25:27 +02:00
|
|
|
(memory $0 1)
|
2019-06-05 23:15:39 +02:00
|
|
|
(data (i32.const 8) " \00\00\00\01\00\00\00\01\00\00\00 \00\00\00c\00a\00l\00l\00-\00i\00n\00f\00e\00r\00r\00e\00d\00.\00t\00s\00")
|
2019-02-05 17:12:10 +01:00
|
|
|
(table $0 1 funcref)
|
2018-10-11 08:49:08 +02:00
|
|
|
(elem (i32.const 0) $null)
|
2018-04-13 12:25:27 +02:00
|
|
|
(export "memory" (memory $0))
|
|
|
|
(start $start)
|
2019-03-01 00:01:23 +01:00
|
|
|
(func $call-inferred/foo<i32> (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
|
2019-02-05 17:12:10 +01:00
|
|
|
local.get $0
|
2018-04-13 12:25:27 +02:00
|
|
|
)
|
2019-03-01 00:01:23 +01:00
|
|
|
(func $call-inferred/foo<f64> (; 2 ;) (type $FUNCSIG$dd) (param $0 f64) (result f64)
|
2019-02-05 17:12:10 +01:00
|
|
|
local.get $0
|
2018-04-13 12:25:27 +02:00
|
|
|
)
|
2019-03-01 00:01:23 +01:00
|
|
|
(func $call-inferred/foo<f32> (; 3 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32)
|
2019-02-05 17:12:10 +01:00
|
|
|
local.get $0
|
2018-04-13 12:25:27 +02:00
|
|
|
)
|
2019-03-01 00:01:23 +01:00
|
|
|
(func $call-inferred/bar<f32> (; 4 ;) (type $FUNCSIG$ff) (param $0 f32) (result f32)
|
2019-02-05 17:12:10 +01:00
|
|
|
local.get $0
|
2018-04-13 12:25:27 +02:00
|
|
|
)
|
2019-03-01 00:01:23 +01:00
|
|
|
(func $start:call-inferred (; 5 ;) (type $FUNCSIG$v)
|
2018-11-08 08:04:24 +01:00
|
|
|
i32.const 42
|
|
|
|
call $call-inferred/foo<i32>
|
|
|
|
i32.const 42
|
|
|
|
i32.eq
|
|
|
|
i32.eqz
|
|
|
|
if
|
|
|
|
i32.const 0
|
2019-06-05 23:15:39 +02:00
|
|
|
i32.const 24
|
2018-11-08 08:04:24 +01:00
|
|
|
i32.const 5
|
|
|
|
i32.const 0
|
2019-06-05 23:15:39 +02:00
|
|
|
call $~lib/builtins/abort
|
2018-11-08 08:04:24 +01:00
|
|
|
unreachable
|
|
|
|
end
|
|
|
|
f64.const 42
|
|
|
|
call $call-inferred/foo<f64>
|
|
|
|
f64.const 42
|
|
|
|
f64.eq
|
|
|
|
i32.eqz
|
|
|
|
if
|
|
|
|
i32.const 0
|
2019-06-05 23:15:39 +02:00
|
|
|
i32.const 24
|
2018-11-08 08:04:24 +01:00
|
|
|
i32.const 6
|
|
|
|
i32.const 0
|
2019-06-05 23:15:39 +02:00
|
|
|
call $~lib/builtins/abort
|
2018-11-08 08:04:24 +01:00
|
|
|
unreachable
|
|
|
|
end
|
|
|
|
f32.const 42
|
|
|
|
call $call-inferred/foo<f32>
|
|
|
|
f32.const 42
|
|
|
|
f32.eq
|
|
|
|
i32.eqz
|
|
|
|
if
|
|
|
|
i32.const 0
|
2019-06-05 23:15:39 +02:00
|
|
|
i32.const 24
|
2018-11-08 08:04:24 +01:00
|
|
|
i32.const 7
|
|
|
|
i32.const 0
|
2019-06-05 23:15:39 +02:00
|
|
|
call $~lib/builtins/abort
|
2018-11-08 08:04:24 +01:00
|
|
|
unreachable
|
|
|
|
end
|
|
|
|
f32.const 42
|
|
|
|
call $call-inferred/bar<f32>
|
|
|
|
f32.const 42
|
|
|
|
f32.eq
|
|
|
|
i32.eqz
|
|
|
|
if
|
|
|
|
i32.const 0
|
2019-06-05 23:15:39 +02:00
|
|
|
i32.const 24
|
2018-11-08 08:04:24 +01:00
|
|
|
i32.const 13
|
|
|
|
i32.const 0
|
2019-06-05 23:15:39 +02:00
|
|
|
call $~lib/builtins/abort
|
2018-11-08 08:04:24 +01:00
|
|
|
unreachable
|
|
|
|
end
|
2018-04-13 12:25:27 +02:00
|
|
|
)
|
2019-03-01 00:01:23 +01:00
|
|
|
(func $start (; 6 ;) (type $FUNCSIG$v)
|
2019-02-21 00:11:22 +01:00
|
|
|
call $start:call-inferred
|
|
|
|
)
|
2019-03-01 00:01:23 +01:00
|
|
|
(func $null (; 7 ;) (type $FUNCSIG$v)
|
2018-09-17 01:48:35 +02:00
|
|
|
)
|
2018-04-13 12:25:27 +02:00
|
|
|
)
|