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

Side by Side Diff: src/mips/full-codegen-mips.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: Reinsert guard for (function != NULL), add comments. 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
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 734 matching lines...) Expand 10 before | Expand all | Expand 10 after
745 // No initial value! 745 // No initial value!
746 __ mov(a0, zero_reg); // Operand(Smi::FromInt(0))); 746 __ mov(a0, zero_reg); // Operand(Smi::FromInt(0)));
747 __ Push(cp, a2, a1, a0); 747 __ Push(cp, a2, a1, a0);
748 } 748 }
749 __ CallRuntime(Runtime::kDeclareContextSlot, 4); 749 __ CallRuntime(Runtime::kDeclareContextSlot, 4);
750 break; 750 break;
751 } 751 }
752 } 752 }
753 753
754 } else if (prop != NULL) { 754 } else if (prop != NULL) {
755 if (function != NULL || mode == Variable::CONST) { 755 // A const declaration aliasing a parameter is a illegal redeclaration.
756 // We are declaring a function or constant that rewrites to a 756 ASSERT(mode != Variable::CONST);
757 // property. Use (keyed) IC to set the initial value. We 757 // Do nothing for a regular var declaration.
758 // cannot visit the rewrite because it's shared and we risk 758 // Store the function for a function declaration.
759 // recording duplicate AST IDs for bailouts from optimized code. 759 if (function != NULL) {
760 // We are declaring a function that rewrites to a property.
761 // Use (keyed) IC to set the initial value. We cannot visit the
762 // rewrite because it's shared and we risk recording duplicate AST
763 // IDs for bailouts from optimized code.
760 ASSERT(prop->obj()->AsVariableProxy() != NULL); 764 ASSERT(prop->obj()->AsVariableProxy() != NULL);
761 { AccumulatorValueContext for_object(this); 765 { AccumulatorValueContext for_object(this);
762 EmitVariableLoad(prop->obj()->AsVariableProxy()->var()); 766 EmitVariableLoad(prop->obj()->AsVariableProxy()->var());
763 } 767 }
764 if (function != NULL) { 768
765 __ push(result_register()); 769 __ push(result_register());
766 VisitForAccumulatorValue(function); 770 VisitForAccumulatorValue(function);
767 __ mov(a0, result_register()); 771 __ mov(a0, result_register());
768 __ pop(a2); 772 __ pop(a2);
769 } else { 773
770 __ mov(a2, result_register());
771 __ LoadRoot(a0, Heap::kTheHoleValueRootIndex);
772 }
773 ASSERT(prop->key()->AsLiteral() != NULL && 774 ASSERT(prop->key()->AsLiteral() != NULL &&
774 prop->key()->AsLiteral()->handle()->IsSmi()); 775 prop->key()->AsLiteral()->handle()->IsSmi());
775 __ li(a1, Operand(prop->key()->AsLiteral()->handle())); 776 __ li(a1, Operand(prop->key()->AsLiteral()->handle()));
776 777
777 Handle<Code> ic = is_strict_mode() 778 Handle<Code> ic = is_strict_mode()
778 ? isolate()->builtins()->KeyedStoreIC_Initialize_Strict() 779 ? isolate()->builtins()->KeyedStoreIC_Initialize_Strict()
779 : isolate()->builtins()->KeyedStoreIC_Initialize(); 780 : isolate()->builtins()->KeyedStoreIC_Initialize();
780 EmitCallIC(ic, RelocInfo::CODE_TARGET, AstNode::kNoNumber); 781 EmitCallIC(ic, RelocInfo::CODE_TARGET, AstNode::kNoNumber);
781 // Value in v0 is ignored (declarations are statements). 782 // Value in v0 is ignored (declarations are statements).
782 } 783 }
(...skipping 3581 matching lines...) Expand 10 before | Expand all | Expand 10 after
4364 __ Addu(at, a1, Operand(masm_->CodeObject())); 4365 __ Addu(at, a1, Operand(masm_->CodeObject()));
4365 __ Jump(at); 4366 __ Jump(at);
4366 } 4367 }
4367 4368
4368 4369
4369 #undef __ 4370 #undef __
4370 4371
4371 } } // namespace v8::internal 4372 } } // namespace v8::internal
4372 4373
4373 #endif // V8_TARGET_ARCH_MIPS 4374 #endif // V8_TARGET_ARCH_MIPS
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698