OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef V8_DEOPTIMIZER_H_ | 5 #ifndef V8_DEOPTIMIZER_H_ |
6 #define V8_DEOPTIMIZER_H_ | 6 #define V8_DEOPTIMIZER_H_ |
7 | 7 |
8 #include "src/v8.h" | 8 #include "src/v8.h" |
9 | 9 |
10 #include "src/allocation.h" | 10 #include "src/allocation.h" |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 public: | 91 public: |
92 enum BailoutType { | 92 enum BailoutType { |
93 EAGER, | 93 EAGER, |
94 LAZY, | 94 LAZY, |
95 SOFT, | 95 SOFT, |
96 // This last bailout type is not really a bailout, but used by the | 96 // This last bailout type is not really a bailout, but used by the |
97 // debugger to deoptimize stack frames to allow inspection. | 97 // debugger to deoptimize stack frames to allow inspection. |
98 DEBUGGER | 98 DEBUGGER |
99 }; | 99 }; |
100 | 100 |
101 static const int kBailoutTypesWithCodeEntry = SOFT + 1; | 101 enum { kBailoutTypesWithCodeEntry = SOFT + 1 }; |
102 | 102 |
103 struct Reason { | 103 struct Reason { |
104 Reason(int r, const char* m, const char* d) | 104 Reason(int r, const char* m, const char* d) |
105 : raw_position(r), mnemonic(m), detail(d) {} | 105 : raw_position(r), mnemonic(m), detail(d) {} |
106 | 106 |
107 bool operator==(const Reason& other) const { | 107 bool operator==(const Reason& other) const { |
108 return raw_position == other.raw_position && | 108 return raw_position == other.raw_position && |
109 CStringEquals(mnemonic, other.mnemonic) && | 109 CStringEquals(mnemonic, other.mnemonic) && |
110 CStringEquals(detail, other.detail); | 110 CStringEquals(detail, other.detail); |
111 } | 111 } |
(...skipping 868 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
980 Object** parameters_; | 980 Object** parameters_; |
981 Object** expression_stack_; | 981 Object** expression_stack_; |
982 int source_position_; | 982 int source_position_; |
983 | 983 |
984 friend class Deoptimizer; | 984 friend class Deoptimizer; |
985 }; | 985 }; |
986 | 986 |
987 } } // namespace v8::internal | 987 } } // namespace v8::internal |
988 | 988 |
989 #endif // V8_DEOPTIMIZER_H_ | 989 #endif // V8_DEOPTIMIZER_H_ |
OLD | NEW |