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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 intptr_t token_pos, | 52 intptr_t token_pos, |
53 const ICData& ic_data, | 53 const ICData& ic_data, |
54 TargetEntryInstr** entry, | 54 TargetEntryInstr** entry, |
55 Definition** last); | 55 Definition** last); |
56 | 56 |
57 // Remove environments from the instructions which do not deoptimize. | 57 // Remove environments from the instructions which do not deoptimize. |
58 void EliminateEnvironments(); | 58 void EliminateEnvironments(); |
59 | 59 |
60 virtual void VisitStaticCall(StaticCallInstr* instr); | 60 virtual void VisitStaticCall(StaticCallInstr* instr); |
61 virtual void VisitInstanceCall(InstanceCallInstr* instr); | 61 virtual void VisitInstanceCall(InstanceCallInstr* instr); |
| 62 virtual void VisitStoreInstanceField(StoreInstanceFieldInstr* instr); |
62 | 63 |
63 void InsertBefore(Instruction* next, | 64 void InsertBefore(Instruction* next, |
64 Instruction* instr, | 65 Instruction* instr, |
65 Environment* env, | 66 Environment* env, |
66 Definition::UseKind use_kind) { | 67 Definition::UseKind use_kind) { |
67 flow_graph_->InsertBefore(next, instr, env, use_kind); | 68 flow_graph_->InsertBefore(next, instr, env, use_kind); |
68 } | 69 } |
69 | 70 |
70 private: | 71 private: |
71 // Attempt to build ICData for call using propagated class-ids. | 72 // Attempt to build ICData for call using propagated class-ids. |
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
386 // Optimize spill stores inside try-blocks by identifying values that always | 387 // Optimize spill stores inside try-blocks by identifying values that always |
387 // contain a single known constant at catch block entry. | 388 // contain a single known constant at catch block entry. |
388 class TryCatchAnalyzer : public AllStatic { | 389 class TryCatchAnalyzer : public AllStatic { |
389 public: | 390 public: |
390 static void Optimize(FlowGraph* flow_graph); | 391 static void Optimize(FlowGraph* flow_graph); |
391 }; | 392 }; |
392 | 393 |
393 } // namespace dart | 394 } // namespace dart |
394 | 395 |
395 #endif // VM_FLOW_GRAPH_OPTIMIZER_H_ | 396 #endif // VM_FLOW_GRAPH_OPTIMIZER_H_ |
OLD | NEW |