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

Unified Diff: runtime/vm/cha.cc

Issue 1410733006: More general CHA-based inlining and devirtualization for precompiled code. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: addressed comments, fixed type propagation assertion failure Created 5 years, 2 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/flow_graph_compiler.cc » ('j') | 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 a2f50a3449254ce917ddf5075380858e214deb29..667d598fb0263b12aa944f658f194c7a0aabd895 100644
--- a/runtime/vm/cha.cc
+++ b/runtime/vm/cha.cc
@@ -62,14 +62,20 @@ bool CHA::IsImplemented(const Class& cls) {
bool CHA::HasOverride(const Class& cls, const String& function_name) {
- const GrowableObjectArray& cls_direct_subclasses =
- GrowableObjectArray::Handle(thread_->zone(), cls.direct_subclasses());
+ // Can't track dependencies for classes on the VM heap since those are
+ // read-only.
+ // TODO(fschneider): Enable tracking of CHA dependent code for VM heap
+ // classes.
+ if (cls.InVMHeap()) return true;
+
// Subclasses of Object are not tracked by CHA. Safely assume that overrides
// exist.
if (cls.IsObjectClass()) {
return true;
}
+ const GrowableObjectArray& cls_direct_subclasses =
+ GrowableObjectArray::Handle(thread_->zone(), cls.direct_subclasses());
if (cls_direct_subclasses.IsNull()) {
return false;
}
« no previous file with comments | « no previous file | runtime/vm/flow_graph_compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698