OLD | NEW |
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 Loading... |
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 Loading... |
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 Loading... |
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_ |
OLD | NEW |