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

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

Issue 6966033: Remove some dead code from full-codegen on all platforms. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 7 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
« src/arm/full-codegen-arm.cc ('K') | « src/mips/full-codegen-mips.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 696 matching lines...) Expand 10 before | Expand all | Expand 10 after
707 VisitForStackValue(function); 707 VisitForStackValue(function);
708 } else { 708 } else {
709 __ Push(Smi::FromInt(0)); // no initial value! 709 __ Push(Smi::FromInt(0)); // no initial value!
710 } 710 }
711 __ CallRuntime(Runtime::kDeclareContextSlot, 4); 711 __ CallRuntime(Runtime::kDeclareContextSlot, 4);
712 break; 712 break;
713 } 713 }
714 } 714 }
715 715
716 } else if (prop != NULL) { 716 } else if (prop != NULL) {
717 if (function != NULL || mode == Variable::CONST) { 717 ASSERT(mode != Variable::CONST);
718 // We are declaring a function or constant that rewrites to a 718 ASSERT(function != NULL);
719 // property. Use (keyed) IC to set the initial value. We 719 // We are declaring a function that rewrites to a property.
720 // cannot visit the rewrite because it's shared and we risk 720 // Use (keyed) IC to set the initial value. We cannot visit the
721 // recording duplicate AST IDs for bailouts from optimized code. 721 // rewrite because it's shared and we risk recording duplicate AST
722 ASSERT(prop->obj()->AsVariableProxy() != NULL); 722 // IDs for bailouts from optimized code.
723 { AccumulatorValueContext for_object(this); 723 ASSERT(prop->obj()->AsVariableProxy() != NULL);
724 EmitVariableLoad(prop->obj()->AsVariableProxy()->var()); 724 { AccumulatorValueContext for_object(this);
725 } 725 EmitVariableLoad(prop->obj()->AsVariableProxy()->var());
726 if (function != NULL) { 726 }
727 __ push(rax); 727 __ push(rax);
728 VisitForAccumulatorValue(function); 728 VisitForAccumulatorValue(function);
729 __ pop(rdx); 729 __ pop(rdx);
730 } else { 730 ASSERT(prop->key()->AsLiteral() != NULL &&
731 __ movq(rdx, rax); 731 prop->key()->AsLiteral()->handle()->IsSmi());
732 __ LoadRoot(rax, Heap::kTheHoleValueRootIndex); 732 __ Move(rcx, prop->key()->AsLiteral()->handle());
733 }
734 ASSERT(prop->key()->AsLiteral() != NULL &&
735 prop->key()->AsLiteral()->handle()->IsSmi());
736 __ Move(rcx, prop->key()->AsLiteral()->handle());
737 733
738 Handle<Code> ic = is_strict_mode() 734 Handle<Code> ic = is_strict_mode()
739 ? isolate()->builtins()->KeyedStoreIC_Initialize_Strict() 735 ? isolate()->builtins()->KeyedStoreIC_Initialize_Strict()
740 : isolate()->builtins()->KeyedStoreIC_Initialize(); 736 : isolate()->builtins()->KeyedStoreIC_Initialize();
741 EmitCallIC(ic, RelocInfo::CODE_TARGET, GetPropertyId(prop)); 737 EmitCallIC(ic, RelocInfo::CODE_TARGET, AstNode::kNoNumber);
742 }
743 } 738 }
744 } 739 }
745 740
746 741
747 void FullCodeGenerator::VisitDeclaration(Declaration* decl) { 742 void FullCodeGenerator::VisitDeclaration(Declaration* decl) {
748 EmitDeclaration(decl->proxy()->var(), decl->mode(), decl->fun()); 743 EmitDeclaration(decl->proxy()->var(), decl->mode(), decl->fun());
749 } 744 }
750 745
751 746
752 void FullCodeGenerator::DeclareGlobals(Handle<FixedArray> pairs) { 747 void FullCodeGenerator::DeclareGlobals(Handle<FixedArray> pairs) {
(...skipping 3538 matching lines...) Expand 10 before | Expand all | Expand 10 after
4291 __ ret(0); 4286 __ ret(0);
4292 } 4287 }
4293 4288
4294 4289
4295 #undef __ 4290 #undef __
4296 4291
4297 4292
4298 } } // namespace v8::internal 4293 } } // namespace v8::internal
4299 4294
4300 #endif // V8_TARGET_ARCH_X64 4295 #endif // V8_TARGET_ARCH_X64
OLDNEW
« src/arm/full-codegen-arm.cc ('K') | « src/mips/full-codegen-mips.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698