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

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

Issue 10828319: Cleanup handling of NullType in type propagation. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 4 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 {
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 DISALLOW_COPY_AND_ASSIGN(FlowGraphAnalyzer); 68 DISALLOW_COPY_AND_ASSIGN(FlowGraphAnalyzer);
69 }; 69 };
70 70
71 71
72 class ParsedFunction; 72 class ParsedFunction;
73 73
74 74
75 class FlowGraphTypePropagator : public FlowGraphVisitor { 75 class FlowGraphTypePropagator : public FlowGraphVisitor {
76 public: 76 public:
77 FlowGraphTypePropagator(const ParsedFunction& parsed_function, 77 FlowGraphTypePropagator(const ParsedFunction& parsed_function,
78 const GrowableArray<BlockEntryInstr*>& blocks) 78 const GrowableArray<BlockEntryInstr*>& blocks,
79 bool is_ssa)
79 : FlowGraphVisitor(blocks), 80 : FlowGraphVisitor(blocks),
80 parsed_function_(parsed_function), 81 parsed_function_(parsed_function),
82 is_ssa_(is_ssa),
81 still_changing_(false) { } 83 still_changing_(false) { }
82 virtual ~FlowGraphTypePropagator() { } 84 virtual ~FlowGraphTypePropagator() { }
83 85
84 const ParsedFunction& parsed_function() const { return parsed_function_; } 86 const ParsedFunction& parsed_function() const { return parsed_function_; }
85 87
86 void PropagateTypes(); 88 void PropagateTypes();
87 89
88 virtual void VisitAssertAssignable(AssertAssignableComp* comp, 90 virtual void VisitAssertAssignable(AssertAssignableComp* comp,
89 BindInstr* instr); 91 BindInstr* instr);
90 virtual void VisitAssertBoolean(AssertBooleanComp* comp, 92 virtual void VisitAssertBoolean(AssertBooleanComp* comp, BindInstr* instr);
91 BindInstr* instr); 93 virtual void VisitInstanceOf(InstanceOfComp* comp, BindInstr* instr);
92 94
93 virtual void VisitGraphEntry(GraphEntryInstr* graph_entry); 95 virtual void VisitGraphEntry(GraphEntryInstr* graph_entry);
94 virtual void VisitJoinEntry(JoinEntryInstr* join_entry); 96 virtual void VisitJoinEntry(JoinEntryInstr* join_entry);
95 virtual void VisitBind(BindInstr* bind); 97 virtual void VisitBind(BindInstr* bind);
96 virtual void VisitPhi(PhiInstr* phi); 98 virtual void VisitPhi(PhiInstr* phi);
97 virtual void VisitParameter(ParameterInstr* param); 99 virtual void VisitParameter(ParameterInstr* param);
98 100
99 private: 101 private:
100 const ParsedFunction& parsed_function_; 102 const ParsedFunction& parsed_function_;
103 const bool is_ssa_; // TODO(regis): Remove once virtual frame backend is
104 // removed.
101 bool still_changing_; 105 bool still_changing_;
102 DISALLOW_COPY_AND_ASSIGN(FlowGraphTypePropagator); 106 DISALLOW_COPY_AND_ASSIGN(FlowGraphTypePropagator);
103 }; 107 };
104 108
105 } // namespace dart 109 } // namespace dart
106 110
107 #endif // VM_FLOW_GRAPH_OPTIMIZER_H_ 111 #endif // VM_FLOW_GRAPH_OPTIMIZER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698