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

Unified Diff: runtime/vm/cha.h

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 | « no previous file | runtime/vm/cha.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/cha.h
diff --git a/runtime/vm/cha.h b/runtime/vm/cha.h
index 9be0caab14c381a28217a7d0ab01e6a6ea2b528c..8860a8bbc8e666204f2e011e81b7b72e46c56840 100644
--- a/runtime/vm/cha.h
+++ b/runtime/vm/cha.h
@@ -32,28 +32,25 @@ class CHA : public StackResource {
}
// Returns true if the class has subclasses.
- // Updates set of leaf classes that we register optimized code with for lazy
- // deoptimization.
bool HasSubclasses(const Class& cls);
bool HasSubclasses(intptr_t cid);
// Return true if the class is implemented by some other class.
- // Updates set of leaf classes that we register optimized code with for lazy
- // deoptimization.
bool IsImplemented(const Class& cls);
// Returns true if any subclass of 'cls' contains the function.
- // Updates set of leaf classes that we register optimized code with for lazy
- // deoptimization.
bool HasOverride(const Class& cls, const String& function_name);
const GrowableArray<Class*>& leaf_classes() const {
return leaf_classes_;
}
- private:
+ // Adds class 'cls' to the list of guarded leaf classes, deoptimization occurs
+ // if any of those leaf classes gets subclassed through later loaded/finalized
+ // libraries. Only classes that were used for CHA optimizations are added.
void AddToLeafClasses(const Class& cls);
+ private:
Thread* thread_;
GrowableArray<Class*> leaf_classes_;
CHA* previous_;
« no previous file with comments | « no previous file | runtime/vm/cha.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698