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

Unified Diff: runtime/vm/intermediate_language.cc

Issue 11343046: Fix equality instruction to switch from checked (polymorphic) to megamorphic state. This helps da… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 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/intermediate_language.h ('k') | runtime/vm/intermediate_language_ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/intermediate_language.cc
===================================================================
--- runtime/vm/intermediate_language.cc (revision 14294)
+++ runtime/vm/intermediate_language.cc (working copy)
@@ -21,8 +21,8 @@
namespace dart {
DECLARE_FLAG(bool, enable_type_checks);
+DECLARE_FLAG(int, max_polymorphic_checks);
-
Definition::Definition()
: range_(NULL),
temp_index_(-1),
@@ -1074,6 +1074,13 @@
}
+bool EqualityCompareInstr::IsPolymorphic() const {
+ return HasICData() &&
+ (ic_data()->NumberOfChecks() > 0) &&
+ (ic_data()->NumberOfChecks() <= FLAG_max_polymorphic_checks);
+}
+
+
RawAbstractType* RelationalOpInstr::CompileType() const {
if ((operands_class_id() == kSmiCid) ||
(operands_class_id() == kDoubleCid) ||
« no previous file with comments | « runtime/vm/intermediate_language.h ('k') | runtime/vm/intermediate_language_ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698