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

Unified Diff: runtime/vm/class_finalizer.cc

Issue 1158673004: Do not eagerly add guarded leaf classes with CHA; do not add them for private names. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: a Created 5 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/cha_test.cc ('k') | runtime/vm/flow_graph_compiler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/class_finalizer.cc
diff --git a/runtime/vm/class_finalizer.cc b/runtime/vm/class_finalizer.cc
index 4d508c80a8f68e5ceccecd8196e2f5825ee89adc..7c7e5d9adf4645eb79f029f179cf3f5795a12aa3 100644
--- a/runtime/vm/class_finalizer.cc
+++ b/runtime/vm/class_finalizer.cc
@@ -22,7 +22,7 @@ DEFINE_FLAG(bool, error_on_bad_type, false,
DEFINE_FLAG(bool, print_classes, false, "Prints details about loaded classes.");
DEFINE_FLAG(bool, trace_class_finalization, false, "Trace class finalization.");
DEFINE_FLAG(bool, trace_type_finalization, false, "Trace type finalization.");
-DECLARE_FLAG(bool, use_cha);
+DECLARE_FLAG(bool, use_cha_deopt);
bool ClassFinalizer::AllClassesFinalized() {
@@ -33,13 +33,13 @@ bool ClassFinalizer::AllClassesFinalized() {
}
-// Removes optimized code once we load more classes, since --use_cha based
+// Removes optimized code once we load more classes, since CHA based
// optimizations may have become invalid.
// Only methods which owner classes where subclasses can be invalid.
// TODO(srdjan): Be even more precise by recording the exact CHA optimization.
static void RemoveCHAOptimizedCode(
const GrowableArray<intptr_t>& added_subclass_to_cids) {
- ASSERT(FLAG_use_cha);
+ ASSERT(FLAG_use_cha_deopt);
if (added_subclass_to_cids.is_empty()) return;
// Switch all functions' code to unoptimized.
const ClassTable& class_table = *Isolate::Current()->class_table();
@@ -2374,7 +2374,7 @@ void ClassFinalizer::FinalizeClass(const Class& cls) {
if (cls.is_const()) {
CheckForLegalConstClass(cls);
}
- if (FLAG_use_cha) {
+ if (FLAG_use_cha_deopt) {
GrowableArray<intptr_t> cids;
CollectFinalizedSuperClasses(cls, &cids);
CollectImmediateSuperInterfaces(cls, &cids);
« no previous file with comments | « runtime/vm/cha_test.cc ('k') | runtime/vm/flow_graph_compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698