OLD | NEW |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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_INTERMEDIATE_LANGUAGE_H_ | 5 #ifndef VM_INTERMEDIATE_LANGUAGE_H_ |
6 #define VM_INTERMEDIATE_LANGUAGE_H_ | 6 #define VM_INTERMEDIATE_LANGUAGE_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 8176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8187 Definition* result) const; | 8187 Definition* result) const; |
8188 | 8188 |
8189 void PrintTo(BufferFormatter* f) const; | 8189 void PrintTo(BufferFormatter* f) const; |
8190 const char* ToCString() const; | 8190 const char* ToCString() const; |
8191 | 8191 |
8192 // Deep copy an environment. The 'length' parameter may be less than the | 8192 // Deep copy an environment. The 'length' parameter may be less than the |
8193 // environment's length in order to drop values (e.g., passed arguments) | 8193 // environment's length in order to drop values (e.g., passed arguments) |
8194 // from the copy. | 8194 // from the copy. |
8195 Environment* DeepCopy(Zone* zone, intptr_t length) const; | 8195 Environment* DeepCopy(Zone* zone, intptr_t length) const; |
8196 | 8196 |
| 8197 #if defined(TARGET_ARCH_DBC) |
| 8198 // Return/ReturnTOS instruction drops incoming arguments so |
| 8199 // we have to drop outgoing arguments from the innermost environment. |
| 8200 // On all other architectures caller drops outgoing arguments itself |
| 8201 // hence the difference. |
| 8202 // Note: this method can only be used at the code generation stage because |
| 8203 // it mutates environment in unsafe way (e.g. does not update def-use |
| 8204 // chains). |
| 8205 void DropArguments(intptr_t argc); |
| 8206 #endif |
| 8207 |
8197 private: | 8208 private: |
8198 friend class ShallowIterator; | 8209 friend class ShallowIterator; |
8199 | 8210 |
8200 Environment(intptr_t length, | 8211 Environment(intptr_t length, |
8201 intptr_t fixed_parameter_count, | 8212 intptr_t fixed_parameter_count, |
8202 intptr_t deopt_id, | 8213 intptr_t deopt_id, |
8203 const ParsedFunction& parsed_function, | 8214 const ParsedFunction& parsed_function, |
8204 Environment* outer) | 8215 Environment* outer) |
8205 : values_(length), | 8216 : values_(length), |
8206 locations_(NULL), | 8217 locations_(NULL), |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8261 LocationSummary* Name::MakeLocationSummary(Zone* zone, bool opt) const { \ | 8272 LocationSummary* Name::MakeLocationSummary(Zone* zone, bool opt) const { \ |
8262 UNIMPLEMENTED(); \ | 8273 UNIMPLEMENTED(); \ |
8263 return NULL; \ | 8274 return NULL; \ |
8264 } \ | 8275 } \ |
8265 void Name::EmitNativeCode(FlowGraphCompiler* compiler) { UNIMPLEMENTED(); } | 8276 void Name::EmitNativeCode(FlowGraphCompiler* compiler) { UNIMPLEMENTED(); } |
8266 | 8277 |
8267 | 8278 |
8268 } // namespace dart | 8279 } // namespace dart |
8269 | 8280 |
8270 #endif // VM_INTERMEDIATE_LANGUAGE_H_ | 8281 #endif // VM_INTERMEDIATE_LANGUAGE_H_ |
OLD | NEW |