| 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 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 112 bool TryInlineFloat32x4Method(InstanceCallInstr* call, | 112 bool TryInlineFloat32x4Method(InstanceCallInstr* call, |
| 113 MethodRecognizer::Kind recognized_kind); | 113 MethodRecognizer::Kind recognized_kind); |
| 114 bool TryInlineUint32x4Method(InstanceCallInstr* call, | 114 bool TryInlineUint32x4Method(InstanceCallInstr* call, |
| 115 MethodRecognizer::Kind recognized_kind); | 115 MethodRecognizer::Kind recognized_kind); |
| 116 void ReplaceWithInstanceOf(InstanceCallInstr* instr); | 116 void ReplaceWithInstanceOf(InstanceCallInstr* instr); |
| 117 void ReplaceWithTypeCast(InstanceCallInstr* instr); | 117 void ReplaceWithTypeCast(InstanceCallInstr* instr); |
| 118 | 118 |
| 119 LoadIndexedInstr* BuildStringCodeUnitAt(InstanceCallInstr* call, | 119 LoadIndexedInstr* BuildStringCodeUnitAt(InstanceCallInstr* call, |
| 120 intptr_t cid); | 120 intptr_t cid); |
| 121 | 121 |
| 122 bool BuildByteArrayViewLoad(InstanceCallInstr* call, | 122 bool InlineByteArrayViewLoad(MethodRecognizer::Kind kind, |
| 123 Instruction* call, |
| 124 intptr_t view_cid, |
| 125 const ICData& ic_data, |
| 126 TargetEntryInstr** entry, |
| 127 Definition** last); |
| 128 |
| 129 intptr_t PrepareInlineByteArrayViewOp(Instruction* call, |
| 130 intptr_t array_cid, |
| 131 intptr_t view_cid, |
| 132 Definition** array, |
| 133 Definition* index, |
| 134 Instruction** cursor); |
| 135 |
| 136 bool BuildByteArrayViewLoad(MethodRecognizer::Kind kind, |
| 137 InstanceCallInstr* call, |
| 123 intptr_t receiver_cid, | 138 intptr_t receiver_cid, |
| 124 intptr_t view_cid); | 139 intptr_t view_cid); |
| 125 bool BuildByteArrayViewStore(InstanceCallInstr* call, | 140 bool BuildByteArrayViewStore(InstanceCallInstr* call, |
| 126 intptr_t view_cid); | 141 intptr_t view_cid); |
| 127 void PrepareByteArrayViewOp(InstanceCallInstr* call, | 142 void PrepareByteArrayViewOp(InstanceCallInstr* call, |
| 128 intptr_t receiver_cid, | 143 intptr_t receiver_cid, |
| 129 intptr_t view_cid, | 144 intptr_t view_cid, |
| 130 Definition** array); | 145 Definition** array); |
| 131 | 146 |
| 132 // Insert a check of 'to_check' determined by 'unary_checks'. If the | 147 // Insert a check of 'to_check' determined by 'unary_checks'. If the |
| (...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 384 // Optimize spill stores inside try-blocks by identifying values that always | 399 // Optimize spill stores inside try-blocks by identifying values that always |
| 385 // contain a single known constant at catch block entry. | 400 // contain a single known constant at catch block entry. |
| 386 class TryCatchAnalyzer : public AllStatic { | 401 class TryCatchAnalyzer : public AllStatic { |
| 387 public: | 402 public: |
| 388 static void Optimize(FlowGraph* flow_graph); | 403 static void Optimize(FlowGraph* flow_graph); |
| 389 }; | 404 }; |
| 390 | 405 |
| 391 } // namespace dart | 406 } // namespace dart |
| 392 | 407 |
| 393 #endif // VM_FLOW_GRAPH_OPTIMIZER_H_ | 408 #endif // VM_FLOW_GRAPH_OPTIMIZER_H_ |
| OLD | NEW |