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

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

Issue 1413453003: Merged: Squashed multiple commits. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@4.7
Patch Set: Created 5 years, 2 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 835 matching lines...) Expand 10 before | Expand all | Expand 10 after
846 // Note: For variables we must not push an initial value (such as 846 // Note: For variables we must not push an initial value (such as
847 // 'undefined') because we may have a (legal) redeclaration and we 847 // 'undefined') because we may have a (legal) redeclaration and we
848 // must not destroy the current value. 848 // must not destroy the current value.
849 if (hole_init) { 849 if (hole_init) {
850 __ LoadRoot(a0, Heap::kTheHoleValueRootIndex); 850 __ LoadRoot(a0, Heap::kTheHoleValueRootIndex);
851 } else { 851 } else {
852 DCHECK(Smi::FromInt(0) == 0); 852 DCHECK(Smi::FromInt(0) == 0);
853 __ mov(a0, zero_reg); // Smi::FromInt(0) indicates no initial value. 853 __ mov(a0, zero_reg); // Smi::FromInt(0) indicates no initial value.
854 } 854 }
855 __ Push(a2, a0); 855 __ Push(a2, a0);
856 __ CallRuntime(IsImmutableVariableMode(mode) 856 __ Push(Smi::FromInt(variable->DeclarationPropertyAttributes()));
857 ? Runtime::kDeclareReadOnlyLookupSlot 857 __ CallRuntime(Runtime::kDeclareLookupSlot, 3);
858 : Runtime::kDeclareLookupSlot,
859 2);
860 break; 858 break;
861 } 859 }
862 } 860 }
863 } 861 }
864 862
865 863
866 void FullCodeGenerator::VisitFunctionDeclaration( 864 void FullCodeGenerator::VisitFunctionDeclaration(
867 FunctionDeclaration* declaration) { 865 FunctionDeclaration* declaration) {
868 VariableProxy* proxy = declaration->proxy(); 866 VariableProxy* proxy = declaration->proxy();
869 Variable* variable = proxy->var(); 867 Variable* variable = proxy->var();
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
905 PrepareForBailoutForId(proxy->id(), NO_REGISTERS); 903 PrepareForBailoutForId(proxy->id(), NO_REGISTERS);
906 break; 904 break;
907 } 905 }
908 906
909 case VariableLocation::LOOKUP: { 907 case VariableLocation::LOOKUP: {
910 Comment cmnt(masm_, "[ FunctionDeclaration"); 908 Comment cmnt(masm_, "[ FunctionDeclaration");
911 __ li(a2, Operand(variable->name())); 909 __ li(a2, Operand(variable->name()));
912 __ Push(a2); 910 __ Push(a2);
913 // Push initial value for function declaration. 911 // Push initial value for function declaration.
914 VisitForStackValue(declaration->fun()); 912 VisitForStackValue(declaration->fun());
915 __ CallRuntime(Runtime::kDeclareLookupSlot, 2); 913 __ Push(Smi::FromInt(variable->DeclarationPropertyAttributes()));
914 __ CallRuntime(Runtime::kDeclareLookupSlot, 3);
916 break; 915 break;
917 } 916 }
918 } 917 }
919 } 918 }
920 919
921 920
922 void FullCodeGenerator::DeclareGlobals(Handle<FixedArray> pairs) { 921 void FullCodeGenerator::DeclareGlobals(Handle<FixedArray> pairs) {
923 // Call the runtime to declare the globals. 922 // Call the runtime to declare the globals.
924 __ li(a1, Operand(pairs)); 923 __ li(a1, Operand(pairs));
925 __ li(a0, Operand(Smi::FromInt(DeclareGlobalsFlags()))); 924 __ li(a0, Operand(Smi::FromInt(DeclareGlobalsFlags())));
(...skipping 4319 matching lines...) Expand 10 before | Expand all | Expand 10 after
5245 reinterpret_cast<uint64_t>( 5244 reinterpret_cast<uint64_t>(
5246 isolate->builtins()->OsrAfterStackCheck()->entry())); 5245 isolate->builtins()->OsrAfterStackCheck()->entry()));
5247 return OSR_AFTER_STACK_CHECK; 5246 return OSR_AFTER_STACK_CHECK;
5248 } 5247 }
5249 5248
5250 5249
5251 } // namespace internal 5250 } // namespace internal
5252 } // namespace v8 5251 } // namespace v8
5253 5252
5254 #endif // V8_TARGET_ARCH_MIPS64 5253 #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