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

Unified Diff: src/builtins.cc

Issue 8539011: ARM: Implement runtime function for array literal transitions. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: review feedback Created 9 years, 1 month 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/arm/full-codegen-arm.cc ('k') | src/ia32/code-stubs-ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/builtins.cc
diff --git a/src/builtins.cc b/src/builtins.cc
index 49053dbcb7514ac44831e38fe227ef6362f5f8c3..e542e4de3f46394a8cfdd6bff9c92a3fb669e7a7 100644
--- a/src/builtins.cc
+++ b/src/builtins.cc
@@ -775,7 +775,8 @@ BUILTIN(ArraySlice) {
// Set the ElementsKind.
ElementsKind elements_kind = JSObject::cast(receiver)->GetElementsKind();
- if (result_array->GetElementsKind() != elements_kind) {
+ if (IsMoreGeneralElementsKindTransition(result_array->GetElementsKind(),
+ elements_kind)) {
MaybeObject* maybe = result_array->TransitionElementsKind(elements_kind);
if (maybe->IsFailure()) return maybe;
}
@@ -875,7 +876,8 @@ BUILTIN(ArraySplice) {
// Set the ElementsKind.
ElementsKind elements_kind = array->GetElementsKind();
- if (result_array->GetElementsKind() != elements_kind) {
+ if (IsMoreGeneralElementsKindTransition(result_array->GetElementsKind(),
+ elements_kind)) {
MaybeObject* maybe = result_array->TransitionElementsKind(elements_kind);
if (maybe->IsFailure()) return maybe;
}
« no previous file with comments | « src/arm/full-codegen-arm.cc ('k') | src/ia32/code-stubs-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698