mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-06-14 15:31:31 +00:00
Fix issues with more than 64 locals, see #99
This commit is contained in:
60
tests/compiler/many-locals.optimized.wat
Normal file
60
tests/compiler/many-locals.optimized.wat
Normal file
@ -0,0 +1,60 @@
|
||||
(module
|
||||
(type $ii (func (param i32) (result i32)))
|
||||
(type $iiiiv (func (param i32 i32 i32 i32)))
|
||||
(type $v (func))
|
||||
(import "env" "abort" (func $abort (param i32 i32 i32 i32)))
|
||||
(memory $0 1)
|
||||
(data (i32.const 4) "\0e\00\00\00m\00a\00n\00y\00-\00l\00o\00c\00a\00l\00s\00.\00t\00s")
|
||||
(export "testI32" (func $many-locals/testI32))
|
||||
(export "testI8" (func $many-locals/testI8))
|
||||
(export "memory" (memory $0))
|
||||
(start $start)
|
||||
(func $many-locals/testI32 (; 1 ;) (type $ii) (param $0 i32) (result i32)
|
||||
(get_local $0)
|
||||
)
|
||||
(func $many-locals/testI8 (; 2 ;) (type $ii) (param $0 i32) (result i32)
|
||||
(i32.shr_s
|
||||
(i32.shl
|
||||
(get_local $0)
|
||||
(i32.const 24)
|
||||
)
|
||||
(i32.const 24)
|
||||
)
|
||||
)
|
||||
(func $start (; 3 ;) (type $v)
|
||||
(if
|
||||
(i32.ne
|
||||
(call $many-locals/testI32
|
||||
(i32.const 42)
|
||||
)
|
||||
(i32.const 42)
|
||||
)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 4)
|
||||
(i32.const 133)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
(if
|
||||
(i32.ne
|
||||
(call $many-locals/testI8
|
||||
(i32.const 42)
|
||||
)
|
||||
(i32.const 42)
|
||||
)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 4)
|
||||
(i32.const 267)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
Reference in New Issue
Block a user