Skip to content

Commit

Permalink
[WASM] Run the VerifyNormalizedUnits at the end of the modular pipe…
Browse files Browse the repository at this point in the history
…line.

PiperOrigin-RevId: 718027604
  • Loading branch information
rluble authored and copybara-github committed Jan 21, 2025
1 parent 7356037 commit 3db6fd0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -674,11 +674,8 @@ public ImmutableList<Supplier<NormalizationPass>> getPassFactories(BackendOption
// Post-verifications
VerifySingleAstReference::new,
VerifyParamAndArgCounts::new,
VerifyReferenceScoping::new

// TODO(b/283154833): Add the invariants for modular_wasm
// () -> new VerifyNormalizedUnits(/* verifyForWasm= **/ true)
);
VerifyReferenceScoping::new,
() -> new VerifyNormalizedUnits(/* verifyForWasm= **/ true));
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -309,8 +309,10 @@ public void exitSwitchExpression(SwitchExpression switchExpression) {

@Override
public void exitYieldStatement(YieldStatement yieldStatement) {
// Yield statements are expected to be normalized away.
throw new IllegalStateException();
if (!verifyForWasm) {
// Yield statements are expected to be normalized away.
throw new IllegalStateException();
}
}

@Override
Expand Down

0 comments on commit 3db6fd0

Please sign in to comment.