assemblyscript/tests/compiler/new-without-allocator.untouched.wat
2018-10-11 08:49:08 +02:00

33 lines
729 B
Plaintext

(module
(type $i (func (result i32)))
(type $ii (func (param i32) (result i32)))
(type $v (func))
(memory $0 0)
(table 1 anyfunc)
(elem (i32.const 0) $null)
(global $HEAP_BASE i32 (i32.const 8))
(export "memory" (memory $0))
(export "table" (table $0))
(export "test" (func $new-without-allocator/test))
(func $~lib/memory/memory.allocate (; 0 ;) (type $ii) (param $0 i32) (result i32)
(unreachable)
)
(func $new-without-allocator/test (; 1 ;) (type $i) (result i32)
(local $0 i32)
(local $1 i32)
(set_local $1
(block (result i32)
(set_local $0
(call $~lib/memory/memory.allocate
(i32.const 0)
)
)
(get_local $0)
)
)
(i32.const 3)
)
(func $null (; 2 ;) (type $v)
)
)