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

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

Issue 2061173002: [cleanup] Remove dead code from DeclareLookupSlot and rename it (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Handled review comments Created 4 years, 6 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
« no previous file with comments | « src/full-codegen/mips/full-codegen-mips.cc ('k') | src/full-codegen/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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #if V8_TARGET_ARCH_MIPS64 5 #if V8_TARGET_ARCH_MIPS64
6 6
7 // Note on Mips implementation: 7 // Note on Mips implementation:
8 // 8 //
9 // The result_register() for mips is the 'v0' register, which is defined 9 // The result_register() for mips is the 'v0' register, which is defined
10 // by the ABI to contain function return values. However, the first 10 // by the ABI to contain function return values. However, the first
(...skipping 778 matching lines...) Expand 10 before | Expand all | Expand 10 after
789 EmitDebugCheckDeclarationContext(variable); 789 EmitDebugCheckDeclarationContext(variable);
790 __ LoadRoot(at, Heap::kTheHoleValueRootIndex); 790 __ LoadRoot(at, Heap::kTheHoleValueRootIndex);
791 __ sd(at, ContextMemOperand(cp, variable->index())); 791 __ sd(at, ContextMemOperand(cp, variable->index()));
792 // No write barrier since the_hole_value is in old space. 792 // No write barrier since the_hole_value is in old space.
793 PrepareForBailoutForId(proxy->id(), BailoutState::NO_REGISTERS); 793 PrepareForBailoutForId(proxy->id(), BailoutState::NO_REGISTERS);
794 } 794 }
795 break; 795 break;
796 796
797 case VariableLocation::LOOKUP: { 797 case VariableLocation::LOOKUP: {
798 Comment cmnt(masm_, "[ VariableDeclaration"); 798 Comment cmnt(masm_, "[ VariableDeclaration");
799 DCHECK_EQ(VAR, mode);
800 DCHECK(!hole_init);
799 __ li(a2, Operand(variable->name())); 801 __ li(a2, Operand(variable->name()));
800 // Declaration nodes are always introduced in one of four modes. 802 __ Push(a2);
801 DCHECK(IsDeclaredVariableMode(mode)); 803 __ CallRuntime(Runtime::kDeclareEvalVar);
802 DCHECK(!hole_init);
803 DCHECK(Smi::FromInt(0) == 0);
804 __ mov(a0, zero_reg); // Smi::FromInt(0) indicates no initial value.
805 __ Push(a2, a0);
806 __ Push(Smi::FromInt(variable->DeclarationPropertyAttributes()));
807 __ CallRuntime(Runtime::kDeclareLookupSlot);
808 PrepareForBailoutForId(proxy->id(), BailoutState::NO_REGISTERS); 804 PrepareForBailoutForId(proxy->id(), BailoutState::NO_REGISTERS);
809 break; 805 break;
810 } 806 }
811 } 807 }
812 } 808 }
813 809
814 810
815 void FullCodeGenerator::VisitFunctionDeclaration( 811 void FullCodeGenerator::VisitFunctionDeclaration(
816 FunctionDeclaration* declaration) { 812 FunctionDeclaration* declaration) {
817 VariableProxy* proxy = declaration->proxy(); 813 VariableProxy* proxy = declaration->proxy();
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
854 PrepareForBailoutForId(proxy->id(), BailoutState::NO_REGISTERS); 850 PrepareForBailoutForId(proxy->id(), BailoutState::NO_REGISTERS);
855 break; 851 break;
856 } 852 }
857 853
858 case VariableLocation::LOOKUP: { 854 case VariableLocation::LOOKUP: {
859 Comment cmnt(masm_, "[ FunctionDeclaration"); 855 Comment cmnt(masm_, "[ FunctionDeclaration");
860 __ li(a2, Operand(variable->name())); 856 __ li(a2, Operand(variable->name()));
861 PushOperand(a2); 857 PushOperand(a2);
862 // Push initial value for function declaration. 858 // Push initial value for function declaration.
863 VisitForStackValue(declaration->fun()); 859 VisitForStackValue(declaration->fun());
864 PushOperand(Smi::FromInt(variable->DeclarationPropertyAttributes())); 860 CallRuntimeWithOperands(Runtime::kDeclareEvalFunction);
865 CallRuntimeWithOperands(Runtime::kDeclareLookupSlot);
866 PrepareForBailoutForId(proxy->id(), BailoutState::NO_REGISTERS); 861 PrepareForBailoutForId(proxy->id(), BailoutState::NO_REGISTERS);
867 break; 862 break;
868 } 863 }
869 } 864 }
870 } 865 }
871 866
872 867
873 void FullCodeGenerator::DeclareGlobals(Handle<FixedArray> pairs) { 868 void FullCodeGenerator::DeclareGlobals(Handle<FixedArray> pairs) {
874 // Call the runtime to declare the globals. 869 // Call the runtime to declare the globals.
875 __ li(a1, Operand(pairs)); 870 __ li(a1, Operand(pairs));
(...skipping 2951 matching lines...) Expand 10 before | Expand all | Expand 10 after
3827 reinterpret_cast<uint64_t>( 3822 reinterpret_cast<uint64_t>(
3828 isolate->builtins()->OnStackReplacement()->entry())); 3823 isolate->builtins()->OnStackReplacement()->entry()));
3829 return ON_STACK_REPLACEMENT; 3824 return ON_STACK_REPLACEMENT;
3830 } 3825 }
3831 3826
3832 3827
3833 } // namespace internal 3828 } // namespace internal
3834 } // namespace v8 3829 } // namespace v8
3835 3830
3836 #endif // V8_TARGET_ARCH_MIPS64 3831 #endif // V8_TARGET_ARCH_MIPS64
OLDNEW
« no previous file with comments | « src/full-codegen/mips/full-codegen-mips.cc ('k') | src/full-codegen/x64/full-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698