2018-07-18 23:49:32 +02:00
|
|
|
(module
|
2019-03-01 00:01:23 +01:00
|
|
|
(type $FUNCSIG$i (func (result i32)))
|
|
|
|
(type $FUNCSIG$ii (func (param i32) (result i32)))
|
|
|
|
(type $FUNCSIG$v (func))
|
2018-07-18 23:49:32 +02:00
|
|
|
(memory $0 0)
|
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)
|
2019-02-21 00:11:22 +01:00
|
|
|
(global $~lib/memory/HEAP_BASE i32 (i32.const 8))
|
2018-07-18 23:49:32 +02:00
|
|
|
(export "memory" (memory $0))
|
2018-10-11 08:49:08 +02:00
|
|
|
(export "table" (table $0))
|
2018-07-18 23:49:32 +02:00
|
|
|
(export "test" (func $new-without-allocator/test))
|
2019-03-01 00:01:23 +01:00
|
|
|
(func $~lib/memory/memory.allocate (; 0 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
|
2018-11-08 08:04:24 +01:00
|
|
|
unreachable
|
2018-07-18 23:49:32 +02:00
|
|
|
)
|
2019-03-01 00:01:23 +01:00
|
|
|
(func $new-without-allocator/A#constructor (; 1 ;) (type $FUNCSIG$ii) (param $0 i32) (result i32)
|
2019-02-05 17:12:10 +01:00
|
|
|
local.get $0
|
2019-02-02 16:03:21 +01:00
|
|
|
i32.eqz
|
|
|
|
if
|
2018-11-08 08:04:24 +01:00
|
|
|
i32.const 0
|
|
|
|
call $~lib/memory/memory.allocate
|
2019-02-05 17:12:10 +01:00
|
|
|
local.set $0
|
2018-11-08 08:04:24 +01:00
|
|
|
end
|
2019-02-05 17:12:10 +01:00
|
|
|
local.get $0
|
2019-02-02 16:03:21 +01:00
|
|
|
)
|
2019-03-01 00:01:23 +01:00
|
|
|
(func $new-without-allocator/test (; 2 ;) (type $FUNCSIG$i) (result i32)
|
2019-02-02 16:03:21 +01:00
|
|
|
(local $0 i32)
|
|
|
|
i32.const 0
|
|
|
|
call $new-without-allocator/A#constructor
|
2019-02-05 17:12:10 +01:00
|
|
|
local.set $0
|
2018-11-08 08:04:24 +01:00
|
|
|
i32.const 3
|
2018-07-18 23:49:32 +02:00
|
|
|
)
|
2019-03-01 00:01:23 +01:00
|
|
|
(func $null (; 3 ;) (type $FUNCSIG$v)
|
2018-09-17 01:48:35 +02:00
|
|
|
)
|
2018-07-18 23:49:32 +02:00
|
|
|
)
|