Index: src/globals.h |
diff --git a/src/globals.h b/src/globals.h |
index 90c40d48db00f0acab3967b12e2a251332cc4cbf..bcb6f4008f5a8cadd023d078249be26cc1b750ee 100644 |
--- a/src/globals.h |
+++ b/src/globals.h |
@@ -339,6 +339,22 @@ const int kNoSourcePosition = -1; |
// This constant is used to indicate missing deoptimization information. |
const int kNoDeoptimizationId = -1; |
+// Deoptimize bailout kind. |
+enum class DeoptimizeKind : uint8_t { kEager, kSoft }; |
+inline size_t hash_value(DeoptimizeKind kind) { |
+ return static_cast<size_t>(kind); |
+} |
+inline std::ostream& operator<<(std::ostream& os, DeoptimizeKind kind) { |
+ switch (kind) { |
+ case DeoptimizeKind::kEager: |
+ return os << "Eager"; |
+ case DeoptimizeKind::kSoft: |
+ return os << "Soft"; |
+ } |
+ UNREACHABLE(); |
+ return os; |
+} |
+ |
// Mask for the sign bit in a smi. |
const intptr_t kSmiSignMask = kIntptrSignBit; |