summaryrefslogtreecommitdiff
path: root/src/wasm2js.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/wasm2js.h')
-rw-r--r--src/wasm2js.h14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/wasm2js.h b/src/wasm2js.h
index 55759c959..802765b1a 100644
--- a/src/wasm2js.h
+++ b/src/wasm2js.h
@@ -1128,11 +1128,12 @@ Ref Wasm2JSBuilder::processFunctionBody(Module* m,
// If the target has effects that interact with the operands, we must
// reorder it to the start.
bool mustReorder = false;
- EffectAnalyzer targetEffects(parent->options, curr->target);
+ EffectAnalyzer targetEffects(
+ parent->options, module->features, curr->target);
if (targetEffects.hasAnything()) {
for (auto* operand : curr->operands) {
if (targetEffects.invalidates(
- EffectAnalyzer(parent->options, operand))) {
+ EffectAnalyzer(parent->options, module->features, operand))) {
mustReorder = true;
break;
}
@@ -1720,9 +1721,12 @@ Ref Wasm2JSBuilder::processFunctionBody(Module* m,
// reorder it to the start. We must also use locals if the values have
// side effects, as a JS conditional does not visit both sides.
bool useLocals = false;
- EffectAnalyzer conditionEffects(parent->options, curr->condition);
- EffectAnalyzer ifTrueEffects(parent->options, curr->ifTrue);
- EffectAnalyzer ifFalseEffects(parent->options, curr->ifFalse);
+ EffectAnalyzer conditionEffects(
+ parent->options, module->features, curr->condition);
+ EffectAnalyzer ifTrueEffects(
+ parent->options, module->features, curr->ifTrue);
+ EffectAnalyzer ifFalseEffects(
+ parent->options, module->features, curr->ifFalse);
if (conditionEffects.invalidates(ifTrueEffects) ||
conditionEffects.invalidates(ifFalseEffects) ||
ifTrueEffects.hasSideEffects() || ifFalseEffects.hasSideEffects()) {