Index: src/globals.h |
diff --git a/src/globals.h b/src/globals.h |
index c6a5444d8ac94fa2d29cefa2a5350b6033a27f51..0e24d5933269ca0f00cb212e03173dba50da1c45 100644 |
--- a/src/globals.h |
+++ b/src/globals.h |
@@ -754,6 +754,21 @@ inline std::ostream& operator<<(std::ostream& os, ConvertReceiverMode mode) { |
return os; |
} |
+// Defines whether tail call optimization is allowed. |
+enum class TailCallMode : unsigned { kAllow, kDisallow }; |
+ |
+inline size_t hash_value(TailCallMode mode) { return bit_cast<unsigned>(mode); } |
+ |
+inline std::ostream& operator<<(std::ostream& os, TailCallMode mode) { |
+ switch (mode) { |
+ case TailCallMode::kAllow: |
+ return os << "ALLOW_TAIL_CALLS"; |
+ case TailCallMode::kDisallow: |
+ return os << "DISALLOW_TAIL_CALLS"; |
+ } |
+ UNREACHABLE(); |
+ return os; |
+} |
// Used to specify if a macro instruction must perform a smi check on tagged |
// values. |