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

Unified Diff: runtime/vm/cha.cc

Issue 81333003: Do not eagerly finalize classes in CHA, instead regard unfinalized classes as ’non-existent’ an… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 1 month 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_test.cc » ('j') | runtime/vm/class_finalizer.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/cha.cc
===================================================================
--- runtime/vm/cha.cc (revision 30577)
+++ runtime/vm/cha.cc (working copy)
@@ -83,8 +83,11 @@
Class& direct_subclass = Class::Handle();
for (intptr_t i = 0; i < cls_direct_subclasses.Length(); i++) {
direct_subclass ^= cls_direct_subclasses.At(i);
- if (direct_subclass.LookupDynamicFunction(function_name) !=
- Function::null()) {
+ // Unfinalized classes are treated as non-existent for CHA purposes,
+ // as that means that no instance of that class exists at runtime.
+ if (direct_subclass.is_finalized() &&
+ (direct_subclass.LookupDynamicFunction(function_name) !=
+ Function::null())) {
return true;
}
if (HasOverride(direct_subclass, function_name)) {
« no previous file with comments | « no previous file | runtime/vm/cha_test.cc » ('j') | runtime/vm/class_finalizer.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698