| Index: src/arm/full-codegen-arm.cc
|
| diff --git a/src/arm/full-codegen-arm.cc b/src/arm/full-codegen-arm.cc
|
| index b9bd9599760373b90bf4fc21a4823902ad553684..e357450f335e1029e516bb9ef803355ff7a29450 100644
|
| --- a/src/arm/full-codegen-arm.cc
|
| +++ b/src/arm/full-codegen-arm.cc
|
| @@ -3053,26 +3053,30 @@ void FullCodeGenerator::VisitUnaryOperation(UnaryOperation* expr) {
|
| // Result of deleting non-global, non-dynamic variables is false.
|
| // The subexpression does not have side effects.
|
| context()->Plug(false);
|
| - } else {
|
| - // Property or variable reference. Call the delete builtin with
|
| - // object and property name as arguments.
|
| - if (prop != NULL) {
|
| + } else if (prop != NULL) {
|
| + if (prop->is_synthetic()) {
|
| + // Result of deleting parameters is false, even when they rewrite
|
| + // to accesses on the arguments object.
|
| + context()->Plug(false);
|
| + } else {
|
| VisitForStackValue(prop->obj());
|
| VisitForStackValue(prop->key());
|
| __ InvokeBuiltin(Builtins::DELETE, CALL_JS);
|
| - } else if (var->is_global()) {
|
| - __ ldr(r1, GlobalObjectOperand());
|
| - __ mov(r0, Operand(var->name()));
|
| - __ Push(r1, r0);
|
| - __ InvokeBuiltin(Builtins::DELETE, CALL_JS);
|
| - } else {
|
| - // Non-global variable. Call the runtime to delete from the
|
| - // context where the variable was introduced.
|
| - __ push(context_register());
|
| - __ mov(r2, Operand(var->name()));
|
| - __ push(r2);
|
| - __ CallRuntime(Runtime::kDeleteContextSlot, 2);
|
| + context()->Plug(r0);
|
| }
|
| + } else if (var->is_global()) {
|
| + __ ldr(r1, GlobalObjectOperand());
|
| + __ mov(r0, Operand(var->name()));
|
| + __ Push(r1, r0);
|
| + __ InvokeBuiltin(Builtins::DELETE, CALL_JS);
|
| + context()->Plug(r0);
|
| + } else {
|
| + // Non-global variable. Call the runtime to try to delete from the
|
| + // context where the variable was introduced.
|
| + __ push(context_register());
|
| + __ mov(r2, Operand(var->name()));
|
| + __ push(r2);
|
| + __ CallRuntime(Runtime::kDeleteContextSlot, 2);
|
| context()->Plug(r0);
|
| }
|
| break;
|
|
|