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

Unified Diff: runtime/vm/cha.cc

Issue 846213004: Do not ignore core libraries from CHA analysis (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 11 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/cha.cc
diff --git a/runtime/vm/cha.cc b/runtime/vm/cha.cc
index b937357800c35acaacb5620bd95996b74f6558e2..fbb91420dddb9f14129ce6a4fa62ce7bdb9ff6f6 100644
--- a/runtime/vm/cha.cc
+++ b/runtime/vm/cha.cc
@@ -12,24 +12,7 @@
namespace dart {
-// Return true if the class is private to our internal libraries (not extendable
-// or implementable after startup). Therefore, we don't need to register
-// optimized code for invalidation for those classes.
-// TODO(fschneider): Allow more libraries.
-static bool IsKnownPrivateClass(const Class& type_class) {
- if (!Library::IsPrivate(String::Handle(type_class.Name()))) return false;
- const Library& library = Library::Handle(type_class.library());
- if (library.raw() == Library::CoreLibrary()) return true;
- if (library.raw() == Library::CollectionLibrary()) return true;
- if (library.raw() == Library::TypedDataLibrary()) return true;
- if (library.raw() == Library::MathLibrary()) return true;
- return false;
-}
-
-
void CHA::AddToLeafClasses(const Class& cls) {
- if (IsKnownPrivateClass(cls)) return;
-
for (intptr_t i = 0; i < leaf_classes_.length(); i++) {
if (leaf_classes_[i]->raw() == cls.raw()) {
return;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698