summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2016-08-22 16:01:10 -0700
committerAlon Zakai <alonzakai@gmail.com>2016-09-07 09:55:05 -0700
commitf3bb9debe6af0576d76bda1580df2570e749bd36 (patch)
treeac4bc7b6e7dfe89cb5c1df7ecb44833e83d313bc /test
parent83e0dde16f381b28c1ee0d099de25444b0f34e58 (diff)
downloadbinaryen-f3bb9debe6af0576d76bda1580df2570e749bd36.tar.gz
binaryen-f3bb9debe6af0576d76bda1580df2570e749bd36.tar.bz2
binaryen-f3bb9debe6af0576d76bda1580df2570e749bd36.zip
handle asm.js globals that are set and the return value used
Diffstat (limited to 'test')
-rw-r--r--test/unit.asm.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/unit.asm.js b/test/unit.asm.js
index d6d0a27e8..cf2060030 100644
--- a/test/unit.asm.js
+++ b/test/unit.asm.js
@@ -281,6 +281,17 @@ function asm(global, env, buffer) {
return phi() | 0;
}
+ function useSetGlobal() {
+ var x = 0;
+ x = (Int = 10);
+ Int = 20;
+ return (Int = 30) | 0;
+ }
+
+ function usesSetGlobal2() {
+ return (Int = 40, 50) | 0;
+ }
+
function z() {
}
function w() {