summaryrefslogtreecommitdiff
path: root/test/ctor-eval/results.wast.out
diff options
context:
space:
mode:
authorAlon Zakai <azakai@google.com>2022-01-12 09:08:07 -0800
committerGitHub <noreply@github.com>2022-01-12 09:08:07 -0800
commitb48c24f2f967b23ff65f23d7c3cccda4872b5926 (patch)
tree529aa29b6506f4cc71bfe208e8cc0fcec568330d /test/ctor-eval/results.wast.out
parentb63fea1feefce42be49fa28fd85d01d4a52603a2 (diff)
downloadbinaryen-b48c24f2f967b23ff65f23d7c3cccda4872b5926.tar.gz
binaryen-b48c24f2f967b23ff65f23d7c3cccda4872b5926.tar.bz2
binaryen-b48c24f2f967b23ff65f23d7c3cccda4872b5926.zip
[ctor-eval] Eval functions with a return value (#4443)
This is necessary for e.g. main() which returns an i32.
Diffstat (limited to 'test/ctor-eval/results.wast.out')
-rw-r--r--test/ctor-eval/results.wast.out53
1 files changed, 46 insertions, 7 deletions
diff --git a/test/ctor-eval/results.wast.out b/test/ctor-eval/results.wast.out
index b4c947eb7..ae5172324 100644
--- a/test/ctor-eval/results.wast.out
+++ b/test/ctor-eval/results.wast.out
@@ -1,12 +1,16 @@
(module
- (type $none_=>_none (func))
(type $none_=>_i32 (func (result i32)))
+ (type $none_=>_none (func))
+ (import "import" "import" (func $import))
(global $global1 (mut i32) (i32.const 11))
(global $global2 (mut i32) (i32.const 12))
- (global $global3 (mut i32) (i32.const 3))
+ (global $global3 (mut i32) (i32.const 13))
+ (global $global4 (mut i32) (i32.const 14))
+ (global $global5 (mut i32) (i32.const 15))
(export "test1" (func $test1_0))
- (export "test3" (func $test3))
- (export "keepalive" (func $3))
+ (export "test3" (func $test3_0))
+ (export "test5" (func $test5_0))
+ (export "keepalive" (func $5))
(func $test1
(global.set $global1
(i32.const 11)
@@ -23,18 +27,53 @@
)
(i32.const 42)
)
- (func $3 (result i32)
+ (func $test4 (result i32)
+ (global.set $global4
+ (i32.const 14)
+ )
+ (i32.const 55)
+ )
+ (func $test5 (result i32)
+ (global.set $global5
+ (i32.const 15)
+ )
+ (call $import)
+ (i32.const 100)
+ )
+ (func $5 (result i32)
(call $test1)
(call $test2)
(drop
(call $test3)
)
+ (drop
+ (call $test4)
+ )
+ (drop
+ (call $test5)
+ )
(i32.add
- (global.get $global1)
- (global.get $global2)
+ (i32.add
+ (global.get $global1)
+ (global.get $global2)
+ )
+ (i32.add
+ (global.get $global3)
+ (i32.add
+ (global.get $global4)
+ (global.get $global5)
+ )
+ )
)
)
(func $test1_0
(nop)
)
+ (func $test3_0 (result i32)
+ (i32.const 42)
+ )
+ (func $test5_0 (result i32)
+ (call $import)
+ (i32.const 100)
+ )
)