Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(309)

Unified Diff: runtime/vm/intermediate_language_arm.cc

Issue 1672873003: Bailout if field state changed during background compilation. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: a Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: runtime/vm/intermediate_language_arm.cc
diff --git a/runtime/vm/intermediate_language_arm.cc b/runtime/vm/intermediate_language_arm.cc
index 2be4d9a86e0cd21e5d2edc43cac65416938f5407..a86906adeb1865d69aed1b6941a5c5b94c76ae85 100644
--- a/runtime/vm/intermediate_language_arm.cc
+++ b/runtime/vm/intermediate_language_arm.cc
@@ -7,6 +7,7 @@
#include "vm/intermediate_language.h"
+#include "vm/compiler.h"
#include "vm/cpu.h"
#include "vm/dart_entry.h"
#include "vm/flow_graph.h"
@@ -1583,6 +1584,10 @@ void GuardFieldClassInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
const intptr_t nullability = field().is_nullable() ? kNullCid : kIllegalCid;
if (field_cid == kDynamicCid) {
+ if (Compiler::IsBackgroundCompilation()) {
+ // Field state changed while compiling.
+ Compiler::AbortBackgroundCompilation(deopt_id());
+ }
ASSERT(!compiler->is_optimizing());
return; // Nothing to emit.
}
@@ -1737,6 +1742,10 @@ LocationSummary* GuardFieldLengthInstr::MakeLocationSummary(Zone* zone,
void GuardFieldLengthInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
if (field().guarded_list_length() == Field::kNoFixedLength) {
+ if (Compiler::IsBackgroundCompilation()) {
+ // Field state changed while compiling.
+ Compiler::AbortBackgroundCompilation(deopt_id());
+ }
ASSERT(!compiler->is_optimizing());
return; // Nothing to emit.
}

Powered by Google App Engine
This is Rietveld 408576698