| OLD | NEW | 
|---|
| 1 // Copyright 2016 the V8 project authors. All rights reserved. | 1 // Copyright 2016 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_DEOPTIMIZE_REASON_H_ | 5 #ifndef V8_DEOPTIMIZE_REASON_H_ | 
| 6 #define V8_DEOPTIMIZE_REASON_H_ | 6 #define V8_DEOPTIMIZE_REASON_H_ | 
| 7 | 7 | 
| 8 #include "src/globals.h" | 8 #include "src/globals.h" | 
| 9 | 9 | 
| 10 namespace v8 { | 10 namespace v8 { | 
| 11 namespace internal { | 11 namespace internal { | 
| 12 | 12 | 
| 13 #define DEOPTIMIZE_REASON_LIST(V)                                             \ | 13 #define DEOPTIMIZE_REASON_LIST(V)                                             \ | 
| 14   V(AccessCheck, "Access check needed")                                       \ | 14   V(AccessCheck, "Access check needed")                                       \ | 
| 15   V(NoReason, "no reason")                                                    \ | 15   V(NoReason, "no reason")                                                    \ | 
| 16   V(ConstantGlobalVariableAssignment, "Constant global variable assignment")  \ | 16   V(ConstantGlobalVariableAssignment, "Constant global variable assignment")  \ | 
| 17   V(ConversionOverflow, "conversion overflow")                                \ | 17   V(ConversionOverflow, "conversion overflow")                                \ | 
| 18   V(DivisionByZero, "division by zero")                                       \ | 18   V(DivisionByZero, "division by zero")                                       \ | 
| 19   V(ElementsKindUnhandledInKeyedLoadGenericStub,                              \ |  | 
| 20     "ElementsKind unhandled in KeyedLoadGenericStub")                         \ |  | 
| 21   V(ExpectedHeapNumber, "Expected heap number")                               \ | 19   V(ExpectedHeapNumber, "Expected heap number")                               \ | 
| 22   V(ExpectedSmi, "Expected smi")                                              \ | 20   V(ExpectedSmi, "Expected smi")                                              \ | 
| 23   V(ForcedDeoptToRuntime, "Forced deopt to runtime")                          \ | 21   V(ForcedDeoptToRuntime, "Forced deopt to runtime")                          \ | 
| 24   V(Hole, "hole")                                                             \ | 22   V(Hole, "hole")                                                             \ | 
| 25   V(InstanceMigrationFailed, "instance migration failed")                     \ | 23   V(InstanceMigrationFailed, "instance migration failed")                     \ | 
| 26   V(InsufficientTypeFeedbackForCall, "Insufficient type feedback for call")   \ | 24   V(InsufficientTypeFeedbackForCall, "Insufficient type feedback for call")   \ | 
| 27   V(InsufficientTypeFeedbackForCallWithArguments,                             \ | 25   V(InsufficientTypeFeedbackForCallWithArguments,                             \ | 
| 28     "Insufficient type feedback for call with arguments")                     \ | 26     "Insufficient type feedback for call with arguments")                     \ | 
| 29   V(FastPathFailed, "Falling off the fast path")                              \ | 27   V(FastPathFailed, "Falling off the fast path")                              \ | 
| 30   V(InsufficientTypeFeedbackForCombinedTypeOfBinaryOperation,                 \ | 28   V(InsufficientTypeFeedbackForCombinedTypeOfBinaryOperation,                 \ | 
| 31     "Insufficient type feedback for combined type of binary operation")       \ | 29     "Insufficient type feedback for combined type of binary operation")       \ | 
| 32   V(InsufficientTypeFeedbackForGenericNamedAccess,                            \ | 30   V(InsufficientTypeFeedbackForGenericNamedAccess,                            \ | 
| 33     "Insufficient type feedback for generic named access")                    \ | 31     "Insufficient type feedback for generic named access")                    \ | 
| 34   V(InsufficientTypeFeedbackForGenericKeyedAccess,                            \ | 32   V(InsufficientTypeFeedbackForGenericKeyedAccess,                            \ | 
| 35     "Insufficient type feedback for generic keyed access")                    \ | 33     "Insufficient type feedback for generic keyed access")                    \ | 
| 36   V(InsufficientTypeFeedbackForLHSOfBinaryOperation,                          \ | 34   V(InsufficientTypeFeedbackForLHSOfBinaryOperation,                          \ | 
| 37     "Insufficient type feedback for LHS of binary operation")                 \ | 35     "Insufficient type feedback for LHS of binary operation")                 \ | 
| 38   V(InsufficientTypeFeedbackForRHSOfBinaryOperation,                          \ | 36   V(InsufficientTypeFeedbackForRHSOfBinaryOperation,                          \ | 
| 39     "Insufficient type feedback for RHS of binary operation")                 \ | 37     "Insufficient type feedback for RHS of binary operation")                 \ | 
| 40   V(KeyIsNegative, "key is negative")                                         \ | 38   V(KeyIsNegative, "key is negative")                                         \ | 
| 41   V(LostPrecision, "lost precision")                                          \ | 39   V(LostPrecision, "lost precision")                                          \ | 
| 42   V(LostPrecisionOrNaN, "lost precision or NaN")                              \ | 40   V(LostPrecisionOrNaN, "lost precision or NaN")                              \ | 
| 43   V(MementoFound, "memento found")                                            \ | 41   V(MementoFound, "memento found")                                            \ | 
| 44   V(MinusZero, "minus zero")                                                  \ | 42   V(MinusZero, "minus zero")                                                  \ | 
| 45   V(NaN, "NaN")                                                               \ | 43   V(NaN, "NaN")                                                               \ | 
| 46   V(NegativeKeyEncountered, "Negative key encountered")                       \ | 44   V(NegativeKeyEncountered, "Negative key encountered")                       \ | 
| 47   V(NegativeValue, "negative value")                                          \ | 45   V(NegativeValue, "negative value")                                          \ | 
| 48   V(NoCache, "no cache")                                                      \ | 46   V(NoCache, "no cache")                                                      \ | 
| 49   V(NonStrictElementsInKeyedLoadGenericStub,                                  \ |  | 
| 50     "non-strict elements in KeyedLoadGenericStub")                            \ |  | 
| 51   V(NotAHeapNumber, "not a heap number")                                      \ | 47   V(NotAHeapNumber, "not a heap number")                                      \ | 
| 52   V(NotAHeapNumberUndefinedBoolean, "not a heap number/undefined/true/false") \ | 48   V(NotAHeapNumberUndefinedBoolean, "not a heap number/undefined/true/false") \ | 
| 53   V(NotAHeapNumberUndefined, "not a heap number/undefined")                   \ | 49   V(NotAHeapNumberUndefined, "not a heap number/undefined")                   \ | 
| 54   V(NotAJavaScriptObject, "not a JavaScript object")                          \ | 50   V(NotAJavaScriptObject, "not a JavaScript object")                          \ | 
| 55   V(NotASmi, "not a Smi")                                                     \ | 51   V(NotASmi, "not a Smi")                                                     \ | 
| 56   V(OutOfBounds, "out of bounds")                                             \ | 52   V(OutOfBounds, "out of bounds")                                             \ | 
| 57   V(OutsideOfRange, "Outside of range")                                       \ | 53   V(OutsideOfRange, "Outside of range")                                       \ | 
| 58   V(Overflow, "overflow")                                                     \ | 54   V(Overflow, "overflow")                                                     \ | 
| 59   V(Proxy, "proxy")                                                           \ | 55   V(Proxy, "proxy")                                                           \ | 
| 60   V(ReceiverWasAGlobalObject, "receiver was a global object")                 \ | 56   V(ReceiverWasAGlobalObject, "receiver was a global object")                 \ | 
| (...skipping 28 matching lines...) Expand all  Loading... | 
| 89 std::ostream& operator<<(std::ostream&, DeoptimizeReason); | 85 std::ostream& operator<<(std::ostream&, DeoptimizeReason); | 
| 90 | 86 | 
| 91 size_t hash_value(DeoptimizeReason reason); | 87 size_t hash_value(DeoptimizeReason reason); | 
| 92 | 88 | 
| 93 char const* DeoptimizeReasonToString(DeoptimizeReason reason); | 89 char const* DeoptimizeReasonToString(DeoptimizeReason reason); | 
| 94 | 90 | 
| 95 }  // namespace internal | 91 }  // namespace internal | 
| 96 }  // namespace v8 | 92 }  // namespace v8 | 
| 97 | 93 | 
| 98 #endif  // V8_DEOPTIMIZE_REASON_H_ | 94 #endif  // V8_DEOPTIMIZE_REASON_H_ | 
| OLD | NEW | 
|---|