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

Side by Side Diff: src/full-codegen/x64/full-codegen-x64.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/s390/full-codegen-s390.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/ast/scopes.h" 7 #include "src/ast/scopes.h"
8 #include "src/code-factory.h" 8 #include "src/code-factory.h"
9 #include "src/code-stubs.h" 9 #include "src/code-stubs.h"
10 #include "src/codegen.h" 10 #include "src/codegen.h"
(...skipping 752 matching lines...) Expand 10 before | Expand all | Expand 10 after
763 // Note: For variables we must not push an initial value (such as 763 // Note: For variables we must not push an initial value (such as
764 // 'undefined') because we may have a (legal) redeclaration and we 764 // 'undefined') because we may have a (legal) redeclaration and we
765 // must not destroy the current value. 765 // must not destroy the current value.
766 if (hole_init) { 766 if (hole_init) {
767 __ PushRoot(Heap::kTheHoleValueRootIndex); 767 __ PushRoot(Heap::kTheHoleValueRootIndex);
768 } else { 768 } else {
769 __ Push(Smi::FromInt(0)); // Indicates no initial value. 769 __ Push(Smi::FromInt(0)); // Indicates no initial value.
770 } 770 }
771 __ Push(Smi::FromInt(variable->DeclarationPropertyAttributes())); 771 __ Push(Smi::FromInt(variable->DeclarationPropertyAttributes()));
772 __ CallRuntime(Runtime::kDeclareLookupSlot); 772 __ CallRuntime(Runtime::kDeclareLookupSlot);
773 PrepareForBailoutForId(proxy->id(), NO_REGISTERS);
773 break; 774 break;
774 } 775 }
775 } 776 }
776 } 777 }
777 778
778 779
779 void FullCodeGenerator::VisitFunctionDeclaration( 780 void FullCodeGenerator::VisitFunctionDeclaration(
780 FunctionDeclaration* declaration) { 781 FunctionDeclaration* declaration) {
781 VariableProxy* proxy = declaration->proxy(); 782 VariableProxy* proxy = declaration->proxy();
782 Variable* variable = proxy->var(); 783 Variable* variable = proxy->var();
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
817 PrepareForBailoutForId(proxy->id(), NO_REGISTERS); 818 PrepareForBailoutForId(proxy->id(), NO_REGISTERS);
818 break; 819 break;
819 } 820 }
820 821
821 case VariableLocation::LOOKUP: { 822 case VariableLocation::LOOKUP: {
822 Comment cmnt(masm_, "[ FunctionDeclaration"); 823 Comment cmnt(masm_, "[ FunctionDeclaration");
823 PushOperand(variable->name()); 824 PushOperand(variable->name());
824 VisitForStackValue(declaration->fun()); 825 VisitForStackValue(declaration->fun());
825 PushOperand(Smi::FromInt(variable->DeclarationPropertyAttributes())); 826 PushOperand(Smi::FromInt(variable->DeclarationPropertyAttributes()));
826 CallRuntimeWithOperands(Runtime::kDeclareLookupSlot); 827 CallRuntimeWithOperands(Runtime::kDeclareLookupSlot);
828 PrepareForBailoutForId(proxy->id(), NO_REGISTERS);
827 break; 829 break;
828 } 830 }
829 } 831 }
830 } 832 }
831 833
832 834
833 void FullCodeGenerator::DeclareGlobals(Handle<FixedArray> pairs) { 835 void FullCodeGenerator::DeclareGlobals(Handle<FixedArray> pairs) {
834 // Call the runtime to declare the globals. 836 // Call the runtime to declare the globals.
835 __ Push(pairs); 837 __ Push(pairs);
836 __ Push(Smi::FromInt(DeclareGlobalsFlags())); 838 __ Push(Smi::FromInt(DeclareGlobalsFlags()));
(...skipping 2974 matching lines...) Expand 10 before | Expand all | Expand 10 after
3811 DCHECK_EQ( 3813 DCHECK_EQ(
3812 isolate->builtins()->OnStackReplacement()->entry(), 3814 isolate->builtins()->OnStackReplacement()->entry(),
3813 Assembler::target_address_at(call_target_address, unoptimized_code)); 3815 Assembler::target_address_at(call_target_address, unoptimized_code));
3814 return ON_STACK_REPLACEMENT; 3816 return ON_STACK_REPLACEMENT;
3815 } 3817 }
3816 3818
3817 } // namespace internal 3819 } // namespace internal
3818 } // namespace v8 3820 } // namespace v8
3819 3821
3820 #endif // V8_TARGET_ARCH_X64 3822 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/full-codegen/s390/full-codegen-s390.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