summaryrefslogtreecommitdiff
path: root/test/binaryen.js
diff options
context:
space:
mode:
authorHeejin Ahn <aheejin@gmail.com>2020-06-02 00:01:58 -0700
committerGitHub <noreply@github.com>2020-06-02 00:01:58 -0700
commit1b8942ce72a25e1e3d63128660d76b5ecde8acfb (patch)
tree849b61c83958da0782417653949c6da51e0250b0 /test/binaryen.js
parent65d495f50a8e804c2d38505201ef5afc448dab86 (diff)
downloadbinaryen-1b8942ce72a25e1e3d63128660d76b5ecde8acfb.tar.gz
binaryen-1b8942ce72a25e1e3d63128660d76b5ecde8acfb.tar.bz2
binaryen-1b8942ce72a25e1e3d63128660d76b5ecde8acfb.zip
Fix SideEffect::Branches to only represent branches (#2886)
After #2783 `SideEffects::Branches` includes possibly throwing expressions, which can be calls (when EH is enabled). This changes `SideEffects::Branches` back to only include branches, returns, and infinite loops as it was before #2783.
Diffstat (limited to 'test/binaryen.js')
-rw-r--r--test/binaryen.js/sideffects.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/binaryen.js/sideffects.js b/test/binaryen.js/sideffects.js
index 7db9ab329..76bc1db68 100644
--- a/test/binaryen.js/sideffects.js
+++ b/test/binaryen.js/sideffects.js
@@ -95,11 +95,11 @@ assert(
);
// If exception handling feature is enabled, calls can throw
-var module_all_features = new binaryen.Module();
-module_all_features.setFeatures(binaryen.Features.All);
+module.setFeatures(binaryen.Features.All);
assert(
binaryen.getSideEffects(
- module.call("test", [], binaryen.i32)
+ module.call("test", [], binaryen.i32),
+ module.getFeatures()
)
==
binaryen.SideEffects.Calls | binaryen.SideEffects.Throws