Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(207)

Unified Diff: src/elements-kind.h

Issue 1307743011: Adding GetMoreGeneralElementsKind in elements-kind.h (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix? Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/builtins.cc ('k') | src/ic/ic.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « src/builtins.cc ('k') | src/ic/ic.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698