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

Side by Side Diff: src/full-codegen/mips/full-codegen-mips.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: Extend context DCHECK 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
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_MIPS 5 #if V8_TARGET_ARCH_MIPS
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 786 matching lines...) Expand 10 before | Expand all | Expand 10 after
797 797
798 case VariableLocation::LOOKUP: { 798 case VariableLocation::LOOKUP: {
799 Comment cmnt(masm_, "[ VariableDeclaration"); 799 Comment cmnt(masm_, "[ VariableDeclaration");
800 __ li(a2, Operand(variable->name())); 800 __ li(a2, Operand(variable->name()));
801 // Declaration nodes are always introduced in one of four modes. 801 // Declaration nodes are always introduced in one of four modes.
802 DCHECK(IsDeclaredVariableMode(mode)); 802 DCHECK(IsDeclaredVariableMode(mode));
803 DCHECK(!hole_init); 803 DCHECK(!hole_init);
804 DCHECK(Smi::FromInt(0) == 0); 804 DCHECK(Smi::FromInt(0) == 0);
805 __ mov(a0, zero_reg); // Smi::FromInt(0) indicates no initial value. 805 __ mov(a0, zero_reg); // Smi::FromInt(0) indicates no initial value.
806 __ Push(a2, a0); 806 __ Push(a2, a0);
807 __ Push(Smi::FromInt(variable->DeclarationPropertyAttributes()));
808 __ CallRuntime(Runtime::kDeclareLookupSlot); 807 __ CallRuntime(Runtime::kDeclareLookupSlot);
809 PrepareForBailoutForId(proxy->id(), BailoutState::NO_REGISTERS); 808 PrepareForBailoutForId(proxy->id(), BailoutState::NO_REGISTERS);
810 break; 809 break;
811 } 810 }
812 } 811 }
813 } 812 }
814 813
815 814
816 void FullCodeGenerator::VisitFunctionDeclaration( 815 void FullCodeGenerator::VisitFunctionDeclaration(
817 FunctionDeclaration* declaration) { 816 FunctionDeclaration* declaration) {
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
855 PrepareForBailoutForId(proxy->id(), BailoutState::NO_REGISTERS); 854 PrepareForBailoutForId(proxy->id(), BailoutState::NO_REGISTERS);
856 break; 855 break;
857 } 856 }
858 857
859 case VariableLocation::LOOKUP: { 858 case VariableLocation::LOOKUP: {
860 Comment cmnt(masm_, "[ FunctionDeclaration"); 859 Comment cmnt(masm_, "[ FunctionDeclaration");
861 __ li(a2, Operand(variable->name())); 860 __ li(a2, Operand(variable->name()));
862 PushOperand(a2); 861 PushOperand(a2);
863 // Push initial value for function declaration. 862 // Push initial value for function declaration.
864 VisitForStackValue(declaration->fun()); 863 VisitForStackValue(declaration->fun());
865 PushOperand(Smi::FromInt(variable->DeclarationPropertyAttributes()));
866 CallRuntimeWithOperands(Runtime::kDeclareLookupSlot); 864 CallRuntimeWithOperands(Runtime::kDeclareLookupSlot);
867 PrepareForBailoutForId(proxy->id(), BailoutState::NO_REGISTERS); 865 PrepareForBailoutForId(proxy->id(), BailoutState::NO_REGISTERS);
868 break; 866 break;
869 } 867 }
870 } 868 }
871 } 869 }
872 870
873 871
874 void FullCodeGenerator::DeclareGlobals(Handle<FixedArray> pairs) { 872 void FullCodeGenerator::DeclareGlobals(Handle<FixedArray> pairs) {
875 // Call the runtime to declare the globals. 873 // Call the runtime to declare the globals.
(...skipping 2944 matching lines...) Expand 10 before | Expand all | Expand 10 after
3820 reinterpret_cast<uint32_t>( 3818 reinterpret_cast<uint32_t>(
3821 isolate->builtins()->OnStackReplacement()->entry())); 3819 isolate->builtins()->OnStackReplacement()->entry()));
3822 return ON_STACK_REPLACEMENT; 3820 return ON_STACK_REPLACEMENT;
3823 } 3821 }
3824 3822
3825 3823
3826 } // namespace internal 3824 } // namespace internal
3827 } // namespace v8 3825 } // namespace v8
3828 3826
3829 #endif // V8_TARGET_ARCH_MIPS 3827 #endif // V8_TARGET_ARCH_MIPS
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698