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

Unified Diff: runtime/vm/aot_optimizer.cc

Issue 2002583002: Background compiler should validate CHA decisions before committing the code. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: 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 | « no previous file | runtime/vm/cha.h » ('j') | runtime/vm/cha.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/aot_optimizer.cc
diff --git a/runtime/vm/aot_optimizer.cc b/runtime/vm/aot_optimizer.cc
index e81ddfcf532a452187c70abba3fb53679607835b..e755b0c9a444e19c06ac3a0af791979b4cd783ed 100644
--- a/runtime/vm/aot_optimizer.cc
+++ b/runtime/vm/aot_optimizer.cc
@@ -2067,7 +2067,7 @@ bool AotOptimizer::TypeCheckAsClassEquality(const AbstractType& type) {
type_class.ToCString());
}
if (FLAG_use_cha_deopt) {
- thread()->cha()->AddToLeafClasses(type_class);
+ thread()->cha()->AddToGuardedClasses(type_class, /*subclass_count=*/0);
Florian Schneider 2016/05/20 11:23:28 You can remove this, or add ASSERT(!FLAG_use_cha_d
Vyacheslav Egorov (Google) 2016/05/20 11:31:21 Done.
}
} else {
return false;
@@ -2456,8 +2456,10 @@ void AotOptimizer::VisitInstanceCall(InstanceCallInstr* instr) {
instr->function_name(),
args_desc));
if (!function.IsNull()) {
+ intptr_t subclasses = 0;
if (!thread()->cha()->HasOverride(receiver_class,
- instr->function_name())) {
+ instr->function_name(),
+ &subclasses)) {
if (FLAG_trace_cha) {
THR_Print(" **(CHA) Instance call needs no check, "
"no overrides of '%s' '%s'\n",
« no previous file with comments | « no previous file | runtime/vm/cha.h » ('j') | runtime/vm/cha.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698