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

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

Issue 10431006: First step toward an optimizing compiler: (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 7 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_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 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 Computation* BuildStoreLocal(const LocalVariable& local, Value* value); 118 Computation* BuildStoreLocal(const LocalVariable& local, Value* value);
119 Computation* BuildLoadLocal(const LocalVariable& local); 119 Computation* BuildLoadLocal(const LocalVariable& local);
120 120
121 // Helpers for translating parts of the AST. 121 // Helpers for translating parts of the AST.
122 void TranslateArgumentList(const ArgumentListNode& node, 122 void TranslateArgumentList(const ArgumentListNode& node,
123 ZoneGrowableArray<Value*>* values); 123 ZoneGrowableArray<Value*>* values);
124 124
125 // Creates an instantiated type argument vector used in preparation of an 125 // Creates an instantiated type argument vector used in preparation of an
126 // allocation call. 126 // allocation call.
127 // May be called only if allocating an object of a parameterized class. 127 // May be called only if allocating an object of a parameterized class.
128 Definition* BuildInstantiatedTypeArguments( 128 BindInstr* BuildInstantiatedTypeArguments(
129 intptr_t token_index, 129 intptr_t token_index,
130 const AbstractTypeArguments& type_arguments); 130 const AbstractTypeArguments& type_arguments);
131 131
132 // Creates a possibly uninstantiated type argument vector and the type 132 // Creates a possibly uninstantiated type argument vector and the type
133 // argument vector of the instantiator (two values in 'args') used in 133 // argument vector of the instantiator (two values in 'args') used in
134 // preparation of a constructor call. 134 // preparation of a constructor call.
135 // May be called only if allocating an object of a parameterized class. 135 // May be called only if allocating an object of a parameterized class.
136 void BuildConstructorTypeArguments(ConstructorCallNode* node, 136 void BuildConstructorTypeArguments(ConstructorCallNode* node,
137 ZoneGrowableArray<Value*>* args); 137 ZoneGrowableArray<Value*>* args);
138 138
(...skipping 26 matching lines...) Expand all
165 void CloseFragment() { exit_ = NULL; } 165 void CloseFragment() { exit_ = NULL; }
166 intptr_t AllocateTempIndex() { return temp_index_++; } 166 intptr_t AllocateTempIndex() { return temp_index_++; }
167 void DeallocateTempIndex(intptr_t n) { 167 void DeallocateTempIndex(intptr_t n) {
168 ASSERT(temp_index_ >= n); 168 ASSERT(temp_index_ >= n);
169 temp_index_ -= n; 169 temp_index_ -= n;
170 } 170 }
171 171
172 virtual void CompiletimeStringInterpolation(const Function& interpol_func, 172 virtual void CompiletimeStringInterpolation(const Function& interpol_func,
173 const Array& literals); 173 const Array& literals);
174 174
175 Definition* BuildObjectAllocation(ConstructorCallNode* node); 175 BindInstr* BuildObjectAllocation(ConstructorCallNode* node);
176 void BuildConstructorCall(ConstructorCallNode* node, Value* alloc_value); 176 void BuildConstructorCall(ConstructorCallNode* node, Value* alloc_value);
177 177
178 void BuildStoreContext(const LocalVariable& variable); 178 void BuildStoreContext(const LocalVariable& variable);
179 void BuildLoadContext(const LocalVariable& variable); 179 void BuildLoadContext(const LocalVariable& variable);
180 180
181 void BuildThrowNode(ThrowNode* node); 181 void BuildThrowNode(ThrowNode* node);
182 182
183 ClosureCallComp* BuildClosureCall(ClosureCallNode* node); 183 ClosureCallComp* BuildClosureCall(ClosureCallNode* node);
184 184
185 private: 185 private:
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
297 // Output parameters. 297 // Output parameters.
298 TargetEntryInstr** true_successor_address_; 298 TargetEntryInstr** true_successor_address_;
299 TargetEntryInstr** false_successor_address_; 299 TargetEntryInstr** false_successor_address_;
300 300
301 intptr_t condition_token_index_; 301 intptr_t condition_token_index_;
302 }; 302 };
303 303
304 } // namespace dart 304 } // namespace dart
305 305
306 #endif // VM_FLOW_GRAPH_BUILDER_H_ 306 #endif // VM_FLOW_GRAPH_BUILDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698