assemblyscript/tests/compiler/new.optimized.wast
dcodeIO 64c939fdc4 Initial implementation of 'new'
This doesn't yet call the constructor or use provided parameters and just allocates raw memory
2018-01-19 16:13:14 +01:00

21 lines
407 B
Plaintext

(module
(type $ii (func (param i32) (result i32)))
(type $v (func))
(import "env" "allocate_memory" (func $new/allocate_memory (param i32) (result i32)))
(memory $0 1)
(export "test" (func $new/test))
(export "memory" (memory $0))
(func $new/test (; 1 ;) (type $v)
(drop
(call $new/allocate_memory
(i32.const 4)
)
)
(drop
(call $new/allocate_memory
(i32.const 8)
)
)
)
)