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

Unified Diff: runtime/vm/jit_optimizer.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/isolate.cc ('k') | runtime/vm/object.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/jit_optimizer.cc
diff --git a/runtime/vm/jit_optimizer.cc b/runtime/vm/jit_optimizer.cc
index 172f5d241645708f30d10b589c1c408f759a8971..f05813d0b7628bc0412b0683b41ea6c5a37dad15 100644
--- a/runtime/vm/jit_optimizer.cc
+++ b/runtime/vm/jit_optimizer.cc
@@ -2917,9 +2917,10 @@ void JitOptimizer::VisitStoreInstanceField(
// usage count of at least 1/kGetterSetterRatio of the getter usage count.
// This is to avoid unboxing fields where the setter is never or rarely
// executed.
- const Field& field = Field::ZoneHandle(Z, instr->field().Original());
+ const Field& field = instr->field();
const String& field_name = String::Handle(Z, field.name());
- const Class& owner = Class::Handle(Z, field.Owner());
+ const Class& owner =
+ Class::Handle(Z, Field::Handle(Z, field.Original()).Owner());
const Function& getter =
Function::Handle(Z, owner.LookupGetterFunction(field_name));
const Function& setter =
@@ -2954,6 +2955,7 @@ void JitOptimizer::VisitStoreInstanceField(
OS::Print(" getter usage count: %" Pd "\n", getter.usage_counter());
}
}
+ ASSERT(field.IsOriginal());
field.set_is_unboxing_candidate(false);
field.DeoptimizeDependentCode();
} else {
« no previous file with comments | « runtime/vm/isolate.cc ('k') | runtime/vm/object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698