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

Side by Side Diff: runtime/vm/flow_graph_optimizer.h

Issue 13878017: Convert EqualityCompare to StrictCompare if reciever is either null or guaranteed to have default e… (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 8 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 | « no previous file | runtime/vm/flow_graph_optimizer.cc » ('j') | runtime/vm/flow_graph_optimizer.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 #ifndef VM_FLOW_GRAPH_OPTIMIZER_H_ 5 #ifndef VM_FLOW_GRAPH_OPTIMIZER_H_
6 #define VM_FLOW_GRAPH_OPTIMIZER_H_ 6 #define VM_FLOW_GRAPH_OPTIMIZER_H_
7 7
8 #include "vm/intermediate_language.h" 8 #include "vm/intermediate_language.h"
9 #include "vm/flow_graph.h" 9 #include "vm/flow_graph.h"
10 10
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 void ReplaceWithMathCFunction(InstanceCallInstr* call, 147 void ReplaceWithMathCFunction(InstanceCallInstr* call,
148 MethodRecognizer::Kind recognized_kind); 148 MethodRecognizer::Kind recognized_kind);
149 149
150 void HandleRelationalOp(RelationalOpInstr* comp); 150 void HandleRelationalOp(RelationalOpInstr* comp);
151 151
152 // Visit an equality compare. The current instruction can be the 152 // Visit an equality compare. The current instruction can be the
153 // comparison itself or a branch on the comparison. 153 // comparison itself or a branch on the comparison.
154 template <typename T> 154 template <typename T>
155 void HandleEqualityCompare(EqualityCompareInstr* comp, 155 void HandleEqualityCompare(EqualityCompareInstr* comp,
156 T current_instruction); 156 T current_instruction);
157 bool CanStrictifyEqualityCompare(EqualityCompareInstr* call);
158 template <typename T>
159 bool StrictifyEqualityCompare(EqualityCompareInstr* compare,
160 T current_instruction);
157 161
158 void OptimizeLeftShiftBitAndSmiOp(Definition* bit_and_instr, 162 void OptimizeLeftShiftBitAndSmiOp(Definition* bit_and_instr,
159 Definition* left_instr, 163 Definition* left_instr,
160 Definition* right_instr); 164 Definition* right_instr);
161 165
162 void AddToGuardedFields(Field* field); 166 void AddToGuardedFields(Field* field);
163 167
164 FlowGraph* flow_graph_; 168 FlowGraph* flow_graph_;
165 GrowableArray<Field*>* guarded_fields_; 169 GrowableArray<Field*>* guarded_fields_;
166 170
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
309 // platform. 313 // platform.
310 class IfConverter : public AllStatic { 314 class IfConverter : public AllStatic {
311 public: 315 public:
312 static void Simplify(FlowGraph* flow_graph); 316 static void Simplify(FlowGraph* flow_graph);
313 }; 317 };
314 318
315 319
316 } // namespace dart 320 } // namespace dart
317 321
318 #endif // VM_FLOW_GRAPH_OPTIMIZER_H_ 322 #endif // VM_FLOW_GRAPH_OPTIMIZER_H_
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/flow_graph_optimizer.cc » ('j') | runtime/vm/flow_graph_optimizer.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698