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

Unified Diff: runtime/vm/object_test.cc

Issue 17554003: Change static calls in unoptimized code to always call via a stub. Using ICData, the call count of … (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 6 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
Index: runtime/vm/object_test.cc
===================================================================
--- runtime/vm/object_test.cc (revision 24288)
+++ runtime/vm/object_test.cc (working copy)
@@ -2544,6 +2544,13 @@
EXPECT_EQ(kSmiCid, test_class_ids[0]);
EXPECT_EQ(kSmiCid, test_class_ids[1]);
EXPECT_EQ(target1.raw(), test_target.raw());
+
+ // Check ICData for unoptimized static calls.
+ const intptr_t kNumArgsChecked = 0;
+ const ICData& scall_icdata = ICData::Handle(
+ ICData::New(function, target_name, args_descriptor, 57, kNumArgsChecked));
+ scall_icdata.AddTarget(target1);
+ EXPECT_EQ(target1.raw(), scall_icdata.GetTargetAt(0));
}

Powered by Google App Engine
This is Rietveld 408576698