mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-06-23 03:31:44 +00:00
Revised implicit type conversions; Initial function expression compilation
This commit is contained in:
36
tests/compiler/function-expression.untouched.wat
Normal file
36
tests/compiler/function-expression.untouched.wat
Normal file
@ -0,0 +1,36 @@
|
||||
(module
|
||||
(type $ii (func (param i32) (result i32)))
|
||||
(type $v (func))
|
||||
(global $function-expression/f1 (mut i32) (i32.const 0))
|
||||
(global $function-expression/f2 (mut i32) (i32.const 1))
|
||||
(global $function-expression/f3 (mut i32) (i32.const 2))
|
||||
(global $HEAP_BASE i32 (i32.const 4))
|
||||
(table 3 3 anyfunc)
|
||||
(elem (i32.const 0) $start~anonymous|0 $start~anonymous|1 $start~someName|2)
|
||||
(memory $0 1)
|
||||
(export "memory" (memory $0))
|
||||
(start $start)
|
||||
(func $start~anonymous|0 (; 0 ;) (type $ii) (param $0 i32) (result i32)
|
||||
(return
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
(func $start~anonymous|1 (; 1 ;) (type $ii) (param $0 i32) (result i32)
|
||||
(return
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
(func $start~someName|2 (; 2 ;) (type $v)
|
||||
)
|
||||
(func $start (; 3 ;) (type $v)
|
||||
(drop
|
||||
(get_global $function-expression/f1)
|
||||
)
|
||||
(drop
|
||||
(get_global $function-expression/f2)
|
||||
)
|
||||
(drop
|
||||
(get_global $function-expression/f3)
|
||||
)
|
||||
)
|
||||
)
|
Reference in New Issue
Block a user