2018-07-18 23:49:32 +02:00
|
|
|
(module
|
|
|
|
(type $i (func (result i32)))
|
|
|
|
(type $ii (func (param i32) (result i32)))
|
2018-09-17 01:48:35 +02:00
|
|
|
(type $v (func))
|
2018-07-18 23:49:32 +02:00
|
|
|
(memory $0 0)
|
2018-11-08 08:04:24 +01:00
|
|
|
(table $0 1 anyfunc)
|
2018-10-11 08:49:08 +02:00
|
|
|
(elem (i32.const 0) $null)
|
|
|
|
(global $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))
|
|
|
|
(func $~lib/memory/memory.allocate (; 0 ;) (type $ii) (param $0 i32) (result i32)
|
2018-11-08 08:04:24 +01:00
|
|
|
unreachable
|
2018-07-18 23:49:32 +02:00
|
|
|
)
|
|
|
|
(func $new-without-allocator/test (; 1 ;) (type $i) (result i32)
|
|
|
|
(local $0 i32)
|
|
|
|
(local $1 i32)
|
2018-11-08 08:04:24 +01:00
|
|
|
block (result i32)
|
|
|
|
i32.const 0
|
|
|
|
call $~lib/memory/memory.allocate
|
|
|
|
set_local $0
|
|
|
|
get_local $0
|
|
|
|
end
|
|
|
|
set_local $1
|
|
|
|
i32.const 3
|
2018-07-18 23:49:32 +02:00
|
|
|
)
|
2018-09-17 01:48:35 +02:00
|
|
|
(func $null (; 2 ;) (type $v)
|
|
|
|
)
|
2018-07-18 23:49:32 +02:00
|
|
|
)
|