Index: src/elements-kind.h |
diff --git a/src/elements-kind.h b/src/elements-kind.h |
index d8234097c4371a34518b1f0b9e4e92ea4769e1f6..1397bd7c19c59a8a4d5771260d3cb2da91ac2295 100644 |
--- a/src/elements-kind.h |
+++ b/src/elements-kind.h |
@@ -211,6 +211,15 @@ bool IsMoreGeneralElementsKindTransition(ElementsKind from_kind, |
ElementsKind to_kind); |
+inline ElementsKind GetMoreGeneralElementsKind(ElementsKind from_kind, |
+ ElementsKind to_kind) { |
+ if (IsMoreGeneralElementsKindTransition(from_kind, to_kind)) { |
+ return to_kind; |
+ } |
+ return from_kind; |
+} |
+ |
+ |
inline bool IsTransitionableFastElementsKind(ElementsKind from_kind) { |
return IsFastElementsKind(from_kind) && |
from_kind != TERMINAL_FAST_ELEMENTS_KIND; |