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

Unified Diff: runtime/vm/precompiler.cc

Issue 1420433004: Move selector and arguments descriptor into MegamorphicCache. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: parne 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 | « runtime/vm/object.cc ('k') | runtime/vm/raw_object.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/precompiler.cc
diff --git a/runtime/vm/precompiler.cc b/runtime/vm/precompiler.cc
index e6b60498b87cc5b2bf39cd887d1ad244a440f769..eb96f42c624e10c006e587536ff177e92096702a 100644
--- a/runtime/vm/precompiler.cc
+++ b/runtime/vm/precompiler.cc
@@ -357,6 +357,7 @@ void Precompiler::AddCalleesOf(const Function& function) {
const ObjectPool& pool = ObjectPool::Handle(Z, code.GetObjectPool());
ICData& call_site = ICData::Handle(Z);
+ MegamorphicCache& cache = MegamorphicCache::Handle(Z);
String& selector = String::Handle(Z);
Field& field = Field::Handle(Z);
Class& cls = Class::Handle(Z);
@@ -386,6 +387,11 @@ void Precompiler::AddCalleesOf(const Function& function) {
AddClosureCall(call_site);
}
}
+ } else if (entry.IsMegamorphicCache()) {
+ // A dynamic call.
+ cache ^= entry.raw();
+ selector = cache.target_name();
+ AddSelector(selector);
} else if (entry.IsField()) {
// Potential need for field initializer.
field ^= entry.raw();
« no previous file with comments | « runtime/vm/object.cc ('k') | runtime/vm/raw_object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698