OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef V8_DEOPTIMIZE_REASON_H_ |
| 6 #define V8_DEOPTIMIZE_REASON_H_ |
| 7 |
| 8 #include "src/globals.h" |
| 9 |
| 10 namespace v8 { |
| 11 namespace internal { |
| 12 |
| 13 #define DEOPTIMIZE_REASON_LIST(V) \ |
| 14 V(AccessCheck, "Access check needed") \ |
| 15 V(NoReason, "no reason") \ |
| 16 V(ConstantGlobalVariableAssignment, "Constant global variable assignment") \ |
| 17 V(ConversionOverflow, "conversion overflow") \ |
| 18 V(DivisionByZero, "division by zero") \ |
| 19 V(ElementsKindUnhandledInKeyedLoadGenericStub, \ |
| 20 "ElementsKind unhandled in KeyedLoadGenericStub") \ |
| 21 V(ExpectedHeapNumber, "Expected heap number") \ |
| 22 V(ExpectedSmi, "Expected smi") \ |
| 23 V(ForcedDeoptToRuntime, "Forced deopt to runtime") \ |
| 24 V(Hole, "hole") \ |
| 25 V(InstanceMigrationFailed, "instance migration failed") \ |
| 26 V(InsufficientTypeFeedbackForCallWithArguments, \ |
| 27 "Insufficient type feedback for call with arguments") \ |
| 28 V(FastPathFailed, "Falling off the fast path") \ |
| 29 V(InsufficientTypeFeedbackForCombinedTypeOfBinaryOperation, \ |
| 30 "Insufficient type feedback for combined type of binary operation") \ |
| 31 V(InsufficientTypeFeedbackForGenericNamedAccess, \ |
| 32 "Insufficient type feedback for generic named access") \ |
| 33 V(InsufficientTypeFeedbackForGenericKeyedAccess, \ |
| 34 "Insufficient type feedback for generic keyed access") \ |
| 35 V(InsufficientTypeFeedbackForLHSOfBinaryOperation, \ |
| 36 "Insufficient type feedback for LHS of binary operation") \ |
| 37 V(InsufficientTypeFeedbackForRHSOfBinaryOperation, \ |
| 38 "Insufficient type feedback for RHS of binary operation") \ |
| 39 V(KeyIsNegative, "key is negative") \ |
| 40 V(LostPrecision, "lost precision") \ |
| 41 V(LostPrecisionOrNaN, "lost precision or NaN") \ |
| 42 V(MementoFound, "memento found") \ |
| 43 V(MinusZero, "minus zero") \ |
| 44 V(NaN, "NaN") \ |
| 45 V(NegativeKeyEncountered, "Negative key encountered") \ |
| 46 V(NegativeValue, "negative value") \ |
| 47 V(NoCache, "no cache") \ |
| 48 V(NonStrictElementsInKeyedLoadGenericStub, \ |
| 49 "non-strict elements in KeyedLoadGenericStub") \ |
| 50 V(NotAHeapNumber, "not a heap number") \ |
| 51 V(NotAHeapNumberUndefinedBoolean, "not a heap number/undefined/true/false") \ |
| 52 V(NotAHeapNumberUndefined, "not a heap number/undefined") \ |
| 53 V(NotAJavaScriptObject, "not a JavaScript object") \ |
| 54 V(NotASmi, "not a Smi") \ |
| 55 V(OutOfBounds, "out of bounds") \ |
| 56 V(OutsideOfRange, "Outside of range") \ |
| 57 V(Overflow, "overflow") \ |
| 58 V(Proxy, "proxy") \ |
| 59 V(ReceiverWasAGlobalObject, "receiver was a global object") \ |
| 60 V(Smi, "Smi") \ |
| 61 V(TooManyArguments, "too many arguments") \ |
| 62 V(TracingElementsTransitions, "Tracing elements transitions") \ |
| 63 V(TypeMismatchBetweenFeedbackAndConstant, \ |
| 64 "Type mismatch between feedback and constant") \ |
| 65 V(UnexpectedCellContentsInConstantGlobalStore, \ |
| 66 "Unexpected cell contents in constant global store") \ |
| 67 V(UnexpectedCellContentsInGlobalStore, \ |
| 68 "Unexpected cell contents in global store") \ |
| 69 V(UnexpectedObject, "unexpected object") \ |
| 70 V(UnexpectedRHSOfBinaryOperation, "Unexpected RHS of binary operation") \ |
| 71 V(UninitializedBoilerplateInFastClone, \ |
| 72 "Uninitialized boilerplate in fast clone") \ |
| 73 V(UninitializedBoilerplateLiterals, "Uninitialized boilerplate literals") \ |
| 74 V(UnknownMapInPolymorphicAccess, "Unknown map in polymorphic access") \ |
| 75 V(UnknownMapInPolymorphicCall, "Unknown map in polymorphic call") \ |
| 76 V(UnknownMapInPolymorphicElementAccess, \ |
| 77 "Unknown map in polymorphic element access") \ |
| 78 V(UnknownMap, "Unknown map") \ |
| 79 V(ValueMismatch, "value mismatch") \ |
| 80 V(WrongInstanceType, "wrong instance type") \ |
| 81 V(WrongMap, "wrong map") \ |
| 82 V(UndefinedOrNullInForIn, "null or undefined in for-in") \ |
| 83 V(UndefinedOrNullInToObject, "null or undefined in ToObject") |
| 84 |
| 85 enum class DeoptimizeReason : uint8_t { |
| 86 #define DEOPTIMIZE_REASON(Name, message) k##Name, |
| 87 DEOPTIMIZE_REASON_LIST(DEOPTIMIZE_REASON) |
| 88 #undef DEOPTIMIZE_REASON |
| 89 }; |
| 90 |
| 91 std::ostream& operator<<(std::ostream&, DeoptimizeReason); |
| 92 |
| 93 size_t hash_value(DeoptimizeReason reason); |
| 94 |
| 95 char const* const DeoptimizeReasonToString(DeoptimizeReason reason); |
| 96 |
| 97 } // namespace internal |
| 98 } // namespace v8 |
| 99 |
| 100 #endif // V8_DEOPTIMIZE_REASON_H_ |
OLD | NEW |