summaryrefslogtreecommitdiff
path: root/test/ctor-eval/global-get-init.wast.ctors
diff options
context:
space:
mode:
authorAlon Zakai <azakai@google.com>2022-01-07 08:21:13 -0800
committerGitHub <noreply@github.com>2022-01-07 08:21:13 -0800
commit260b8ee7f2b4f5fb87e72e99b9543eb524d12c7d (patch)
tree57aeea023034ddeb1b83393fcc5c6b0014a81898 /test/ctor-eval/global-get-init.wast.ctors
parent8c0f53d236f664086405870321e5887aaed39f3f (diff)
downloadbinaryen-260b8ee7f2b4f5fb87e72e99b9543eb524d12c7d.tar.gz
binaryen-260b8ee7f2b4f5fb87e72e99b9543eb524d12c7d.tar.bz2
binaryen-260b8ee7f2b4f5fb87e72e99b9543eb524d12c7d.zip
[ctor-eval] Eval and store changes to globals (#4430)
This is necessary for being able to optimize real-world code, as it lets us use the stack pointer for example. With this PR we allow changes to globals, and we simply store the final state of the global in the global at the end. Basically the same as we do for memory, but for globals. Remove a test that now fails ("imported2"). Replace it with a nicer test of saving the values of globals. Also add a test for an imported global, which we do not allow (we never did, but I don't see a test for it).
Diffstat (limited to 'test/ctor-eval/global-get-init.wast.ctors')
-rw-r--r--test/ctor-eval/global-get-init.wast.ctors1
1 files changed, 1 insertions, 0 deletions
diff --git a/test/ctor-eval/global-get-init.wast.ctors b/test/ctor-eval/global-get-init.wast.ctors
new file mode 100644
index 000000000..a5bce3fd2
--- /dev/null
+++ b/test/ctor-eval/global-get-init.wast.ctors
@@ -0,0 +1 @@
+test1