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

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

Issue 9646008: Implementing ConstructorCall. (part I) (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 9 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
« no previous file with comments | « no previous file | runtime/vm/flow_graph_builder.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_BUILDER_H_ 5 #ifndef VM_FLOW_GRAPH_BUILDER_H_
6 #define VM_FLOW_GRAPH_BUILDER_H_ 6 #define VM_FLOW_GRAPH_BUILDER_H_
7 7
8 #include "vm/allocation.h" 8 #include "vm/allocation.h"
9 #include "vm/ast.h" 9 #include "vm/ast.h"
10 #include "vm/growable_array.h" 10 #include "vm/growable_array.h"
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 int BuildIncrOpIndexedLoad(IncrOpIndexedNode* node, int start_index); 107 int BuildIncrOpIndexedLoad(IncrOpIndexedNode* node, int start_index);
108 108
109 // Build the increment part of an increment operation (add or subtract 1). 109 // Build the increment part of an increment operation (add or subtract 1).
110 // The original value is expected to be named with start_index-1, and the 110 // The original value is expected to be named with start_index-1, and the
111 // result will be named with start_index. 111 // result will be named with start_index.
112 void BuildIncrOpIncrement(Token::Kind kind, 112 void BuildIncrOpIncrement(Token::Kind kind,
113 intptr_t node_id, 113 intptr_t node_id,
114 intptr_t token_index, 114 intptr_t token_index,
115 int start_index); 115 int start_index);
116 116
117 void BuildTypeArguments(ConstructorCallNode* node,
118 ZoneGrowableArray<Value*>* args);
119
117 void CloseFragment() { exit_ = NULL; } 120 void CloseFragment() { exit_ = NULL; }
118 intptr_t AllocateTempIndex() { return temp_index_++; } 121 intptr_t AllocateTempIndex() { return temp_index_++; }
119 122
120 private: 123 private:
121 // Specify a computation as the final result. Adds a Do instruction to 124 // Specify a computation as the final result. Adds a Do instruction to
122 // the graph, but normally overridden in subclasses. 125 // the graph, but normally overridden in subclasses.
123 virtual void ReturnComputation(Computation* computation) { 126 virtual void ReturnComputation(Computation* computation) {
124 AddInstruction(new DoInstr(computation)); 127 AddInstruction(new DoInstr(computation));
125 } 128 }
126 129
(...skipping 17 matching lines...) Expand all
144 class ValueGraphVisitor : public EffectGraphVisitor { 147 class ValueGraphVisitor : public EffectGraphVisitor {
145 public: 148 public:
146 ValueGraphVisitor(FlowGraphBuilder* owner, intptr_t temp_index) 149 ValueGraphVisitor(FlowGraphBuilder* owner, intptr_t temp_index)
147 : EffectGraphVisitor(owner, temp_index), value_(NULL) { } 150 : EffectGraphVisitor(owner, temp_index), value_(NULL) { }
148 151
149 // Visit functions overridden by this class. 152 // Visit functions overridden by this class.
150 virtual void VisitLiteralNode(LiteralNode* node); 153 virtual void VisitLiteralNode(LiteralNode* node);
151 virtual void VisitIncrOpLocalNode(IncrOpLocalNode* node); 154 virtual void VisitIncrOpLocalNode(IncrOpLocalNode* node);
152 virtual void VisitIncrOpInstanceFieldNode(IncrOpInstanceFieldNode* node); 155 virtual void VisitIncrOpInstanceFieldNode(IncrOpInstanceFieldNode* node);
153 virtual void VisitIncrOpIndexedNode(IncrOpIndexedNode* node); 156 virtual void VisitIncrOpIndexedNode(IncrOpIndexedNode* node);
157 virtual void VisitConstructorCallNode(ConstructorCallNode* node);
154 virtual void VisitBinaryOpNode(BinaryOpNode* node); 158 virtual void VisitBinaryOpNode(BinaryOpNode* node);
155 virtual void VisitConditionalExprNode(ConditionalExprNode* node); 159 virtual void VisitConditionalExprNode(ConditionalExprNode* node);
156 virtual void VisitLoadLocalNode(LoadLocalNode* node); 160 virtual void VisitLoadLocalNode(LoadLocalNode* node);
157 161
158 Value* value() const { return value_; } 162 Value* value() const { return value_; }
159 163
160 protected: 164 protected:
161 // Output parameters. 165 // Output parameters.
162 Value* value_; 166 Value* value_;
163 167
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 } 256 }
253 257
254 // Output parameters. 258 // Output parameters.
255 BlockEntryInstr** true_successor_address_; 259 BlockEntryInstr** true_successor_address_;
256 BlockEntryInstr** false_successor_address_; 260 BlockEntryInstr** false_successor_address_;
257 }; 261 };
258 262
259 } // namespace dart 263 } // namespace dart
260 264
261 #endif // VM_FLOW_GRAPH_BUILDER_H_ 265 #endif // VM_FLOW_GRAPH_BUILDER_H_
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/flow_graph_builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698