| 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 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 175 // check fails it will deoptimize to 'deopt_id' using the deoptimization | 175 // check fails it will deoptimize to 'deopt_id' using the deoptimization |
| 176 // environment 'deopt_environment'. The check is inserted immediately | 176 // environment 'deopt_environment'. The check is inserted immediately |
| 177 // before 'insert_before'. | 177 // before 'insert_before'. |
| 178 void AddCheckClass(Definition* to_check, | 178 void AddCheckClass(Definition* to_check, |
| 179 const ICData& unary_checks, | 179 const ICData& unary_checks, |
| 180 intptr_t deopt_id, | 180 intptr_t deopt_id, |
| 181 Environment* deopt_environment, | 181 Environment* deopt_environment, |
| 182 Instruction* insert_before); | 182 Instruction* insert_before); |
| 183 Instruction* GetCheckClass(Definition* to_check, | 183 Instruction* GetCheckClass(Definition* to_check, |
| 184 const ICData& unary_checks, | 184 const ICData& unary_checks, |
| 185 intptr_t deopt_id); | 185 intptr_t deopt_id, |
| 186 intptr_t token_pos); |
| 186 | 187 |
| 187 // Insert a Smi check if needed. | 188 // Insert a Smi check if needed. |
| 188 void AddCheckSmi(Definition* to_check, | 189 void AddCheckSmi(Definition* to_check, |
| 189 intptr_t deopt_id, | 190 intptr_t deopt_id, |
| 190 Environment* deopt_environment, | 191 Environment* deopt_environment, |
| 191 Instruction* insert_before); | 192 Instruction* insert_before); |
| 192 | 193 |
| 193 // Add a class check for a call's first argument immediately before the | 194 // Add a class check for a call's first argument immediately before the |
| 194 // call, using the call's IC data to determine the check, and the call's | 195 // call, using the call's IC data to determine the check, and the call's |
| 195 // deopt ID and deoptimization environment if the check fails. | 196 // deopt ID and deoptimization environment if the check fails. |
| (...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 419 // Optimize spill stores inside try-blocks by identifying values that always | 420 // Optimize spill stores inside try-blocks by identifying values that always |
| 420 // contain a single known constant at catch block entry. | 421 // contain a single known constant at catch block entry. |
| 421 class TryCatchAnalyzer : public AllStatic { | 422 class TryCatchAnalyzer : public AllStatic { |
| 422 public: | 423 public: |
| 423 static void Optimize(FlowGraph* flow_graph); | 424 static void Optimize(FlowGraph* flow_graph); |
| 424 }; | 425 }; |
| 425 | 426 |
| 426 } // namespace dart | 427 } // namespace dart |
| 427 | 428 |
| 428 #endif // VM_FLOW_GRAPH_OPTIMIZER_H_ | 429 #endif // VM_FLOW_GRAPH_OPTIMIZER_H_ |
| OLD | NEW |