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

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

Issue 1410023004: 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/contexts.cc ('k') | src/full-codegen/arm64/full-codegen-arm64.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_ARM 5 #if V8_TARGET_ARCH_ARM
6 6
7 #include "src/code-factory.h" 7 #include "src/code-factory.h"
8 #include "src/code-stubs.h" 8 #include "src/code-stubs.h"
9 #include "src/codegen.h" 9 #include "src/codegen.h"
10 #include "src/compiler.h" 10 #include "src/compiler.h"
(...skipping 832 matching lines...) Expand 10 before | Expand all | Expand 10 after
843 // Push initial value, if any. 843 // Push initial value, if any.
844 // Note: For variables we must not push an initial value (such as 844 // Note: For variables we must not push an initial value (such as
845 // 'undefined') because we may have a (legal) redeclaration and we 845 // 'undefined') because we may have a (legal) redeclaration and we
846 // must not destroy the current value. 846 // must not destroy the current value.
847 if (hole_init) { 847 if (hole_init) {
848 __ LoadRoot(r0, Heap::kTheHoleValueRootIndex); 848 __ LoadRoot(r0, Heap::kTheHoleValueRootIndex);
849 } else { 849 } else {
850 __ mov(r0, Operand(Smi::FromInt(0))); // Indicates no initial value. 850 __ mov(r0, Operand(Smi::FromInt(0))); // Indicates no initial value.
851 } 851 }
852 __ Push(r2, r0); 852 __ Push(r2, r0);
853 __ CallRuntime(IsImmutableVariableMode(mode) 853 __ Push(Smi::FromInt(variable->DeclarationPropertyAttributes()));
854 ? Runtime::kDeclareReadOnlyLookupSlot 854 __ CallRuntime(Runtime::kDeclareLookupSlot, 3);
855 : Runtime::kDeclareLookupSlot,
856 2);
857 break; 855 break;
858 } 856 }
859 } 857 }
860 } 858 }
861 859
862 860
863 void FullCodeGenerator::VisitFunctionDeclaration( 861 void FullCodeGenerator::VisitFunctionDeclaration(
864 FunctionDeclaration* declaration) { 862 FunctionDeclaration* declaration) {
865 VariableProxy* proxy = declaration->proxy(); 863 VariableProxy* proxy = declaration->proxy();
866 Variable* variable = proxy->var(); 864 Variable* variable = proxy->var();
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
902 PrepareForBailoutForId(proxy->id(), NO_REGISTERS); 900 PrepareForBailoutForId(proxy->id(), NO_REGISTERS);
903 break; 901 break;
904 } 902 }
905 903
906 case VariableLocation::LOOKUP: { 904 case VariableLocation::LOOKUP: {
907 Comment cmnt(masm_, "[ FunctionDeclaration"); 905 Comment cmnt(masm_, "[ FunctionDeclaration");
908 __ mov(r2, Operand(variable->name())); 906 __ mov(r2, Operand(variable->name()));
909 __ Push(r2); 907 __ Push(r2);
910 // Push initial value for function declaration. 908 // Push initial value for function declaration.
911 VisitForStackValue(declaration->fun()); 909 VisitForStackValue(declaration->fun());
912 __ CallRuntime(Runtime::kDeclareLookupSlot, 2); 910 __ Push(Smi::FromInt(variable->DeclarationPropertyAttributes()));
911 __ CallRuntime(Runtime::kDeclareLookupSlot, 3);
913 break; 912 break;
914 } 913 }
915 } 914 }
916 } 915 }
917 916
918 917
919 void FullCodeGenerator::DeclareGlobals(Handle<FixedArray> pairs) { 918 void FullCodeGenerator::DeclareGlobals(Handle<FixedArray> pairs) {
920 // Call the runtime to declare the globals. 919 // Call the runtime to declare the globals.
921 __ mov(r1, Operand(pairs)); 920 __ mov(r1, Operand(pairs));
922 __ mov(r0, Operand(Smi::FromInt(DeclareGlobalsFlags()))); 921 __ mov(r0, Operand(Smi::FromInt(DeclareGlobalsFlags())));
(...skipping 4346 matching lines...) Expand 10 before | Expand all | Expand 10 after
5269 DCHECK(interrupt_address == 5268 DCHECK(interrupt_address ==
5270 isolate->builtins()->OsrAfterStackCheck()->entry()); 5269 isolate->builtins()->OsrAfterStackCheck()->entry());
5271 return OSR_AFTER_STACK_CHECK; 5270 return OSR_AFTER_STACK_CHECK;
5272 } 5271 }
5273 5272
5274 5273
5275 } // namespace internal 5274 } // namespace internal
5276 } // namespace v8 5275 } // namespace v8
5277 5276
5278 #endif // V8_TARGET_ARCH_ARM 5277 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/contexts.cc ('k') | src/full-codegen/arm64/full-codegen-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698