| 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_DEOPT_INSTRUCTIONS_H_ | 5 #ifndef VM_DEOPT_INSTRUCTIONS_H_ |
| 6 #define VM_DEOPT_INSTRUCTIONS_H_ | 6 #define VM_DEOPT_INSTRUCTIONS_H_ |
| 7 | 7 |
| 8 #include "vm/allocation.h" | 8 #include "vm/allocation.h" |
| 9 #include "vm/assembler.h" | 9 #include "vm/assembler.h" |
| 10 #include "vm/code_generator.h" | 10 #include "vm/code_generator.h" |
| (...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 275 // the heap and reset the builder's internal state for the next DeoptInfo. | 275 // the heap and reset the builder's internal state for the next DeoptInfo. |
| 276 class DeoptInfoBuilder : public ValueObject { | 276 class DeoptInfoBuilder : public ValueObject { |
| 277 public: | 277 public: |
| 278 explicit DeoptInfoBuilder(const intptr_t num_args); | 278 explicit DeoptInfoBuilder(const intptr_t num_args); |
| 279 | 279 |
| 280 // 'object_table' holds all objects referred to by DeoptInstr in | 280 // 'object_table' holds all objects referred to by DeoptInstr in |
| 281 // all DeoptInfo instances for a single Code object. | 281 // all DeoptInfo instances for a single Code object. |
| 282 const GrowableObjectArray& object_table() { return object_table_; } | 282 const GrowableObjectArray& object_table() { return object_table_; } |
| 283 | 283 |
| 284 // Return address before instruction. | 284 // Return address before instruction. |
| 285 void AddReturnAddress(const Function& function, | 285 void AddReturnAddress(const Code& code, |
| 286 intptr_t deopt_id, | 286 intptr_t deopt_id, |
| 287 intptr_t dest_index); | 287 intptr_t dest_index); |
| 288 | 288 |
| 289 // Copy from optimized frame to unoptimized. | 289 // Copy from optimized frame to unoptimized. |
| 290 void AddCopy(Value* value, const Location& source_loc, intptr_t dest_index); | 290 void AddCopy(Value* value, const Location& source_loc, intptr_t dest_index); |
| 291 void AddPcMarker(const Function& function, intptr_t dest_index); | 291 void AddPcMarker(const Code& code, intptr_t dest_index); |
| 292 void AddPp(const Function& function, intptr_t dest_index); | 292 void AddPp(const Code& code, intptr_t dest_index); |
| 293 void AddCallerFp(intptr_t dest_index); | 293 void AddCallerFp(intptr_t dest_index); |
| 294 void AddCallerPp(intptr_t dest_index); | 294 void AddCallerPp(intptr_t dest_index); |
| 295 void AddCallerPc(intptr_t dest_index); | 295 void AddCallerPc(intptr_t dest_index); |
| 296 | 296 |
| 297 // Add object to be materialized. Emit kMaterializeObject instruction. | 297 // Add object to be materialized. Emit kMaterializeObject instruction. |
| 298 void AddMaterialization(MaterializeObjectInstr* mat); | 298 void AddMaterialization(MaterializeObjectInstr* mat); |
| 299 | 299 |
| 300 // For every materialized object emit instructions describing data required | 300 // For every materialized object emit instructions describing data required |
| 301 // for materialization: class of the instance to allocate and field-value | 301 // for materialization: class of the instance to allocate and field-value |
| 302 // pairs for initialization. | 302 // pairs for initialization. |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 372 DeoptInfo* info, | 372 DeoptInfo* info, |
| 373 Smi* reason); | 373 Smi* reason); |
| 374 | 374 |
| 375 private: | 375 private: |
| 376 static const intptr_t kEntrySize = 3; | 376 static const intptr_t kEntrySize = 3; |
| 377 }; | 377 }; |
| 378 | 378 |
| 379 } // namespace dart | 379 } // namespace dart |
| 380 | 380 |
| 381 #endif // VM_DEOPT_INSTRUCTIONS_H_ | 381 #endif // VM_DEOPT_INSTRUCTIONS_H_ |
| OLD | NEW |