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

Side by Side Diff: src/full-codegen/x64/full-codegen-x64.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/full-codegen/ppc/full-codegen-ppc.cc ('k') | src/full-codegen/x87/full-codegen-x87.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_X64 5 #if V8_TARGET_ARCH_X64
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 796 matching lines...) Expand 10 before | Expand all | Expand 10 after
807 DCHECK(IsDeclaredVariableMode(mode)); 807 DCHECK(IsDeclaredVariableMode(mode));
808 // Push initial value, if any. 808 // Push initial value, if any.
809 // Note: For variables we must not push an initial value (such as 809 // Note: For variables we must not push an initial value (such as
810 // 'undefined') because we may have a (legal) redeclaration and we 810 // 'undefined') because we may have a (legal) redeclaration and we
811 // must not destroy the current value. 811 // must not destroy the current value.
812 if (hole_init) { 812 if (hole_init) {
813 __ PushRoot(Heap::kTheHoleValueRootIndex); 813 __ PushRoot(Heap::kTheHoleValueRootIndex);
814 } else { 814 } else {
815 __ Push(Smi::FromInt(0)); // Indicates no initial value. 815 __ Push(Smi::FromInt(0)); // Indicates no initial value.
816 } 816 }
817 __ CallRuntime(IsImmutableVariableMode(mode) 817 __ Push(Smi::FromInt(variable->DeclarationPropertyAttributes()));
818 ? Runtime::kDeclareReadOnlyLookupSlot 818 __ CallRuntime(Runtime::kDeclareLookupSlot, 3);
819 : Runtime::kDeclareLookupSlot,
820 2);
821 break; 819 break;
822 } 820 }
823 } 821 }
824 } 822 }
825 823
826 824
827 void FullCodeGenerator::VisitFunctionDeclaration( 825 void FullCodeGenerator::VisitFunctionDeclaration(
828 FunctionDeclaration* declaration) { 826 FunctionDeclaration* declaration) {
829 VariableProxy* proxy = declaration->proxy(); 827 VariableProxy* proxy = declaration->proxy();
830 Variable* variable = proxy->var(); 828 Variable* variable = proxy->var();
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
863 EMIT_REMEMBERED_SET, 861 EMIT_REMEMBERED_SET,
864 OMIT_SMI_CHECK); 862 OMIT_SMI_CHECK);
865 PrepareForBailoutForId(proxy->id(), NO_REGISTERS); 863 PrepareForBailoutForId(proxy->id(), NO_REGISTERS);
866 break; 864 break;
867 } 865 }
868 866
869 case VariableLocation::LOOKUP: { 867 case VariableLocation::LOOKUP: {
870 Comment cmnt(masm_, "[ FunctionDeclaration"); 868 Comment cmnt(masm_, "[ FunctionDeclaration");
871 __ Push(variable->name()); 869 __ Push(variable->name());
872 VisitForStackValue(declaration->fun()); 870 VisitForStackValue(declaration->fun());
873 __ CallRuntime(Runtime::kDeclareLookupSlot, 2); 871 __ Push(Smi::FromInt(variable->DeclarationPropertyAttributes()));
872 __ CallRuntime(Runtime::kDeclareLookupSlot, 3);
874 break; 873 break;
875 } 874 }
876 } 875 }
877 } 876 }
878 877
879 878
880 void FullCodeGenerator::DeclareGlobals(Handle<FixedArray> pairs) { 879 void FullCodeGenerator::DeclareGlobals(Handle<FixedArray> pairs) {
881 // Call the runtime to declare the globals. 880 // Call the runtime to declare the globals.
882 __ Push(pairs); 881 __ Push(pairs);
883 __ Push(Smi::FromInt(DeclareGlobalsFlags())); 882 __ Push(Smi::FromInt(DeclareGlobalsFlags()));
(...skipping 4274 matching lines...) Expand 10 before | Expand all | Expand 10 after
5158 Assembler::target_address_at(call_target_address, 5157 Assembler::target_address_at(call_target_address,
5159 unoptimized_code)); 5158 unoptimized_code));
5160 return OSR_AFTER_STACK_CHECK; 5159 return OSR_AFTER_STACK_CHECK;
5161 } 5160 }
5162 5161
5163 5162
5164 } // namespace internal 5163 } // namespace internal
5165 } // namespace v8 5164 } // namespace v8
5166 5165
5167 #endif // V8_TARGET_ARCH_X64 5166 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/full-codegen/ppc/full-codegen-ppc.cc ('k') | src/full-codegen/x87/full-codegen-x87.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698