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

Unified Diff: runtime/vm/object.cc

Issue 11867020: Fix bug in optimization in the presence of externalized strings. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: addressed comments Created 7 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 | « runtime/vm/object.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object.cc
===================================================================
--- runtime/vm/object.cc (revision 17269)
+++ runtime/vm/object.cc (working copy)
@@ -8124,6 +8124,19 @@
}
+bool ICData::HasReceiverClassId(intptr_t class_id) const {
+ ASSERT(num_args_tested() > 0);
+ const intptr_t len = NumberOfChecks();
+ for (intptr_t i = 0; i < len; i++) {
+ const intptr_t test_class_id = GetReceiverClassIdAt(i);
+ if (test_class_id == class_id) {
+ return true;
+ }
+ }
+ return false;
+}
+
+
// Returns true if all targets are the same.
// TODO(srdjan): if targets are native use their C_function to compare.
bool ICData::HasOneTarget() const {
« no previous file with comments | « runtime/vm/object.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698