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