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

Unified Diff: runtime/vm/object.cc

Issue 2006793002: VM: Fix race between background compiler and guarded cid update. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: rework how we invalidate background compiled code Created 4 years, 7 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
« no previous file with comments | « runtime/vm/object.h ('k') | runtime/vm/parser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object.cc
diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc
index a8ccce53d8d8ff0a333b3058698b40d2154fd827..0e8d809feafdc30f197223096863cc1743504244 100644
--- a/runtime/vm/object.cc
+++ b/runtime/vm/object.cc
@@ -2753,8 +2753,6 @@ class CHACodeArray : public WeakCodeReferences {
}
}
- virtual void IncrementInvalidationGen() {}
-
private:
const Class& cls_;
DISALLOW_COPY_AND_ASSIGN(CHACodeArray);
@@ -7684,10 +7682,6 @@ class FieldDependentArray : public WeakCodeReferences {
}
}
- virtual void IncrementInvalidationGen() {
- Isolate::Current()->IncrFieldInvalidationGen();
- }
-
private:
const Field& field_;
DISALLOW_COPY_AND_ASSIGN(FieldDependentArray);
@@ -7706,14 +7700,19 @@ void Field::RegisterDependentCode(const Code& code) const {
void Field::DeoptimizeDependentCode() const {
ASSERT(Thread::Current()->IsMutatorThread());
ASSERT(IsOriginal());
- if (FLAG_background_compilation) {
- Isolate::Current()->AddDisablingField(*this);
- }
FieldDependentArray a(*this);
a.DisableCode();
}
+bool Field::IsConsistentWith(const Field& other) const {
+ return (raw_ptr()->guarded_cid_ == other.raw_ptr()->guarded_cid_) &&
+ (raw_ptr()->is_nullable_ == other.raw_ptr()->is_nullable_) &&
+ (raw_ptr()->guarded_list_length_ ==
+ other.raw_ptr()->guarded_list_length_);
+}
+
+
bool Field::IsUninitialized() const {
const Instance& value = Instance::Handle(raw_ptr()->value_.static_value_);
ASSERT(value.raw() != Object::transition_sentinel().raw());
@@ -10974,8 +10973,6 @@ class PrefixDependentArray : public WeakCodeReferences {
}
}
- virtual void IncrementInvalidationGen() {}
-
private:
const LibraryPrefix& prefix_;
DISALLOW_COPY_AND_ASSIGN(PrefixDependentArray);
« no previous file with comments | « runtime/vm/object.h ('k') | runtime/vm/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698