[gardening] Fix recently added assertion, ensuring that instructions in JIT have deopt id if they throw

Change-Id: I39569839aaaad3c3dabdb99a772b22693c3597c4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115361
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Samir Jindel <sjindel@google.com>
This commit is contained in:
Martin Kustermann 2019-09-04 11:00:02 +00:00 committed by commit-bot@chromium.org
parent fd27e795ba
commit 6c4fbc11b8
2 changed files with 4 additions and 6 deletions

View file

@ -227,9 +227,10 @@ void FlowGraphChecker::VisitInstruction(Instruction* instruction) {
// In JIT mode, any instruction which may throw must have a deopt-id, except
// tail-call because it replaces the stack frame.
ASSERT(!FLAG_precompiled_mode || !instruction->MayThrow() ||
instruction->IsTailCall() ||
#if !defined(DART_PRECOMPILER)
ASSERT(!instruction->MayThrow() || instruction->IsTailCall() ||
instruction->deopt_id() != DeoptId::kNone);
#endif // !defined(DART_PRECOMPILER)
// Check all regular inputs.
for (intptr_t i = 0, n = instruction->InputCount(); i < n; ++i) {

View file

@ -4190,10 +4190,7 @@ class DropTempsInstr : public Definition {
return false;
}
virtual bool MayThrow() const {
UNREACHABLE();
return false;
}
virtual bool MayThrow() const { return false; }
virtual TokenPosition token_pos() const { return TokenPosition::kTempMove; }