assemblyscript/tests/compiler/new-without-allocator.untouched.wat

27 lines
601 B
Plaintext

(module
(type $i (func (result i32)))
(type $ii (func (param i32) (result i32)))
(global $HEAP_BASE i32 (i32.const 8))
(memory $0 0)
(export "memory" (memory $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)
)
)