| 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" |
| 11 #include "vm/growable_array.h" | 11 #include "vm/growable_array.h" |
| 12 #include "vm/object.h" | 12 #include "vm/object.h" |
| 13 | 13 |
| 14 namespace dart { | 14 namespace dart { |
| 15 | 15 |
| 16 class Location; | 16 class Location; |
| 17 class Value; | 17 class Value; |
| 18 | 18 |
| 19 // Holds all data relevant for execution of deoptimization instructions. | 19 // Holds all data relevant for execution of deoptimization instructions. |
| 20 class DeoptimizationContext : public ValueObject { | 20 class DeoptimizationContext : public ValueObject { |
| 21 public: | 21 public: |
| 22 // 'to_frame_start' points to the return address just below the frame's | 22 // 'to_frame_start' points to the return address just below the frame's |
| 23 // stack pointer. 'num_args' is 0 if there are no arguments or if there | 23 // stack pointer (kPcAddressOffsetFromSp). 'num_args' is 0 if there are no |
| 24 // are optional arguments. | 24 // arguments or if there are optional arguments. |
| 25 DeoptimizationContext(intptr_t* to_frame_start, | 25 DeoptimizationContext(intptr_t* to_frame_start, |
| 26 intptr_t to_frame_size, | 26 intptr_t to_frame_size, |
| 27 const Array& object_table, | 27 const Array& object_table, |
| 28 intptr_t num_args, | 28 intptr_t num_args, |
| 29 DeoptReasonId deopt_reason); | 29 DeoptReasonId deopt_reason); |
| 30 | 30 |
| 31 intptr_t* GetFromFrameAddressAt(intptr_t index) const { | 31 intptr_t* GetFromFrameAddressAt(intptr_t index) const { |
| 32 ASSERT((0 <= index) && (index < from_frame_size_)); | 32 ASSERT((0 <= index) && (index < from_frame_size_)); |
| 33 return &from_frame_[index]; | 33 return &from_frame_[index]; |
| 34 } | 34 } |
| (...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 220 DeoptInfo* info, | 220 DeoptInfo* info, |
| 221 Smi* reason); | 221 Smi* reason); |
| 222 | 222 |
| 223 private: | 223 private: |
| 224 static const intptr_t kEntrySize = 3; | 224 static const intptr_t kEntrySize = 3; |
| 225 }; | 225 }; |
| 226 | 226 |
| 227 } // namespace dart | 227 } // namespace dart |
| 228 | 228 |
| 229 #endif // VM_DEOPT_INSTRUCTIONS_H_ | 229 #endif // VM_DEOPT_INSTRUCTIONS_H_ |
| OLD | NEW |