diff options
author | Daniel Wirtz <dcode@dcode.io> | 2020-01-17 18:43:45 +0100 |
---|---|---|
committer | Alon Zakai <azakai@google.com> | 2020-01-17 09:43:44 -0800 |
commit | 98f5507c508d6fde326347df3fcad70740b634ea (patch) | |
tree | 3b8a7f1420ba81ca8e8df5b10a9e744a3602e6b4 /test/binaryen.js/sideffects.js.txt | |
parent | e873e2a84db3fda3c8df5ed8e0b39578a1fb2f2d (diff) | |
download | binaryen-98f5507c508d6fde326347df3fcad70740b634ea.tar.gz binaryen-98f5507c508d6fde326347df3fcad70740b634ea.tar.bz2 binaryen-98f5507c508d6fde326347df3fcad70740b634ea.zip |
Expose ExpressionAnalyzer in C-/JS-API (#2585)
Instead of reinventing the wheel on our side, this adds ExpressionAnalyzer
bindings to the C- and JS-APIs, which can be useful for generators. For
example, a generator may decide to simplify a compilation step if a
subexpression doesn't have any side effects, or simply skip emitting
something that is likely to compile to a drop or an empty block right away.
Diffstat (limited to 'test/binaryen.js/sideffects.js.txt')
-rw-r--r-- | test/binaryen.js/sideffects.js.txt | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/binaryen.js/sideffects.js.txt b/test/binaryen.js/sideffects.js.txt new file mode 100644 index 000000000..54a1e14bc --- /dev/null +++ b/test/binaryen.js/sideffects.js.txt @@ -0,0 +1,12 @@ +SideEffects.None=0 +SideEffects.Branches=1 +SideEffects.Calls=2 +SideEffects.ReadsLocal=4 +SideEffects.WritesLocal=8 +SideEffects.ReadsGlobal=16 +SideEffects.WritesGlobal=32 +SideEffects.ReadsMemory=64 +SideEffects.WritesMemory=128 +SideEffects.ImplicitTrap=256 +SideEffects.IsAtomic=512 +SideEffects.Any=1023 |