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

Side by Side Diff: src/x64/full-codegen-x64.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/ia32/full-codegen-ia32.cc ('k') | no next file » | 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 2987 matching lines...) Expand 10 before | Expand all | Expand 10 after
2998 // The subexpression may have side effects. 2998 // The subexpression may have side effects.
2999 VisitForEffect(expr->expression()); 2999 VisitForEffect(expr->expression());
3000 context()->Plug(true); 3000 context()->Plug(true);
3001 } else if (var != NULL && 3001 } else if (var != NULL &&
3002 !var->is_global() && 3002 !var->is_global() &&
3003 var->AsSlot() != NULL && 3003 var->AsSlot() != NULL &&
3004 var->AsSlot()->type() != Slot::LOOKUP) { 3004 var->AsSlot()->type() != Slot::LOOKUP) {
3005 // Result of deleting non-global, non-dynamic variables is false. 3005 // Result of deleting non-global, non-dynamic variables is false.
3006 // The subexpression does not have side effects. 3006 // The subexpression does not have side effects.
3007 context()->Plug(false); 3007 context()->Plug(false);
3008 } else { 3008 } else if (prop != NULL) {
3009 // Property or variable reference. Call the delete builtin with 3009 if (prop->is_synthetic()) {
3010 // object and property name as arguments. 3010 // Result of deleting parameters is false, even when they rewrite
3011 if (prop != NULL) { 3011 // to accesses on the arguments object.
3012 context()->Plug(false);
3013 } else {
3012 VisitForStackValue(prop->obj()); 3014 VisitForStackValue(prop->obj());
3013 VisitForStackValue(prop->key()); 3015 VisitForStackValue(prop->key());
3014 __ InvokeBuiltin(Builtins::DELETE, CALL_FUNCTION); 3016 __ InvokeBuiltin(Builtins::DELETE, CALL_FUNCTION);
3015 } else if (var->is_global()) { 3017 context()->Plug(rax);
3016 __ push(GlobalObjectOperand());
3017 __ Push(var->name());
3018 __ InvokeBuiltin(Builtins::DELETE, CALL_FUNCTION);
3019 } else {
3020 // Non-global variable. Call the runtime to delete from the
3021 // context where the variable was introduced.
3022 __ push(context_register());
3023 __ Push(var->name());
3024 __ CallRuntime(Runtime::kDeleteContextSlot, 2);
3025 } 3018 }
3019 } else if (var->is_global()) {
3020 __ push(GlobalObjectOperand());
3021 __ Push(var->name());
3022 __ InvokeBuiltin(Builtins::DELETE, CALL_FUNCTION);
3023 context()->Plug(rax);
3024 } else {
3025 // Non-global variable. Call the runtime to try to delete from the
3026 // context where the variable was introduced.
3027 __ push(context_register());
3028 __ Push(var->name());
3029 __ CallRuntime(Runtime::kDeleteContextSlot, 2);
3026 context()->Plug(rax); 3030 context()->Plug(rax);
3027 } 3031 }
3028 break; 3032 break;
3029 } 3033 }
3030 3034
3031 case Token::VOID: { 3035 case Token::VOID: {
3032 Comment cmnt(masm_, "[ UnaryOperation (VOID)"); 3036 Comment cmnt(masm_, "[ UnaryOperation (VOID)");
3033 VisitForEffect(expr->expression()); 3037 VisitForEffect(expr->expression());
3034 context()->Plug(Heap::kUndefinedValueRootIndex); 3038 context()->Plug(Heap::kUndefinedValueRootIndex);
3035 break; 3039 break;
(...skipping 611 matching lines...) Expand 10 before | Expand all | Expand 10 after
3647 __ ret(0); 3651 __ ret(0);
3648 } 3652 }
3649 3653
3650 3654
3651 #undef __ 3655 #undef __
3652 3656
3653 3657
3654 } } // namespace v8::internal 3658 } } // namespace v8::internal
3655 3659
3656 #endif // V8_TARGET_ARCH_X64 3660 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/ia32/full-codegen-ia32.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698