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

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: address comments 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') | no next file with comments »
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..8b66e4998ee786aebda3da2fce812d7ccea94451 100644
--- a/runtime/vm/aot_optimizer.cc
+++ b/runtime/vm/aot_optimizer.cc
@@ -2060,15 +2060,13 @@ bool AotOptimizer::TypeCheckAsClassEquality(const AbstractType& type) {
// Private classes cannot be subclassed by later loaded libs.
if (!type_class.IsPrivate()) {
- if (FLAG_use_cha_deopt || isolate()->all_classes_finalized()) {
+ if (isolate()->all_classes_finalized()) {
if (FLAG_trace_cha) {
THR_Print(" **(CHA) Typecheck as class equality since no "
"subclasses: %s\n",
type_class.ToCString());
}
- if (FLAG_use_cha_deopt) {
- thread()->cha()->AddToLeafClasses(type_class);
- }
+ ASSERT(!FLAG_use_cha_deopt);
} else {
return false;
}
@@ -2456,8 +2454,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') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698