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