Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(342)

Side by Side Diff: runtime/vm/flow_graph_optimizer.h

Issue 10540040: Inline setters, getters, various cleanups & restructuring. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 9
10 namespace dart { 10 namespace dart {
11 11
12 template <typename T> class GrowableArray; 12 template <typename T> class GrowableArray;
13 13
14 class FlowGraphOptimizer : public FlowGraphVisitor { 14 class FlowGraphOptimizer : public FlowGraphVisitor {
15 public: 15 public:
16 explicit FlowGraphOptimizer(const GrowableArray<BlockEntryInstr*>& blocks) 16 explicit FlowGraphOptimizer(const GrowableArray<BlockEntryInstr*>& blocks)
17 : FlowGraphVisitor(blocks) {} 17 : FlowGraphVisitor(blocks) {}
18 virtual ~FlowGraphOptimizer() {} 18 virtual ~FlowGraphOptimizer() {}
19 19
20 void ApplyICData(); 20 void ApplyICData();
21 21
22 virtual void VisitInstanceCall(InstanceCallComp* comp); 22 virtual void VisitInstanceCall(InstanceCallComp* comp);
23 virtual void VisitInstanceSetter(InstanceSetterComp* comp);
23 24
24 virtual void VisitDo(DoInstr* instr); 25 virtual void VisitDo(DoInstr* instr);
25 virtual void VisitBind(BindInstr* instr); 26 virtual void VisitBind(BindInstr* instr);
26 27
27 private: 28 private:
28 void VisitBlocks(); 29 void VisitBlocks();
29 30
30 void TryReplaceWithBinaryOp(InstanceCallComp* comp, Token::Kind op_kind); 31 void TryReplaceWithBinaryOp(InstanceCallComp* comp, Token::Kind op_kind);
31 void TryReplaceWithUnaryOp(InstanceCallComp* comp, Token::Kind op_kind); 32 void TryReplaceWithUnaryOp(InstanceCallComp* comp, Token::Kind op_kind);
32 33
34 void TryInlineInstanceGetter(InstanceCallComp* comp);
35 void TryInlineInstanceSetter(InstanceSetterComp* comp);
33 36
34 DISALLOW_COPY_AND_ASSIGN(FlowGraphOptimizer); 37 DISALLOW_COPY_AND_ASSIGN(FlowGraphOptimizer);
35 }; 38 };
36 39
37 } // namespace dart 40 } // namespace dart
38 41
39 #endif // VM_FLOW_GRAPH_OPTIMIZER_H_ 42 #endif // VM_FLOW_GRAPH_OPTIMIZER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698