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/code_generator.h" | 10 #include "vm/code_generator.h" |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 intptr_t to_index) = 0; | 116 intptr_t to_index) = 0; |
117 | 117 |
118 bool Equals(const DeoptInstr& other) const { | 118 bool Equals(const DeoptInstr& other) const { |
119 return (kind() == other.kind()) && (from_index() == other.from_index()); | 119 return (kind() == other.kind()) && (from_index() == other.from_index()); |
120 } | 120 } |
121 | 121 |
122 // Decode the payload of a suffix command. Return the suffix length and | 122 // Decode the payload of a suffix command. Return the suffix length and |
123 // set the output parameter info_number to the index of the shared suffix. | 123 // set the output parameter info_number to the index of the shared suffix. |
124 static intptr_t DecodeSuffix(intptr_t from_index, intptr_t* info_number); | 124 static intptr_t DecodeSuffix(intptr_t from_index, intptr_t* info_number); |
125 | 125 |
| 126 // Get the function and return address which is encoded in this |
| 127 // kRetAfterAddress deopt instruction. |
| 128 static uword GetRetAfterAddress(intptr_t deopt_from_index, |
| 129 const Array& object_table, |
| 130 Function* func); |
| 131 |
126 protected: | 132 protected: |
127 virtual DeoptInstr::Kind kind() const = 0; | 133 virtual DeoptInstr::Kind kind() const = 0; |
128 virtual intptr_t from_index() const = 0; | 134 virtual intptr_t from_index() const = 0; |
129 | 135 |
130 friend class DeoptInfoBuilder; | 136 friend class DeoptInfoBuilder; |
131 | 137 |
132 private: | 138 private: |
133 DISALLOW_COPY_AND_ASSIGN(DeoptInstr); | 139 DISALLOW_COPY_AND_ASSIGN(DeoptInstr); |
134 }; | 140 }; |
135 | 141 |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
211 DeoptInfo* info, | 217 DeoptInfo* info, |
212 Smi* reason); | 218 Smi* reason); |
213 | 219 |
214 private: | 220 private: |
215 static const intptr_t kEntrySize = 3; | 221 static const intptr_t kEntrySize = 3; |
216 }; | 222 }; |
217 | 223 |
218 } // namespace dart | 224 } // namespace dart |
219 | 225 |
220 #endif // VM_DEOPT_INSTRUCTIONS_H_ | 226 #endif // VM_DEOPT_INSTRUCTIONS_H_ |
OLD | NEW |