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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/vm/intermediate_language.h ('k') | runtime/vm/intermediate_language_arm.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/intermediate_language.h" 5 #include "vm/intermediate_language.h"
6 6
7 #include "vm/bigint_operations.h" 7 #include "vm/bigint_operations.h"
8 #include "vm/bit_vector.h" 8 #include "vm/bit_vector.h"
9 #include "vm/dart_entry.h" 9 #include "vm/dart_entry.h"
10 #include "vm/flow_graph_allocator.h" 10 #include "vm/flow_graph_allocator.h"
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 } 142 }
143 143
144 144
145 bool StrictCompareInstr::AttributesEqual(Instruction* other) const { 145 bool StrictCompareInstr::AttributesEqual(Instruction* other) const {
146 StrictCompareInstr* other_op = other->AsStrictCompare(); 146 StrictCompareInstr* other_op = other->AsStrictCompare();
147 ASSERT(other_op != NULL); 147 ASSERT(other_op != NULL);
148 return kind() == other_op->kind(); 148 return kind() == other_op->kind();
149 } 149 }
150 150
151 151
152 bool MathMinMaxInstr::AttributesEqual(Instruction* other) const {
153 MathMinMaxInstr* other_op = other->AsMathMinMax();
154 ASSERT(other_op != NULL);
155 return (op_kind() == other_op->op_kind()) &&
156 (result_cid() == other_op->result_cid());
157 }
158
152 bool BinarySmiOpInstr::AttributesEqual(Instruction* other) const { 159 bool BinarySmiOpInstr::AttributesEqual(Instruction* other) const {
153 BinarySmiOpInstr* other_op = other->AsBinarySmiOp(); 160 BinarySmiOpInstr* other_op = other->AsBinarySmiOp();
154 ASSERT(other_op != NULL); 161 ASSERT(other_op != NULL);
155 return (op_kind() == other_op->op_kind()) && 162 return (op_kind() == other_op->op_kind()) &&
156 (overflow_ == other_op->overflow_) && 163 (overflow_ == other_op->overflow_) &&
157 (is_truncating_ == other_op->is_truncating_); 164 (is_truncating_ == other_op->is_truncating_);
158 } 165 }
159 166
160 167
161 EffectSet LoadFieldInstr::Dependencies() const { 168 EffectSet LoadFieldInstr::Dependencies() const {
(...skipping 2435 matching lines...) Expand 10 before | Expand all | Expand 10 after
2597 default: 2604 default:
2598 UNREACHABLE(); 2605 UNREACHABLE();
2599 } 2606 }
2600 return kPowRuntimeEntry; 2607 return kPowRuntimeEntry;
2601 } 2608 }
2602 2609
2603 2610
2604 #undef __ 2611 #undef __
2605 2612
2606 } // namespace dart 2613 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/intermediate_language.h ('k') | runtime/vm/intermediate_language_arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698