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

Unified Diff: runtime/vm/intermediate_language.cc

Issue 19792007: Recognize Math's min and max function for doubles and inline the operation. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 5 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/intermediate_language.cc
===================================================================
--- runtime/vm/intermediate_language.cc (revision 25251)
+++ runtime/vm/intermediate_language.cc (working copy)
@@ -149,6 +149,13 @@
}
+bool MathMinMaxInstr::AttributesEqual(Instruction* other) const {
+ MathMinMaxInstr* other_op = other->AsMathMinMax();
+ ASSERT(other_op != NULL);
+ return (op_kind() == other_op->op_kind()) &&
+ (result_cid() == other_op->result_cid());
+}
+
bool BinarySmiOpInstr::AttributesEqual(Instruction* other) const {
BinarySmiOpInstr* other_op = other->AsBinarySmiOp();
ASSERT(other_op != NULL);

Powered by Google App Engine
This is Rietveld 408576698