summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/debugInfo.asm.js15
-rw-r--r--test/debugInfo.fromasm17
-rw-r--r--test/debugInfo.fromasm.clamp17
-rw-r--r--test/debugInfo.fromasm.clamp.map2
-rw-r--r--test/debugInfo.fromasm.clamp.no-opts37
-rw-r--r--test/debugInfo.fromasm.clamp.no-opts.map2
-rw-r--r--test/debugInfo.fromasm.imprecise17
-rw-r--r--test/debugInfo.fromasm.imprecise.map2
-rw-r--r--test/debugInfo.fromasm.imprecise.no-opts37
-rw-r--r--test/debugInfo.fromasm.imprecise.no-opts.map2
-rw-r--r--test/debugInfo.fromasm.map2
-rw-r--r--test/debugInfo.fromasm.no-opts37
-rw-r--r--test/debugInfo.fromasm.no-opts.map2
-rw-r--r--test/debugInfo.fromasm.read-written17
14 files changed, 199 insertions, 7 deletions
diff --git a/test/debugInfo.asm.js b/test/debugInfo.asm.js
index bfdc85780..18555a8b9 100644
--- a/test/debugInfo.asm.js
+++ b/test/debugInfo.asm.js
@@ -84,6 +84,19 @@ function () {
function nofile() {
nofile(); //@line 1337
}
- return { add: add, ret: ret, opts: opts, fib: fib, switch_reach: switch_reach, nofile: nofile };
+ function inlineMe(x, y) {
+ x = x | 0;
+ y = y | 0;
+ x = x + y | 0; //@line 120 "inline_me.c"
+ y = x + y | 0; //@line 121 "inline_me.c"
+ x = x + y | 0; //@line 122 "inline_me.c"
+ return x | 0; //@line 123 "inline_me.c"
+ }
+ function inlineInto(x, y) {
+ x = x | 0;
+ y = y | 0;
+ return inlineMe(x | 0, y | 0) | 0; //@line 125 "inline_me.c"
+ }
+ return { add: add, ret: ret, opts: opts, fib: fib, switch_reach: switch_reach, nofile: nofile, inlineInto: inlineInto };
}
diff --git a/test/debugInfo.fromasm b/test/debugInfo.fromasm
index 7d1771d00..ae555542a 100644
--- a/test/debugInfo.fromasm
+++ b/test/debugInfo.fromasm
@@ -8,6 +8,7 @@
(export "fib" (func $fib))
(export "switch_reach" (func $switch_reach))
(export "nofile" (func $nofile))
+ (export "inlineInto" (func $inlineInto))
(func $add (; 0 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (result i32)
;;@ tests/other_file.cpp:314159:0
(i32.add
@@ -169,4 +170,20 @@
;;@ (unknown):1337:0
(call $nofile)
)
+ (func $inlineInto (; 6 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (result i32)
+ ;;@ inline_me.c:125:0
+ (i32.add
+ ;;@ inline_me.c:120:0
+ (local.tee $0
+ (i32.add
+ (local.get $0)
+ (local.get $1)
+ )
+ )
+ (i32.add
+ (local.get $0)
+ (local.get $1)
+ )
+ )
+ )
)
diff --git a/test/debugInfo.fromasm.clamp b/test/debugInfo.fromasm.clamp
index 7d1771d00..ae555542a 100644
--- a/test/debugInfo.fromasm.clamp
+++ b/test/debugInfo.fromasm.clamp
@@ -8,6 +8,7 @@
(export "fib" (func $fib))
(export "switch_reach" (func $switch_reach))
(export "nofile" (func $nofile))
+ (export "inlineInto" (func $inlineInto))
(func $add (; 0 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (result i32)
;;@ tests/other_file.cpp:314159:0
(i32.add
@@ -169,4 +170,20 @@
;;@ (unknown):1337:0
(call $nofile)
)
+ (func $inlineInto (; 6 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (result i32)
+ ;;@ inline_me.c:125:0
+ (i32.add
+ ;;@ inline_me.c:120:0
+ (local.tee $0
+ (i32.add
+ (local.get $0)
+ (local.get $1)
+ )
+ )
+ (i32.add
+ (local.get $0)
+ (local.get $1)
+ )
+ )
+ )
)
diff --git a/test/debugInfo.fromasm.clamp.map b/test/debugInfo.fromasm.clamp.map
index e49a7309c..253ec1006 100644
--- a/test/debugInfo.fromasm.clamp.map
+++ b/test/debugInfo.fromasm.clamp.map
@@ -1 +1 @@
-{"version":3,"sources":["tests/hello_world.c","tests/other_file.cpp","return.cpp","even-opted.cpp","fib.c","/tmp/emscripten_test_binaryen2_28hnAe/src.c","(unknown)"],"names":[],"mappings":"qIC8ylTA,QC7vlTA,OAkDA,UCjGA,AADA,EADA,+BCEA,cAKA,QAJA,OADA,0BAKA,sECsi1DA,KCrvyDA"} \ No newline at end of file
+{"version":3,"sources":["tests/hello_world.c","tests/other_file.cpp","return.cpp","even-opted.cpp","fib.c","/tmp/emscripten_test_binaryen2_28hnAe/src.c","(unknown)","inline_me.c"],"names":[],"mappings":"mJC8ylTA,QC7vlTA,OAkDA,UCjGA,AADA,EADA,+BCEA,cAKA,QAJA,OADA,0BAKA,sECsi1DA,KCrvyDA,KC5rCA,AALA"} \ No newline at end of file
diff --git a/test/debugInfo.fromasm.clamp.no-opts b/test/debugInfo.fromasm.clamp.no-opts
index 29521dd22..29525fb89 100644
--- a/test/debugInfo.fromasm.clamp.no-opts
+++ b/test/debugInfo.fromasm.clamp.no-opts
@@ -11,6 +11,7 @@
(export "fib" (func $fib))
(export "switch_reach" (func $switch_reach))
(export "nofile" (func $nofile))
+ (export "inlineInto" (func $inlineInto))
(func $add (; 0 ;) (param $x i32) (param $y i32) (result i32)
;;@ tests/hello_world.c:5:0
(local.set $x
@@ -287,4 +288,40 @@
;;@ (unknown):1337:0
(call $nofile)
)
+ (func $inlineMe (; 7 ;) (param $x i32) (param $y i32) (result i32)
+ ;;@ inline_me.c:120:0
+ (local.set $x
+ (i32.add
+ (local.get $x)
+ (local.get $y)
+ )
+ )
+ ;;@ inline_me.c:121:0
+ (local.set $y
+ (i32.add
+ (local.get $x)
+ (local.get $y)
+ )
+ )
+ ;;@ inline_me.c:122:0
+ (local.set $x
+ (i32.add
+ (local.get $x)
+ (local.get $y)
+ )
+ )
+ ;;@ inline_me.c:123:0
+ (return
+ (local.get $x)
+ )
+ )
+ (func $inlineInto (; 8 ;) (param $x i32) (param $y i32) (result i32)
+ ;;@ inline_me.c:125:0
+ (return
+ (call $inlineMe
+ (local.get $x)
+ (local.get $y)
+ )
+ )
+ )
)
diff --git a/test/debugInfo.fromasm.clamp.no-opts.map b/test/debugInfo.fromasm.clamp.no-opts.map
index 091513249..ae1c41157 100644
--- a/test/debugInfo.fromasm.clamp.no-opts.map
+++ b/test/debugInfo.fromasm.clamp.no-opts.map
@@ -1 +1 @@
-{"version":3,"sources":["tests/hello_world.c","tests/other_file.cpp","return.cpp","even-opted.cpp","fib.c","/tmp/emscripten_test_binaryen2_28hnAe/src.c","(unknown)"],"names":[],"mappings":"sLAIA,IACA,ICyylTA,aC7vlTA,OAkDA,0BCnGA,OACA,OACA,uBCAA,4BAKA,QAJA,OADA,8CAKA,0ICsi1DA,MCrvyDA"} \ No newline at end of file
+{"version":3,"sources":["tests/hello_world.c","tests/other_file.cpp","return.cpp","even-opted.cpp","fib.c","/tmp/emscripten_test_binaryen2_28hnAe/src.c","(unknown)","inline_me.c"],"names":[],"mappings":"qMAIA,IACA,ICyylTA,aC7vlTA,OAkDA,0BCnGA,OACA,OACA,uBCAA,4BAKA,QAJA,OADA,8CAKA,0ICsi1DA,MCrvyDA,KCjsCA,OACA,OACA,OACA,MAEA"} \ No newline at end of file
diff --git a/test/debugInfo.fromasm.imprecise b/test/debugInfo.fromasm.imprecise
index a643cce56..3ceab1574 100644
--- a/test/debugInfo.fromasm.imprecise
+++ b/test/debugInfo.fromasm.imprecise
@@ -5,6 +5,7 @@
(export "fib" (func $fib))
(export "switch_reach" (func $switch_reach))
(export "nofile" (func $nofile))
+ (export "inlineInto" (func $inlineInto))
(func $add (; 0 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (result i32)
;;@ tests/other_file.cpp:314159:0
(i32.add
@@ -161,4 +162,20 @@
;;@ (unknown):1337:0
(call $nofile)
)
+ (func $inlineInto (; 6 ;) (; has Stack IR ;) (param $0 i32) (param $1 i32) (result i32)
+ ;;@ inline_me.c:125:0
+ (i32.add
+ ;;@ inline_me.c:120:0
+ (local.tee $0
+ (i32.add
+ (local.get $0)
+ (local.get $1)
+ )
+ )
+ (i32.add
+ (local.get $0)
+ (local.get $1)
+ )
+ )
+ )
)
diff --git a/test/debugInfo.fromasm.imprecise.map b/test/debugInfo.fromasm.imprecise.map
index 316bdc518..7a9fde6e8 100644
--- a/test/debugInfo.fromasm.imprecise.map
+++ b/test/debugInfo.fromasm.imprecise.map
@@ -1 +1 @@
-{"version":3,"sources":["tests/hello_world.c","tests/other_file.cpp","return.cpp","even-opted.cpp","fib.c","/tmp/emscripten_test_binaryen2_28hnAe/src.c","(unknown)"],"names":[],"mappings":"4FC8ylTA,QC7vlTA,OAkDA,QCnGA,OACA,OACA,aCAA,cAKA,QAJA,OADA,0BAKA,sECsi1DA,KCrvyDA"} \ No newline at end of file
+{"version":3,"sources":["tests/hello_world.c","tests/other_file.cpp","return.cpp","even-opted.cpp","fib.c","/tmp/emscripten_test_binaryen2_28hnAe/src.c","(unknown)","inline_me.c"],"names":[],"mappings":"0GC8ylTA,QC7vlTA,OAkDA,QCnGA,OACA,OACA,aCAA,cAKA,QAJA,OADA,0BAKA,sECsi1DA,KCrvyDA,KC5rCA,AALA"} \ No newline at end of file
diff --git a/test/debugInfo.fromasm.imprecise.no-opts b/test/debugInfo.fromasm.imprecise.no-opts
index f24d2ba9c..b4c1b517e 100644
--- a/test/debugInfo.fromasm.imprecise.no-opts
+++ b/test/debugInfo.fromasm.imprecise.no-opts
@@ -11,6 +11,7 @@
(export "fib" (func $fib))
(export "switch_reach" (func $switch_reach))
(export "nofile" (func $nofile))
+ (export "inlineInto" (func $inlineInto))
(func $add (; 0 ;) (param $x i32) (param $y i32) (result i32)
;;@ tests/hello_world.c:5:0
(local.set $x
@@ -275,4 +276,40 @@
;;@ (unknown):1337:0
(call $nofile)
)
+ (func $inlineMe (; 6 ;) (param $x i32) (param $y i32) (result i32)
+ ;;@ inline_me.c:120:0
+ (local.set $x
+ (i32.add
+ (local.get $x)
+ (local.get $y)
+ )
+ )
+ ;;@ inline_me.c:121:0
+ (local.set $y
+ (i32.add
+ (local.get $x)
+ (local.get $y)
+ )
+ )
+ ;;@ inline_me.c:122:0
+ (local.set $x
+ (i32.add
+ (local.get $x)
+ (local.get $y)
+ )
+ )
+ ;;@ inline_me.c:123:0
+ (return
+ (local.get $x)
+ )
+ )
+ (func $inlineInto (; 7 ;) (param $x i32) (param $y i32) (result i32)
+ ;;@ inline_me.c:125:0
+ (return
+ (call $inlineMe
+ (local.get $x)
+ (local.get $y)
+ )
+ )
+ )
)
diff --git a/test/debugInfo.fromasm.imprecise.no-opts.map b/test/debugInfo.fromasm.imprecise.no-opts.map
index bce1d3419..4bc2b7738 100644
--- a/test/debugInfo.fromasm.imprecise.no-opts.map
+++ b/test/debugInfo.fromasm.imprecise.no-opts.map
@@ -1 +1 @@
-{"version":3,"sources":["tests/hello_world.c","tests/other_file.cpp","return.cpp","even-opted.cpp","fib.c","/tmp/emscripten_test_binaryen2_28hnAe/src.c","(unknown)"],"names":[],"mappings":"qLAIA,IACA,ICyylTA,aC7vlTA,OAkDA,SCnGA,OACA,OACA,sBCAA,4BAKA,QAJA,OADA,8CAKA,0ICsi1DA,MCrvyDA"} \ No newline at end of file
+{"version":3,"sources":["tests/hello_world.c","tests/other_file.cpp","return.cpp","even-opted.cpp","fib.c","/tmp/emscripten_test_binaryen2_28hnAe/src.c","(unknown)","inline_me.c"],"names":[],"mappings":"oMAIA,IACA,ICyylTA,aC7vlTA,OAkDA,SCnGA,OACA,OACA,sBCAA,4BAKA,QAJA,OADA,8CAKA,0ICsi1DA,MCrvyDA,KCjsCA,OACA,OACA,OACA,MAEA"} \ No newline at end of file
diff --git a/test/debugInfo.fromasm.map b/test/debugInfo.fromasm.map
index e49a7309c..253ec1006 100644
--- a/test/debugInfo.fromasm.map
+++ b/test/debugInfo.fromasm.map
@@ -1 +1 @@
-{"version":3,"sources":["tests/hello_world.c","tests/other_file.cpp","return.cpp","even-opted.cpp","fib.c","/tmp/emscripten_test_binaryen2_28hnAe/src.c","(unknown)"],"names":[],"mappings":"qIC8ylTA,QC7vlTA,OAkDA,UCjGA,AADA,EADA,+BCEA,cAKA,QAJA,OADA,0BAKA,sECsi1DA,KCrvyDA"} \ No newline at end of file
+{"version":3,"sources":["tests/hello_world.c","tests/other_file.cpp","return.cpp","even-opted.cpp","fib.c","/tmp/emscripten_test_binaryen2_28hnAe/src.c","(unknown)","inline_me.c"],"names":[],"mappings":"mJC8ylTA,QC7vlTA,OAkDA,UCjGA,AADA,EADA,+BCEA,cAKA,QAJA,OADA,0BAKA,sECsi1DA,KCrvyDA,KC5rCA,AALA"} \ No newline at end of file
diff --git a/test/debugInfo.fromasm.no-opts b/test/debugInfo.fromasm.no-opts
index 29521dd22..29525fb89 100644
--- a/test/debugInfo.fromasm.no-opts
+++ b/test/debugInfo.fromasm.no-opts
@@ -11,6 +11,7 @@
(export "fib" (func $fib))
(export "switch_reach" (func $switch_reach))
(export "nofile" (func $nofile))
+ (export "inlineInto" (func $inlineInto))
(func $add (; 0 ;) (param $x i32) (param $y i32) (result i32)
;;@ tests/hello_world.c:5:0
(local.set $x
@@ -287,4 +288,40 @@
;;@ (unknown):1337:0
(call $nofile)
)
+ (func $inlineMe (; 7 ;) (param $x i32) (param $y i32) (result i32)
+ ;;@ inline_me.c:120:0
+ (local.set $x
+ (i32.add
+ (local.get $x)
+ (local.get $y)
+ )
+ )
+ ;;@ inline_me.c:121:0
+ (local.set $y
+ (i32.add
+ (local.get $x)
+ (local.get $y)
+ )
+ )
+ ;;@ inline_me.c:122:0
+ (local.set $x
+ (i32.add
+ (local.get $x)
+ (local.get $y)
+ )
+ )
+ ;;@ inline_me.c:123:0
+ (return
+ (local.get $x)
+ )
+ )
+ (func $inlineInto (; 8 ;) (param $x i32) (param $y i32) (result i32)
+ ;;@ inline_me.c:125:0
+ (return
+ (call $inlineMe
+ (local.get $x)
+ (local.get $y)
+ )
+ )
+ )
)
diff --git a/test/debugInfo.fromasm.no-opts.map b/test/debugInfo.fromasm.no-opts.map
index 091513249..ae1c41157 100644
--- a/test/debugInfo.fromasm.no-opts.map
+++ b/test/debugInfo.fromasm.no-opts.map
@@ -1 +1 @@
-{"version":3,"sources":["tests/hello_world.c","tests/other_file.cpp","return.cpp","even-opted.cpp","fib.c","/tmp/emscripten_test_binaryen2_28hnAe/src.c","(unknown)"],"names":[],"mappings":"sLAIA,IACA,ICyylTA,aC7vlTA,OAkDA,0BCnGA,OACA,OACA,uBCAA,4BAKA,QAJA,OADA,8CAKA,0ICsi1DA,MCrvyDA"} \ No newline at end of file
+{"version":3,"sources":["tests/hello_world.c","tests/other_file.cpp","return.cpp","even-opted.cpp","fib.c","/tmp/emscripten_test_binaryen2_28hnAe/src.c","(unknown)","inline_me.c"],"names":[],"mappings":"qMAIA,IACA,ICyylTA,aC7vlTA,OAkDA,0BCnGA,OACA,OACA,uBCAA,4BAKA,QAJA,OADA,8CAKA,0ICsi1DA,MCrvyDA,KCjsCA,OACA,OACA,OACA,MAEA"} \ No newline at end of file
diff --git a/test/debugInfo.fromasm.read-written b/test/debugInfo.fromasm.read-written
index 2cc9a03de..362d828a3 100644
--- a/test/debugInfo.fromasm.read-written
+++ b/test/debugInfo.fromasm.read-written
@@ -11,6 +11,7 @@
(export "fib" (func $fib))
(export "switch_reach" (func $switch_reach))
(export "nofile" (func $nofile))
+ (export "inlineInto" (func $inlineInto))
(func $add (; 0 ;) (type $0) (param $0 i32) (param $1 i32) (result i32)
;;@ tests/other_file.cpp:314159:0
(i32.add
@@ -175,5 +176,21 @@
;;@ (unknown):1337:0
(call $nofile)
)
+ (func $inlineInto (; 6 ;) (type $0) (param $0 i32) (param $1 i32) (result i32)
+ ;;@ inline_me.c:120:0
+ (i32.add
+ (local.tee $0
+ (i32.add
+ (local.get $0)
+ (local.get $1)
+ )
+ )
+ (i32.add
+ (local.get $0)
+ (local.get $1)
+ )
+ )
+ ;;@ inline_me.c:125:0
+ )
)