Index: src/globals.h |
diff --git a/src/globals.h b/src/globals.h |
index ebb6f74050c99af6ac96ebd2ffa7220eaa038915..b471d9d140cfe6f795c5ad2a8966b2dded2d846e 100644 |
--- a/src/globals.h |
+++ b/src/globals.h |
@@ -1215,6 +1215,29 @@ inline std::ostream& operator<<(std::ostream& os, CallableType function_type) { |
return os; |
} |
+enum class PushArgsConstructMode : unsigned { |
+ kJSFunction, |
+ kWithFinalSpread, |
+ kOther |
+}; |
+ |
+inline size_t hash_value(PushArgsConstructMode mode) { |
+ return bit_cast<unsigned>(mode); |
+} |
+ |
+inline std::ostream& operator<<(std::ostream& os, PushArgsConstructMode mode) { |
+ switch (mode) { |
+ case PushArgsConstructMode::kJSFunction: |
+ return os << "JSFunction"; |
+ case PushArgsConstructMode::kWithFinalSpread: |
+ return os << "WithFinalSpread"; |
+ case PushArgsConstructMode::kOther: |
+ return os << "Other"; |
+ } |
+ UNREACHABLE(); |
+ return os; |
+} |
+ |
inline uint32_t ObjectHash(Address address) { |
// All objects are at least pointer aligned, so we can remove the trailing |
// zeros. |