Chromium Code Reviews| 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 XmmRegisterValueAsMint(XmmRegister reg) const { | |
| 58 return (reinterpret_cast<int64_t*>(xmm_registers_copy_))[reg]; | |
| 59 } | |
|
srdjan
2012/09/28 16:50:26
Sorry, actually this should be "XmmRegisterValueAs
Florian Schneider
2012/10/02 11:10:31
Done.
| |
| 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 kCopyMintXmmRegister, | |
| 100 kCopyStackSlot, | 105 kCopyStackSlot, |
| 101 kCopyDoubleStackSlot, | 106 kCopyDoubleStackSlot, |
| 107 kCopyMintStackSlot, | |
| 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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 154 GrowableArray<DeoptInstr*> instructions_; | 160 GrowableArray<DeoptInstr*> instructions_; |
| 155 const GrowableObjectArray& object_table_; | 161 const GrowableObjectArray& object_table_; |
| 156 const intptr_t num_args_; | 162 const intptr_t num_args_; |
| 157 | 163 |
| 158 DISALLOW_COPY_AND_ASSIGN(DeoptInfoBuilder); | 164 DISALLOW_COPY_AND_ASSIGN(DeoptInfoBuilder); |
| 159 }; | 165 }; |
| 160 | 166 |
| 161 } // namespace dart | 167 } // namespace dart |
| 162 | 168 |
| 163 #endif // VM_DEOPT_INSTRUCTIONS_H_ | 169 #endif // VM_DEOPT_INSTRUCTIONS_H_ |
| OLD | NEW |