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

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

Issue 10448059: Use temporary variable for StoreIndexed that returns a value. (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
« 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 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 Value* value, 148 Value* value,
149 const AbstractType& dst_type, 149 const AbstractType& dst_type,
150 const String& dst_name); 150 const String& dst_name);
151 151
152 // Perform a type check on the given value and return it. 152 // Perform a type check on the given value and return it.
153 Value* BuildAssignableValue(intptr_t token_index, 153 Value* BuildAssignableValue(intptr_t token_index,
154 Value* value, 154 Value* value,
155 const AbstractType& dst_type, 155 const AbstractType& dst_type,
156 const String& dst_name); 156 const String& dst_name);
157 157
158 void BuildStoreIndexedValues(StoreIndexedNode* node,
159 Value** array,
160 Value** index,
161 Value** value);
162
158 virtual void BuildInstanceOf(ComparisonNode* node); 163 virtual void BuildInstanceOf(ComparisonNode* node);
159 164
160 bool MustSaveRestoreContext(SequenceNode* node) const; 165 bool MustSaveRestoreContext(SequenceNode* node) const;
161 166
162 // Moves parent context into the context register. 167 // Moves parent context into the context register.
163 void UnchainContext(); 168 void UnchainContext();
164 169
165 void CloseFragment() { exit_ = NULL; } 170 void CloseFragment() { exit_ = NULL; }
166 intptr_t AllocateTempIndex() { return temp_index_++; } 171 intptr_t AllocateTempIndex() { return temp_index_++; }
167 void DeallocateTempIndex(intptr_t n) { 172 void DeallocateTempIndex(intptr_t n) {
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 ValueGraphVisitor(FlowGraphBuilder* owner, intptr_t temp_index) 218 ValueGraphVisitor(FlowGraphBuilder* owner, intptr_t temp_index)
214 : EffectGraphVisitor(owner, temp_index), value_(NULL) { } 219 : EffectGraphVisitor(owner, temp_index), value_(NULL) { }
215 220
216 // Visit functions overridden by this class. 221 // Visit functions overridden by this class.
217 virtual void VisitLiteralNode(LiteralNode* node); 222 virtual void VisitLiteralNode(LiteralNode* node);
218 virtual void VisitAssignableNode(AssignableNode* node); 223 virtual void VisitAssignableNode(AssignableNode* node);
219 virtual void VisitConstructorCallNode(ConstructorCallNode* node); 224 virtual void VisitConstructorCallNode(ConstructorCallNode* node);
220 virtual void VisitBinaryOpNode(BinaryOpNode* node); 225 virtual void VisitBinaryOpNode(BinaryOpNode* node);
221 virtual void VisitConditionalExprNode(ConditionalExprNode* node); 226 virtual void VisitConditionalExprNode(ConditionalExprNode* node);
222 virtual void VisitLoadLocalNode(LoadLocalNode* node); 227 virtual void VisitLoadLocalNode(LoadLocalNode* node);
228 virtual void VisitStoreIndexedNode(StoreIndexedNode* node);
223 virtual void VisitThrowNode(ThrowNode* node); 229 virtual void VisitThrowNode(ThrowNode* node);
224 virtual void VisitClosureCallNode(ClosureCallNode* node); 230 virtual void VisitClosureCallNode(ClosureCallNode* node);
225 231
226 Value* value() const { return value_; } 232 Value* value() const { return value_; }
227 233
228 protected: 234 protected:
229 // Output parameters. 235 // Output parameters.
230 Value* value_; 236 Value* value_;
231 237
232 private: 238 private:
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
299 // Output parameters. 305 // Output parameters.
300 TargetEntryInstr** true_successor_address_; 306 TargetEntryInstr** true_successor_address_;
301 TargetEntryInstr** false_successor_address_; 307 TargetEntryInstr** false_successor_address_;
302 308
303 intptr_t condition_token_index_; 309 intptr_t condition_token_index_;
304 }; 310 };
305 311
306 } // namespace dart 312 } // namespace dart
307 313
308 #endif // VM_FLOW_GRAPH_BUILDER_H_ 314 #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