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

Unified Diff: runtime/vm/intermediate_language_arm64.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_arm64.cc
diff --git a/runtime/vm/intermediate_language_arm64.cc b/runtime/vm/intermediate_language_arm64.cc
index 4b8b56557afb0235f8a7d665e4d218ca3f37383e..e8bd7597d3008cd8dd183741aa604c70c5e6284f 100644
--- a/runtime/vm/intermediate_language_arm64.cc
+++ b/runtime/vm/intermediate_language_arm64.cc
@@ -7,6 +7,7 @@
#include "vm/intermediate_language.h"
+#include "vm/compiler.h"
#include "vm/dart_entry.h"
#include "vm/flow_graph.h"
#include "vm/flow_graph_compiler.h"
@@ -1440,6 +1441,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.
}
@@ -1591,6 +1596,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