mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-06-22 03:01:55 +00:00
Rename memory instructions; Rework constant handling
This commit is contained in:
26
tests/compiler/new-without-allocator.untouched.wat
Normal file
26
tests/compiler/new-without-allocator.untouched.wat
Normal file
@ -0,0 +1,26 @@
|
||||
(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)
|
||||
)
|
||||
)
|
Reference in New Issue
Block a user