| 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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 | 88 |
| 89 | 89 |
| 90 class Deoptimizer : public Malloced { | 90 class Deoptimizer : public Malloced { |
| 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 kBailoutTypesWithCodeEntry = SOFT + 1 | |
| 100 }; | 99 }; |
| 101 | 100 |
| 101 static const int kBailoutTypesWithCodeEntry = SOFT + 1; |
| 102 |
| 102 struct Reason { | 103 struct Reason { |
| 103 Reason(int r, const char* m, const char* d) | 104 Reason(int r, const char* m, const char* d) |
| 104 : raw_position(r), mnemonic(m), detail(d) {} | 105 : raw_position(r), mnemonic(m), detail(d) {} |
| 105 | 106 |
| 106 bool operator==(const Reason& other) const { | 107 bool operator==(const Reason& other) const { |
| 107 return raw_position == other.raw_position && | 108 return raw_position == other.raw_position && |
| 108 CStringEquals(mnemonic, other.mnemonic) && | 109 CStringEquals(mnemonic, other.mnemonic) && |
| 109 CStringEquals(detail, other.detail); | 110 CStringEquals(detail, other.detail); |
| 110 } | 111 } |
| 111 | 112 |
| (...skipping 867 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 979 Object** parameters_; | 980 Object** parameters_; |
| 980 Object** expression_stack_; | 981 Object** expression_stack_; |
| 981 int source_position_; | 982 int source_position_; |
| 982 | 983 |
| 983 friend class Deoptimizer; | 984 friend class Deoptimizer; |
| 984 }; | 985 }; |
| 985 | 986 |
| 986 } } // namespace v8::internal | 987 } } // namespace v8::internal |
| 987 | 988 |
| 988 #endif // V8_DEOPTIMIZER_H_ | 989 #endif // V8_DEOPTIMIZER_H_ |
| OLD | NEW |