| 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 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 145 bool InlineStringBaseCharAt(Instruction* call, | 145 bool InlineStringBaseCharAt(Instruction* call, |
| 146 intptr_t cid, | 146 intptr_t cid, |
| 147 TargetEntryInstr** entry, | 147 TargetEntryInstr** entry, |
| 148 Definition** last); | 148 Definition** last); |
| 149 | 149 |
| 150 bool InlineDoubleOp(Token::Kind op_kind, | 150 bool InlineDoubleOp(Token::Kind op_kind, |
| 151 Instruction* call, | 151 Instruction* call, |
| 152 TargetEntryInstr** entry, | 152 TargetEntryInstr** entry, |
| 153 Definition** last); | 153 Definition** last); |
| 154 | 154 |
| 155 bool InlineByteArrayViewLoad(Instruction* call, | 155 bool InlineByteArrayBaseLoad(Instruction* call, |
| 156 Definition* receiver, | 156 Definition* receiver, |
| 157 intptr_t array_cid, | 157 intptr_t array_cid, |
| 158 intptr_t view_cid, | 158 intptr_t view_cid, |
| 159 const ICData& ic_data, | 159 const ICData& ic_data, |
| 160 TargetEntryInstr** entry, | 160 TargetEntryInstr** entry, |
| 161 Definition** last); | 161 Definition** last); |
| 162 | 162 |
| 163 bool InlineByteArrayViewStore(const Function& target, | 163 bool InlineByteArrayBaseStore(const Function& target, |
| 164 Instruction* call, | 164 Instruction* call, |
| 165 Definition* receiver, | 165 Definition* receiver, |
| 166 intptr_t array_cid, | 166 intptr_t array_cid, |
| 167 intptr_t view_cid, | 167 intptr_t view_cid, |
| 168 const ICData& ic_data, | 168 const ICData& ic_data, |
| 169 TargetEntryInstr** entry, | 169 TargetEntryInstr** entry, |
| 170 Definition** last); | 170 Definition** last); |
| 171 | 171 |
| 172 intptr_t PrepareInlineByteArrayViewOp(Instruction* call, | 172 intptr_t PrepareInlineByteArrayBaseOp(Instruction* call, |
| 173 intptr_t array_cid, | 173 intptr_t array_cid, |
| 174 intptr_t view_cid, | 174 intptr_t view_cid, |
| 175 Definition** array, | 175 Definition** array, |
| 176 Definition* index, | 176 Definition* index, |
| 177 Instruction** cursor); | 177 Instruction** cursor); |
| 178 | 178 |
| 179 bool BuildByteArrayViewLoad(InstanceCallInstr* call, | 179 bool BuildByteArrayBaseLoad(InstanceCallInstr* call, |
| 180 intptr_t view_cid); | 180 intptr_t view_cid); |
| 181 bool BuildByteArrayViewStore(InstanceCallInstr* call, | 181 bool BuildByteArrayBaseStore(InstanceCallInstr* call, |
| 182 intptr_t view_cid); | 182 intptr_t view_cid); |
| 183 | 183 |
| 184 // Insert a check of 'to_check' determined by 'unary_checks'. If the | 184 // Insert a check of 'to_check' determined by 'unary_checks'. If the |
| 185 // check fails it will deoptimize to 'deopt_id' using the deoptimization | 185 // check fails it will deoptimize to 'deopt_id' using the deoptimization |
| 186 // environment 'deopt_environment'. The check is inserted immediately | 186 // environment 'deopt_environment'. The check is inserted immediately |
| 187 // before 'insert_before'. | 187 // before 'insert_before'. |
| 188 void AddCheckClass(Definition* to_check, | 188 void AddCheckClass(Definition* to_check, |
| 189 const ICData& unary_checks, | 189 const ICData& unary_checks, |
| 190 intptr_t deopt_id, | 190 intptr_t deopt_id, |
| 191 Environment* deopt_environment, | 191 Environment* deopt_environment, |
| (...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 424 // Optimize spill stores inside try-blocks by identifying values that always | 424 // Optimize spill stores inside try-blocks by identifying values that always |
| 425 // contain a single known constant at catch block entry. | 425 // contain a single known constant at catch block entry. |
| 426 class TryCatchAnalyzer : public AllStatic { | 426 class TryCatchAnalyzer : public AllStatic { |
| 427 public: | 427 public: |
| 428 static void Optimize(FlowGraph* flow_graph); | 428 static void Optimize(FlowGraph* flow_graph); |
| 429 }; | 429 }; |
| 430 | 430 |
| 431 } // namespace dart | 431 } // namespace dart |
| 432 | 432 |
| 433 #endif // VM_FLOW_GRAPH_OPTIMIZER_H_ | 433 #endif // VM_FLOW_GRAPH_OPTIMIZER_H_ |
| OLD | NEW |