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

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

Issue 183193005: A64: Minor improvement in FullCodeGenerator::VisitObjectLiteral. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 10 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/a64/full-codegen-a64.cc
diff --git a/src/a64/full-codegen-a64.cc b/src/a64/full-codegen-a64.cc
index 41ee16e1a92be4aadaed95a3435e2722c9524890..fbefe049fcaeba4fca1a105e61cd8a8e3d766d96 100644
--- a/src/a64/full-codegen-a64.cc
+++ b/src/a64/full-codegen-a64.cc
@@ -1690,30 +1690,29 @@ void FullCodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) {
}
break;
}
- // Duplicate receiver on stack.
- __ Peek(x0, 0);
- __ Push(x0);
- VisitForStackValue(key);
- VisitForStackValue(value);
if (property->emit_store()) {
+ // Duplicate receiver on stack.
+ __ Peek(x0, 0);
+ __ Push(x0);
+ VisitForStackValue(key);
+ VisitForStackValue(value);
__ Mov(x0, Operand(Smi::FromInt(NONE))); // PropertyAttributes
__ Push(x0);
__ CallRuntime(Runtime::kSetProperty, 4);
} else {
- __ Drop(3);
+ VisitForEffect(key);
+ VisitForEffect(value);
}
break;
case ObjectLiteral::Property::PROTOTYPE:
- // Duplicate receiver on stack.
- __ Peek(x0, 0);
- // TODO(jbramley): This push shouldn't be necessary if we don't call the
- // runtime below. In that case, skip it.
- __ Push(x0);
- VisitForStackValue(value);
if (property->emit_store()) {
+ // Duplicate receiver on stack.
+ __ Peek(x0, 0);
+ __ Push(x0);
+ VisitForStackValue(value);
__ CallRuntime(Runtime::kSetPrototype, 2);
} else {
- __ Drop(2);
+ VisitForEffect(value);
}
break;
case ObjectLiteral::Property::GETTER:
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698