| Index: src/x64/full-codegen-x64.cc
|
| diff --git a/src/x64/full-codegen-x64.cc b/src/x64/full-codegen-x64.cc
|
| index 896e53da60425c5641f12977e69f3cc9ed1a7d92..da1a7aee44b0600b12f38c8d6a92a92caadf9fb4 100644
|
| --- a/src/x64/full-codegen-x64.cc
|
| +++ b/src/x64/full-codegen-x64.cc
|
| @@ -3006,19 +3006,18 @@ void FullCodeGenerator::VisitUnaryOperation(UnaryOperation* expr) {
|
| if (prop != NULL) {
|
| VisitForStackValue(prop->obj());
|
| VisitForStackValue(prop->key());
|
| + __ InvokeBuiltin(Builtins::DELETE, CALL_FUNCTION);
|
| } else if (var->is_global()) {
|
| __ push(GlobalObjectOperand());
|
| __ Push(var->name());
|
| + __ InvokeBuiltin(Builtins::DELETE, CALL_FUNCTION);
|
| } else {
|
| - // Non-global variable. Call the runtime to look up the context
|
| - // where the variable was introduced.
|
| + // Non-global variable. Call the runtime to delete from the
|
| + // context where the variable was introduced.
|
| __ push(context_register());
|
| __ Push(var->name());
|
| - __ CallRuntime(Runtime::kLookupContext, 2);
|
| - __ push(rax);
|
| - __ Push(var->name());
|
| + __ CallRuntime(Runtime::kDeleteContextSlot, 2);
|
| }
|
| - __ InvokeBuiltin(Builtins::DELETE, CALL_FUNCTION);
|
| context()->Plug(rax);
|
| }
|
| break;
|
|
|