summaryrefslogtreecommitdiff
path: root/src/passes
diff options
context:
space:
mode:
Diffstat (limited to 'src/passes')
-rw-r--r--src/passes/Asyncify.cpp3
-rw-r--r--src/passes/PostEmscripten.cpp4
2 files changed, 5 insertions, 2 deletions
diff --git a/src/passes/Asyncify.cpp b/src/passes/Asyncify.cpp
index b7e8c90e0..a4ff5794b 100644
--- a/src/passes/Asyncify.cpp
+++ b/src/passes/Asyncify.cpp
@@ -549,7 +549,8 @@ public:
return !info.isBottomMostRuntime &&
!info.inBlacklist;
},
- [](Info& info) { info.canChangeState = true; });
+ [](Info& info) { info.canChangeState = true; },
+ scanner.IgnoreIndirectCalls);
map.swap(scanner.map);
diff --git a/src/passes/PostEmscripten.cpp b/src/passes/PostEmscripten.cpp
index e6eeb8e2a..ccf985c50 100644
--- a/src/passes/PostEmscripten.cpp
+++ b/src/passes/PostEmscripten.cpp
@@ -154,9 +154,11 @@ struct PostEmscripten : public Pass {
}
});
+ // Assume an indirect call might throw.
analyzer.propagateBack([](const Info& info) { return info.canThrow; },
[](const Info& info) { return true; },
- [](Info& info) { info.canThrow = true; });
+ [](Info& info) { info.canThrow = true; },
+ analyzer.IndirectCallsHaveProperty);
// Apply the information.
struct OptimizeInvokes : public WalkerPass<PostWalker<OptimizeInvokes>> {