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

Unified Diff: src/full-codegen/arm64/full-codegen-arm64.cc

Issue 1471893003: [compiler] No need to push literal index in VisitArrayLiteral. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Comment Created 5 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/full-codegen/arm/full-codegen-arm.cc ('k') | src/full-codegen/ia32/full-codegen-ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/full-codegen/arm64/full-codegen-arm64.cc
diff --git a/src/full-codegen/arm64/full-codegen-arm64.cc b/src/full-codegen/arm64/full-codegen-arm64.cc
index 4d41ce7a62dffa7410a33812ab8e216a5b2ccc42..335ded8647bb562e9da3973f820c7d2b8951515c 100644
--- a/src/full-codegen/arm64/full-codegen-arm64.cc
+++ b/src/full-codegen/arm64/full-codegen-arm64.cc
@@ -1750,14 +1750,13 @@ void FullCodeGenerator::VisitArrayLiteral(ArrayLiteral* expr) {
if (CompileTimeValue::IsCompileTimeValue(subexpr)) continue;
if (!result_saved) {
- __ Mov(x1, Smi::FromInt(expr->literal_index()));
- __ Push(x0, x1);
+ __ Push(x0);
result_saved = true;
}
VisitForAccumulatorValue(subexpr);
__ Mov(StoreDescriptor::NameRegister(), Smi::FromInt(array_index));
- __ Peek(StoreDescriptor::ReceiverRegister(), kPointerSize);
+ __ Peek(StoreDescriptor::ReceiverRegister(), 0);
EmitLoadStoreICSlot(expr->LiteralFeedbackSlot());
Handle<Code> ic =
CodeFactory::KeyedStoreIC(isolate(), language_mode()).code();
@@ -1772,7 +1771,6 @@ void FullCodeGenerator::VisitArrayLiteral(ArrayLiteral* expr) {
// (inclusive) and these elements gets appended to the array. Note that the
// number elements an iterable produces is unknown ahead of time.
if (array_index < length && result_saved) {
- __ Drop(1); // literal index
__ Pop(x0);
result_saved = false;
}
@@ -1793,7 +1791,6 @@ void FullCodeGenerator::VisitArrayLiteral(ArrayLiteral* expr) {
}
if (result_saved) {
- __ Drop(1); // literal index
context()->PlugTOS();
} else {
context()->Plug(x0);
« no previous file with comments | « src/full-codegen/arm/full-codegen-arm.cc ('k') | src/full-codegen/ia32/full-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698