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

Unified Diff: runtime/vm/compiler.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/compiler.cc
diff --git a/runtime/vm/compiler.cc b/runtime/vm/compiler.cc
index 63723a5294f860787a51a87b88ef7f938a916cd9..a0f01ac3b62f97618d0b08c754ed0fdd5604eb01 100644
--- a/runtime/vm/compiler.cc
+++ b/runtime/vm/compiler.cc
@@ -646,6 +646,10 @@ bool CompileParsedFunctionHelper::Compile(CompilationPipeline* pipeline) {
const bool clone_descriptors = Compiler::IsBackgroundCompilation();
function.RestoreICDataMap(ic_data_array, clone_descriptors);
+ if (Compiler::IsBackgroundCompilation() &&
+ (function.ic_data_array() == Array::null())) {
+ Compiler::AbortBackgroundCompilation(Thread::kNoDeoptId);
+ }
if (FLAG_print_ic_data_map) {
for (intptr_t i = 0; i < ic_data_array->length(); i++) {
if ((*ic_data_array)[i] != NULL) {
@@ -1691,6 +1695,13 @@ RawObject* Compiler::ExecuteOnce(SequenceNode* fragment) {
}
+void Compiler::AbortBackgroundCompilation(intptr_t deopt_id) {
+ ASSERT(Compiler::IsBackgroundCompilation());
+ Thread::Current()->long_jump_base()->Jump(
+ deopt_id, Object::background_compilation_error());
+}
+
+
// C-heap allocated background compilation queue element.
class QueueElement {
public:
@@ -2022,6 +2033,11 @@ RawObject* Compiler::ExecuteOnce(SequenceNode* fragment) {
}
+void Compiler::AbortBackgroundCompilation(intptr_t deopt_id) {
+ UNREACHABLE();
+}
+
+
void BackgroundCompiler::CompileOptimized(const Function& function) {
UNREACHABLE();
}

Powered by Google App Engine
This is Rietveld 408576698