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 static uword GetReturnAddress(intptr_t deopt_instr, | |
127 intptr_t deopt_from_index, | |
128 const Array& object_table, | |
129 Function* func); | |
srdjan
2013/01/10 21:53:57
Please add comment about the function's result & o
siva
2013/01/12 00:20:54
Done.
| |
130 | |
126 protected: | 131 protected: |
127 virtual DeoptInstr::Kind kind() const = 0; | 132 virtual DeoptInstr::Kind kind() const = 0; |
128 virtual intptr_t from_index() const = 0; | 133 virtual intptr_t from_index() const = 0; |
129 | 134 |
130 friend class DeoptInfoBuilder; | 135 friend class DeoptInfoBuilder; |
131 | 136 |
132 private: | 137 private: |
133 DISALLOW_COPY_AND_ASSIGN(DeoptInstr); | 138 DISALLOW_COPY_AND_ASSIGN(DeoptInstr); |
134 }; | 139 }; |
135 | 140 |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
211 DeoptInfo* info, | 216 DeoptInfo* info, |
212 Smi* reason); | 217 Smi* reason); |
213 | 218 |
214 private: | 219 private: |
215 static const intptr_t kEntrySize = 3; | 220 static const intptr_t kEntrySize = 3; |
216 }; | 221 }; |
217 | 222 |
218 } // namespace dart | 223 } // namespace dart |
219 | 224 |
220 #endif // VM_DEOPT_INSTRUCTIONS_H_ | 225 #endif // VM_DEOPT_INSTRUCTIONS_H_ |
OLD | NEW |