| 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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 } | 47 } |
| 48 | 48 |
| 49 intptr_t RegisterValue(Register reg) const { | 49 intptr_t RegisterValue(Register reg) const { |
| 50 return registers_copy_[reg]; | 50 return registers_copy_[reg]; |
| 51 } | 51 } |
| 52 | 52 |
| 53 double XmmRegisterValue(XmmRegister reg) const { | 53 double XmmRegisterValue(XmmRegister reg) const { |
| 54 return xmm_registers_copy_[reg]; | 54 return xmm_registers_copy_[reg]; |
| 55 } | 55 } |
| 56 | 56 |
| 57 int64_t XmmRegisterValueAsInt64(XmmRegister reg) const { |
| 58 return (reinterpret_cast<int64_t*>(xmm_registers_copy_))[reg]; |
| 59 } |
| 60 |
| 57 Isolate* isolate() const { return isolate_; } | 61 Isolate* isolate() const { return isolate_; } |
| 58 | 62 |
| 59 intptr_t from_frame_size() const { return from_frame_size_; } | 63 intptr_t from_frame_size() const { return from_frame_size_; } |
| 60 | 64 |
| 61 private: | 65 private: |
| 62 const Array& object_table_; | 66 const Array& object_table_; |
| 63 intptr_t* to_frame_; | 67 intptr_t* to_frame_; |
| 64 const intptr_t to_frame_size_; | 68 const intptr_t to_frame_size_; |
| 65 intptr_t* from_frame_; | 69 intptr_t* from_frame_; |
| 66 intptr_t from_frame_size_; | 70 intptr_t from_frame_size_; |
| (...skipping 23 matching lines...) Expand all Loading... |
| 90 virtual void Execute(DeoptimizationContext* deopt_context, | 94 virtual void Execute(DeoptimizationContext* deopt_context, |
| 91 intptr_t to_index) = 0; | 95 intptr_t to_index) = 0; |
| 92 | 96 |
| 93 protected: | 97 protected: |
| 94 enum Kind { | 98 enum Kind { |
| 95 kSetRetAfterAddress, | 99 kSetRetAfterAddress, |
| 96 kSetRetBeforeAddress, | 100 kSetRetBeforeAddress, |
| 97 kCopyConstant, | 101 kCopyConstant, |
| 98 kCopyRegister, | 102 kCopyRegister, |
| 99 kCopyXmmRegister, | 103 kCopyXmmRegister, |
| 104 kCopyInt64XmmRegister, |
| 100 kCopyStackSlot, | 105 kCopyStackSlot, |
| 101 kCopyDoubleStackSlot, | 106 kCopyDoubleStackSlot, |
| 107 kCopyInt64StackSlot, |
| 102 kSetPcMarker, | 108 kSetPcMarker, |
| 103 kSetCallerFp, | 109 kSetCallerFp, |
| 104 kSetCallerPc, | 110 kSetCallerPc, |
| 105 }; | 111 }; |
| 106 | 112 |
| 107 virtual DeoptInstr::Kind kind() const = 0; | 113 virtual DeoptInstr::Kind kind() const = 0; |
| 108 virtual intptr_t from_index() const = 0; | 114 virtual intptr_t from_index() const = 0; |
| 109 | 115 |
| 110 friend class DeoptInfoBuilder; | 116 friend class DeoptInfoBuilder; |
| 111 | 117 |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 185 DeoptInfo* info, | 191 DeoptInfo* info, |
| 186 Smi* reason); | 192 Smi* reason); |
| 187 | 193 |
| 188 private: | 194 private: |
| 189 static const intptr_t kEntrySize = 3; | 195 static const intptr_t kEntrySize = 3; |
| 190 }; | 196 }; |
| 191 | 197 |
| 192 } // namespace dart | 198 } // namespace dart |
| 193 | 199 |
| 194 #endif // VM_DEOPT_INSTRUCTIONS_H_ | 200 #endif // VM_DEOPT_INSTRUCTIONS_H_ |
| OLD | NEW |