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

Side by Side Diff: src/ia32/full-codegen-ia32.cc

Issue 6489029: Merge revisions 6742 and 6745 to the 3.0 branch. (Closed) Base URL: https://v8.googlecode.com/svn/branches/3.0/build/ia32
Patch Set: Created 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/hydrogen-instructions.h ('k') | src/x64/full-codegen-x64.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 3676 matching lines...) Expand 10 before | Expand all | Expand 10 after
3687 // The subexpression may have side effects. 3687 // The subexpression may have side effects.
3688 VisitForEffect(expr->expression()); 3688 VisitForEffect(expr->expression());
3689 context()->Plug(true); 3689 context()->Plug(true);
3690 } else if (var != NULL && 3690 } else if (var != NULL &&
3691 !var->is_global() && 3691 !var->is_global() &&
3692 var->AsSlot() != NULL && 3692 var->AsSlot() != NULL &&
3693 var->AsSlot()->type() != Slot::LOOKUP) { 3693 var->AsSlot()->type() != Slot::LOOKUP) {
3694 // Result of deleting non-global, non-dynamic variables is false. 3694 // Result of deleting non-global, non-dynamic variables is false.
3695 // The subexpression does not have side effects. 3695 // The subexpression does not have side effects.
3696 context()->Plug(false); 3696 context()->Plug(false);
3697 } else { 3697 } else if (prop != NULL) {
3698 // Property or variable reference. Call the delete builtin with 3698 if (prop->is_synthetic()) {
3699 // object and property name as arguments. 3699 // Result of deleting parameters is false, even when they rewrite
3700 if (prop != NULL) { 3700 // to accesses on the arguments object.
3701 context()->Plug(false);
3702 } else {
3701 VisitForStackValue(prop->obj()); 3703 VisitForStackValue(prop->obj());
3702 VisitForStackValue(prop->key()); 3704 VisitForStackValue(prop->key());
3703 __ InvokeBuiltin(Builtins::DELETE, CALL_FUNCTION); 3705 __ InvokeBuiltin(Builtins::DELETE, CALL_FUNCTION);
3704 } else if (var->is_global()) { 3706 context()->Plug(eax);
3705 __ push(GlobalObjectOperand());
3706 __ push(Immediate(var->name()));
3707 __ InvokeBuiltin(Builtins::DELETE, CALL_FUNCTION);
3708 } else {
3709 // Non-global variable. Call the runtime to delete from the
3710 // context where the variable was introduced.
3711 __ push(context_register());
3712 __ push(Immediate(var->name()));
3713 __ CallRuntime(Runtime::kDeleteContextSlot, 2);
3714 } 3707 }
3708 } else if (var->is_global()) {
3709 __ push(GlobalObjectOperand());
3710 __ push(Immediate(var->name()));
3711 __ InvokeBuiltin(Builtins::DELETE, CALL_FUNCTION);
3712 context()->Plug(eax);
3713 } else {
3714 // Non-global variable. Call the runtime to try to delete from the
3715 // context where the variable was introduced.
3716 __ push(context_register());
3717 __ push(Immediate(var->name()));
3718 __ CallRuntime(Runtime::kDeleteContextSlot, 2);
3715 context()->Plug(eax); 3719 context()->Plug(eax);
3716 } 3720 }
3717 break; 3721 break;
3718 } 3722 }
3719 3723
3720 case Token::VOID: { 3724 case Token::VOID: {
3721 Comment cmnt(masm_, "[ UnaryOperation (VOID)"); 3725 Comment cmnt(masm_, "[ UnaryOperation (VOID)");
3722 VisitForEffect(expr->expression()); 3726 VisitForEffect(expr->expression());
3723 context()->Plug(Factory::undefined_value()); 3727 context()->Plug(Factory::undefined_value());
3724 break; 3728 break;
(...skipping 650 matching lines...) Expand 10 before | Expand all | Expand 10 after
4375 // And return. 4379 // And return.
4376 __ ret(0); 4380 __ ret(0);
4377 } 4381 }
4378 4382
4379 4383
4380 #undef __ 4384 #undef __
4381 4385
4382 } } // namespace v8::internal 4386 } } // namespace v8::internal
4383 4387
4384 #endif // V8_TARGET_ARCH_IA32 4388 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/hydrogen-instructions.h ('k') | src/x64/full-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698