| 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 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 bool TryInlineFloat64x2Method(InstanceCallInstr* call, | 124 bool TryInlineFloat64x2Method(InstanceCallInstr* call, |
| 125 MethodRecognizer::Kind recognized_kind); | 125 MethodRecognizer::Kind recognized_kind); |
| 126 bool TryInlineInt32x4Method(InstanceCallInstr* call, | 126 bool TryInlineInt32x4Method(InstanceCallInstr* call, |
| 127 MethodRecognizer::Kind recognized_kind); | 127 MethodRecognizer::Kind recognized_kind); |
| 128 void ReplaceWithInstanceOf(InstanceCallInstr* instr); | 128 void ReplaceWithInstanceOf(InstanceCallInstr* instr); |
| 129 bool TypeCheckAsClassEquality(const AbstractType& type); | 129 bool TypeCheckAsClassEquality(const AbstractType& type); |
| 130 void ReplaceWithTypeCast(InstanceCallInstr* instr); | 130 void ReplaceWithTypeCast(InstanceCallInstr* instr); |
| 131 | 131 |
| 132 bool TryReplaceInstanceCallWithInline(InstanceCallInstr* call); | 132 bool TryReplaceInstanceCallWithInline(InstanceCallInstr* call); |
| 133 | 133 |
| 134 LoadFieldInstr* BuildLoadStringLength(Definition* str); | |
| 135 | |
| 136 Definition* PrepareInlineStringIndexOp(Instruction* call, | 134 Definition* PrepareInlineStringIndexOp(Instruction* call, |
| 137 intptr_t cid, | 135 intptr_t cid, |
| 138 Definition* str, | 136 Definition* str, |
| 139 Definition* index, | 137 Definition* index, |
| 140 Instruction* cursor); | 138 Instruction* cursor); |
| 141 | 139 |
| 142 bool InlineStringCodeUnitAt(Instruction* call, | 140 bool InlineStringCodeUnitAt(Instruction* call, |
| 143 intptr_t cid, | 141 intptr_t cid, |
| 144 TargetEntryInstr** entry, | 142 TargetEntryInstr** entry, |
| 145 Definition** last); | 143 Definition** last); |
| 146 | 144 |
| 147 bool InlineStringBaseCharAt(Instruction* call, | 145 bool InlineStringBaseCharAt(Instruction* call, |
| 148 intptr_t cid, | 146 intptr_t cid, |
| 149 TargetEntryInstr** entry, | 147 TargetEntryInstr** entry, |
| 150 Definition** last); | 148 Definition** last); |
| 151 | 149 |
| 150 bool InlineDoubleOp(Token::Kind op_kind, |
| 151 Instruction* call, |
| 152 intptr_t cid, |
| 153 TargetEntryInstr** entry, |
| 154 Definition** last); |
| 155 |
| 152 bool InlineByteArrayViewLoad(Instruction* call, | 156 bool InlineByteArrayViewLoad(Instruction* call, |
| 153 Definition* receiver, | 157 Definition* receiver, |
| 154 intptr_t array_cid, | 158 intptr_t array_cid, |
| 155 intptr_t view_cid, | 159 intptr_t view_cid, |
| 156 const ICData& ic_data, | 160 const ICData& ic_data, |
| 157 TargetEntryInstr** entry, | 161 TargetEntryInstr** entry, |
| 158 Definition** last); | 162 Definition** last); |
| 159 | 163 |
| 160 bool InlineByteArrayViewStore(const Function& target, | 164 bool InlineByteArrayViewStore(const Function& target, |
| 161 Instruction* call, | 165 Instruction* call, |
| (...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 503 // Optimize spill stores inside try-blocks by identifying values that always | 507 // Optimize spill stores inside try-blocks by identifying values that always |
| 504 // contain a single known constant at catch block entry. | 508 // contain a single known constant at catch block entry. |
| 505 class TryCatchAnalyzer : public AllStatic { | 509 class TryCatchAnalyzer : public AllStatic { |
| 506 public: | 510 public: |
| 507 static void Optimize(FlowGraph* flow_graph); | 511 static void Optimize(FlowGraph* flow_graph); |
| 508 }; | 512 }; |
| 509 | 513 |
| 510 } // namespace dart | 514 } // namespace dart |
| 511 | 515 |
| 512 #endif // VM_FLOW_GRAPH_OPTIMIZER_H_ | 516 #endif // VM_FLOW_GRAPH_OPTIMIZER_H_ |
| OLD | NEW |