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

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

Issue 1962723002: [turbofan] Implement top-level lookup slot declaration. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Skip timeouts. Created 4 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
« no previous file with comments | « src/full-codegen/mips/full-codegen-mips.cc ('k') | src/full-codegen/ppc/full-codegen-ppc.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 791 matching lines...) Expand 10 before | Expand all | Expand 10 after
802 // must not destroy the current value. 802 // must not destroy the current value.
803 if (hole_init) { 803 if (hole_init) {
804 __ LoadRoot(a0, Heap::kTheHoleValueRootIndex); 804 __ LoadRoot(a0, Heap::kTheHoleValueRootIndex);
805 } else { 805 } else {
806 DCHECK(Smi::FromInt(0) == 0); 806 DCHECK(Smi::FromInt(0) == 0);
807 __ mov(a0, zero_reg); // Smi::FromInt(0) indicates no initial value. 807 __ mov(a0, zero_reg); // Smi::FromInt(0) indicates no initial value.
808 } 808 }
809 __ Push(a2, a0); 809 __ Push(a2, a0);
810 __ Push(Smi::FromInt(variable->DeclarationPropertyAttributes())); 810 __ Push(Smi::FromInt(variable->DeclarationPropertyAttributes()));
811 __ CallRuntime(Runtime::kDeclareLookupSlot); 811 __ CallRuntime(Runtime::kDeclareLookupSlot);
812 PrepareForBailoutForId(proxy->id(), NO_REGISTERS);
812 break; 813 break;
813 } 814 }
814 } 815 }
815 } 816 }
816 817
817 818
818 void FullCodeGenerator::VisitFunctionDeclaration( 819 void FullCodeGenerator::VisitFunctionDeclaration(
819 FunctionDeclaration* declaration) { 820 FunctionDeclaration* declaration) {
820 VariableProxy* proxy = declaration->proxy(); 821 VariableProxy* proxy = declaration->proxy();
821 Variable* variable = proxy->var(); 822 Variable* variable = proxy->var();
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
859 } 860 }
860 861
861 case VariableLocation::LOOKUP: { 862 case VariableLocation::LOOKUP: {
862 Comment cmnt(masm_, "[ FunctionDeclaration"); 863 Comment cmnt(masm_, "[ FunctionDeclaration");
863 __ li(a2, Operand(variable->name())); 864 __ li(a2, Operand(variable->name()));
864 PushOperand(a2); 865 PushOperand(a2);
865 // Push initial value for function declaration. 866 // Push initial value for function declaration.
866 VisitForStackValue(declaration->fun()); 867 VisitForStackValue(declaration->fun());
867 PushOperand(Smi::FromInt(variable->DeclarationPropertyAttributes())); 868 PushOperand(Smi::FromInt(variable->DeclarationPropertyAttributes()));
868 CallRuntimeWithOperands(Runtime::kDeclareLookupSlot); 869 CallRuntimeWithOperands(Runtime::kDeclareLookupSlot);
870 PrepareForBailoutForId(proxy->id(), NO_REGISTERS);
869 break; 871 break;
870 } 872 }
871 } 873 }
872 } 874 }
873 875
874 876
875 void FullCodeGenerator::DeclareGlobals(Handle<FixedArray> pairs) { 877 void FullCodeGenerator::DeclareGlobals(Handle<FixedArray> pairs) {
876 // Call the runtime to declare the globals. 878 // Call the runtime to declare the globals.
877 __ li(a1, Operand(pairs)); 879 __ li(a1, Operand(pairs));
878 __ li(a0, Operand(Smi::FromInt(DeclareGlobalsFlags()))); 880 __ li(a0, Operand(Smi::FromInt(DeclareGlobalsFlags())));
(...skipping 3073 matching lines...) Expand 10 before | Expand all | Expand 10 after
3952 reinterpret_cast<uint64_t>( 3954 reinterpret_cast<uint64_t>(
3953 isolate->builtins()->OnStackReplacement()->entry())); 3955 isolate->builtins()->OnStackReplacement()->entry()));
3954 return ON_STACK_REPLACEMENT; 3956 return ON_STACK_REPLACEMENT;
3955 } 3957 }
3956 3958
3957 3959
3958 } // namespace internal 3960 } // namespace internal
3959 } // namespace v8 3961 } // namespace v8
3960 3962
3961 #endif // V8_TARGET_ARCH_MIPS64 3963 #endif // V8_TARGET_ARCH_MIPS64
OLDNEW
« no previous file with comments | « src/full-codegen/mips/full-codegen-mips.cc ('k') | src/full-codegen/ppc/full-codegen-ppc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698