A64: Minor improvement in FullCodeGenerator::VisitObjectLiteral.
This patch avoid to push some values on the stack when it's not needed. R=ulan@chromium.org Review URL: https://codereview.chromium.org/183193005 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@19708 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
parent
42169bf3df
commit
a1102885e0
@ -1689,30 +1689,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:
|
||||
|
Loading…
Reference in New Issue
Block a user