summaryrefslogtreecommitdiff
path: root/test/unit.asm.js
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2016-09-23 20:34:56 -0700
committerGitHub <noreply@github.com>2016-09-23 20:34:56 -0700
commitb6469ed600832887e8874d1a0407b993dd2c03e8 (patch)
tree325cafc1625265a8d7569a4f2b2a45910e4040fb /test/unit.asm.js
parentdc82f588309f1a4413be18460159699df74661c4 (diff)
parent7d5180a5b3e369634dbc1442117068d332d71049 (diff)
downloadbinaryen-b6469ed600832887e8874d1a0407b993dd2c03e8.tar.gz
binaryen-b6469ed600832887e8874d1a0407b993dd2c03e8.tar.bz2
binaryen-b6469ed600832887e8874d1a0407b993dd2c03e8.zip
Merge pull request #710 from WebAssembly/autodrop-fix
Autodrop fixes
Diffstat (limited to 'test/unit.asm.js')
-rw-r--r--test/unit.asm.js29
1 files changed, 29 insertions, 0 deletions
diff --git a/test/unit.asm.js b/test/unit.asm.js
index d4426bd90..7b4b2a96f 100644
--- a/test/unit.asm.js
+++ b/test/unit.asm.js
@@ -572,6 +572,35 @@ function asm(global, env, buffer) {
return temp | 0;
}
+ function dropIgnoredImportInIf($0,$1,$2) {
+ $0 = $0|0;
+ $1 = $1|0;
+ $2 = $2|0;
+ do {
+ if ($0) {
+ $0 = 1;
+ lb($2 | 0) | 0;
+ } else {
+ break;
+ }
+ } while(0);
+ return;
+ }
+
+ function dropIgnoredImportsInIf($0,$1,$2) {
+ $0 = $0|0;
+ $1 = $1|0;
+ $2 = $2|0;
+ do {
+ if ($0) {
+ lb($1 | 0) | 0;
+ } else {
+ lb($2 | 0) | 0;
+ }
+ } while(0);
+ return;
+ }
+
var FUNCTION_TABLE_a = [ z, big_negative, z, z ];
var FUNCTION_TABLE_b = [ w, w, importedDoubles, w ];
var FUNCTION_TABLE_c = [ z, cneg ];