| OLD | NEW |
| 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 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 275 } | 275 } |
| 276 bool IsConstant(const Object& value) { | 276 bool IsConstant(const Object& value) { |
| 277 return !IsNonConstant(value) && !IsUnknown(value); | 277 return !IsNonConstant(value) && !IsUnknown(value); |
| 278 } | 278 } |
| 279 | 279 |
| 280 void HandleBinaryOp(Definition* instr, | 280 void HandleBinaryOp(Definition* instr, |
| 281 Token::Kind op_kind, | 281 Token::Kind op_kind, |
| 282 const Value& left, | 282 const Value& left, |
| 283 const Value& right); | 283 const Value& right); |
| 284 | 284 |
| 285 void RemoveInterpolationInputs(const StaticCallInstr& call); |
| 286 |
| 285 virtual void VisitBlocks() { UNREACHABLE(); } | 287 virtual void VisitBlocks() { UNREACHABLE(); } |
| 286 | 288 |
| 287 #define DECLARE_VISIT(type) virtual void Visit##type(type##Instr* instr); | 289 #define DECLARE_VISIT(type) virtual void Visit##type(type##Instr* instr); |
| 288 FOR_EACH_INSTRUCTION(DECLARE_VISIT) | 290 FOR_EACH_INSTRUCTION(DECLARE_VISIT) |
| 289 #undef DECLARE_VISIT | 291 #undef DECLARE_VISIT |
| 290 | 292 |
| 291 FlowGraph* graph_; | 293 FlowGraph* graph_; |
| 292 | 294 |
| 293 // Sentinels for unknown constant and non-constant values. | 295 // Sentinels for unknown constant and non-constant values. |
| 294 const Object& unknown_; | 296 const Object& unknown_; |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 371 // Optimize spill stores inside try-blocks by identifying values that always | 373 // Optimize spill stores inside try-blocks by identifying values that always |
| 372 // contain a single known constant at catch block entry. | 374 // contain a single known constant at catch block entry. |
| 373 class TryCatchAnalyzer : public AllStatic { | 375 class TryCatchAnalyzer : public AllStatic { |
| 374 public: | 376 public: |
| 375 static void Optimize(FlowGraph* flow_graph); | 377 static void Optimize(FlowGraph* flow_graph); |
| 376 }; | 378 }; |
| 377 | 379 |
| 378 } // namespace dart | 380 } // namespace dart |
| 379 | 381 |
| 380 #endif // VM_FLOW_GRAPH_OPTIMIZER_H_ | 382 #endif // VM_FLOW_GRAPH_OPTIMIZER_H_ |
| OLD | NEW |