| 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_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/growable_array.h" | 10 #include "vm/growable_array.h" |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 intptr_t* GetFromFrameAddressAt(intptr_t index) const { | 29 intptr_t* GetFromFrameAddressAt(intptr_t index) const { |
| 30 ASSERT((0 <= index) && (index < from_frame_size_)); | 30 ASSERT((0 <= index) && (index < from_frame_size_)); |
| 31 return &from_frame_[index]; | 31 return &from_frame_[index]; |
| 32 } | 32 } |
| 33 | 33 |
| 34 intptr_t* GetToFrameAddressAt(intptr_t index) const { | 34 intptr_t* GetToFrameAddressAt(intptr_t index) const { |
| 35 ASSERT((0 <= index) && (index < to_frame_size_)); | 35 ASSERT((0 <= index) && (index < to_frame_size_)); |
| 36 return &to_frame_[index]; | 36 return &to_frame_[index]; |
| 37 } | 37 } |
| 38 | 38 |
| 39 intptr_t* GetFromFpAddress() const; | 39 intptr_t GetFromFp() const; |
| 40 intptr_t* GetFromPcAddress() const; | 40 intptr_t GetFromPc() const; |
| 41 |
| 42 intptr_t GetCallerFp() const; |
| 43 void SetCallerFp(intptr_t callers_fp); |
| 41 | 44 |
| 42 RawObject* ObjectAt(intptr_t index) const { | 45 RawObject* ObjectAt(intptr_t index) const { |
| 43 return object_table_.At(index); | 46 return object_table_.At(index); |
| 44 } | 47 } |
| 45 | 48 |
| 46 intptr_t RegisterValue(Register reg) const { | 49 intptr_t RegisterValue(Register reg) const { |
| 47 return registers_copy_[reg]; | 50 return registers_copy_[reg]; |
| 48 } | 51 } |
| 49 | 52 |
| 50 double XmmRegisterValue(XmmRegister reg) const { | 53 double XmmRegisterValue(XmmRegister reg) const { |
| 51 return xmm_registers_copy_[reg]; | 54 return xmm_registers_copy_[reg]; |
| 52 } | 55 } |
| 53 | 56 |
| 54 Isolate* isolate() const { return isolate_; } | 57 Isolate* isolate() const { return isolate_; } |
| 55 | 58 |
| 56 intptr_t from_frame_size() const { return from_frame_size_; } | 59 intptr_t from_frame_size() const { return from_frame_size_; } |
| 57 | 60 |
| 58 private: | 61 private: |
| 59 const Array& object_table_; | 62 const Array& object_table_; |
| 60 intptr_t* to_frame_; | 63 intptr_t* to_frame_; |
| 61 const intptr_t to_frame_size_; | 64 const intptr_t to_frame_size_; |
| 62 intptr_t* from_frame_; | 65 intptr_t* from_frame_; |
| 63 intptr_t from_frame_size_; | 66 intptr_t from_frame_size_; |
| 64 intptr_t* registers_copy_; | 67 intptr_t* registers_copy_; |
| 65 double* xmm_registers_copy_; | 68 double* xmm_registers_copy_; |
| 66 const intptr_t num_args_; | 69 const intptr_t num_args_; |
| 70 intptr_t caller_fp_; |
| 67 Isolate* isolate_; | 71 Isolate* isolate_; |
| 68 | 72 |
| 69 DISALLOW_COPY_AND_ASSIGN(DeoptimizationContext); | 73 DISALLOW_COPY_AND_ASSIGN(DeoptimizationContext); |
| 70 }; | 74 }; |
| 71 | 75 |
| 72 | 76 |
| 73 | 77 |
| 74 // Represents one deopt instruction, e.g, setup return address, store object, | 78 // Represents one deopt instruction, e.g, setup return address, store object, |
| 75 // store register, etc. The target is defined by instruction's position in | 79 // store register, etc. The target is defined by instruction's position in |
| 76 // the deopt-info array. | 80 // the deopt-info array. |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 150 GrowableArray<DeoptInstr*> instructions_; | 154 GrowableArray<DeoptInstr*> instructions_; |
| 151 const GrowableObjectArray& object_table_; | 155 const GrowableObjectArray& object_table_; |
| 152 const intptr_t num_args_; | 156 const intptr_t num_args_; |
| 153 | 157 |
| 154 DISALLOW_COPY_AND_ASSIGN(DeoptInfoBuilder); | 158 DISALLOW_COPY_AND_ASSIGN(DeoptInfoBuilder); |
| 155 }; | 159 }; |
| 156 | 160 |
| 157 } // namespace dart | 161 } // namespace dart |
| 158 | 162 |
| 159 #endif // VM_DEOPT_INSTRUCTIONS_H_ | 163 #endif // VM_DEOPT_INSTRUCTIONS_H_ |
| OLD | NEW |