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

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

Issue 10198028: Remove some more uses of named temporaries. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 8 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 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 // Build the increment part of an increment operation (add or subtract 1). 135 // Build the increment part of an increment operation (add or subtract 1).
136 // Consumes the original value and produces the value +/- 1. 136 // Consumes the original value and produces the value +/- 1.
137 Definition* BuildIncrOpIncrement(Token::Kind kind, 137 Definition* BuildIncrOpIncrement(Token::Kind kind,
138 intptr_t node_id, 138 intptr_t node_id,
139 intptr_t token_index, 139 intptr_t token_index,
140 Value* original); 140 Value* original);
141 141
142 // Creates an instantiated type argument vector used in preparation of a 142 // Creates an instantiated type argument vector used in preparation of a
143 // factory call. 143 // factory call.
144 // May be called only if allocating an object of a parameterized class. 144 // May be called only if allocating an object of a parameterized class.
145 Value* BuildFactoryTypeArguments(ConstructorCallNode* node, 145 Definition* BuildFactoryTypeArguments(ConstructorCallNode* node);
146 intptr_t start_index);
147 146
148 // Creates a possibly uninstantiated type argument vector and the type 147 // Creates a possibly uninstantiated type argument vector and the type
149 // argument vector of the instantiator (two values in 'args') used in 148 // argument vector of the instantiator (two values in 'args') used in
150 // preparation of a constructor call. 149 // preparation of a constructor call.
151 // May be called only if allocating an object of a parameterized class. 150 // May be called only if allocating an object of a parameterized class.
152 void BuildConstructorTypeArguments(ConstructorCallNode* node, 151 void BuildConstructorTypeArguments(ConstructorCallNode* node,
153 intptr_t start_index,
154 ZoneGrowableArray<Value*>* args); 152 ZoneGrowableArray<Value*>* args);
155 153
156 // Returns the value of the type arguments of the instantiator. 154 // Returns the value of the type arguments of the instantiator.
157 Value* BuildInstantiatorTypeArguments(intptr_t token_index, 155 Value* BuildInstantiatorTypeArguments(intptr_t token_index,
158 intptr_t start_index); 156 intptr_t start_index);
159 157
160 // Perform a type check on the given value. 158 // Perform a type check on the given value.
161 void BuildAssertAssignable(intptr_t node_id, 159 void BuildAssertAssignable(intptr_t node_id,
162 intptr_t token_index, 160 intptr_t token_index,
163 Value* value, 161 Value* value,
(...skipping 16 matching lines...) Expand all
180 // Moves parent context into the context register. 178 // Moves parent context into the context register.
181 void UnchainContext(); 179 void UnchainContext();
182 180
183 void CloseFragment() { exit_ = NULL; } 181 void CloseFragment() { exit_ = NULL; }
184 intptr_t AllocateTempIndex() { return temp_index_++; } 182 intptr_t AllocateTempIndex() { return temp_index_++; }
185 void DeallocateTempIndex() { --temp_index_; } 183 void DeallocateTempIndex() { --temp_index_; }
186 184
187 virtual void CompiletimeStringInterpolation(const Function& interpol_func, 185 virtual void CompiletimeStringInterpolation(const Function& interpol_func,
188 const Array& literals); 186 const Array& literals);
189 187
190 TempVal* BuildObjectAllocation(ConstructorCallNode* node, 188 Definition* BuildObjectAllocation(ConstructorCallNode* node);
191 int start_index); 189 void BuildConstructorCall(ConstructorCallNode* node, Value* alloc_value);
192 void BuildConstructorCall(ConstructorCallNode* node,
193 int start_index,
194 Value* alloc_value);
195 190
196 void BuildStoreContext(const LocalVariable& variable); 191 void BuildStoreContext(const LocalVariable& variable);
197 void BuildLoadContext(const LocalVariable& variable); 192 void BuildLoadContext(const LocalVariable& variable);
198 193
199 void BuildThrowNode(ThrowNode* node); 194 void BuildThrowNode(ThrowNode* node);
200 195
201 private: 196 private:
202 // Specify a computation as the final result. Adds a Do instruction to 197 // Specify a computation as the final result. Adds a Do instruction to
203 // the graph, but normally overridden in subclasses. 198 // the graph, but normally overridden in subclasses.
204 virtual void ReturnComputation(Computation* computation) { 199 virtual void ReturnComputation(Computation* computation) {
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 TargetEntryInstr** true_successor_address_; 340 TargetEntryInstr** true_successor_address_;
346 TargetEntryInstr** false_successor_address_; 341 TargetEntryInstr** false_successor_address_;
347 342
348 intptr_t condition_node_id_; 343 intptr_t condition_node_id_;
349 intptr_t condition_token_index_; 344 intptr_t condition_token_index_;
350 }; 345 };
351 346
352 } // namespace dart 347 } // namespace dart
353 348
354 #endif // VM_FLOW_GRAPH_BUILDER_H_ 349 #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