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/ia32/full-codegen-ia32.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
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_IA32 5 #if V8_TARGET_ARCH_IA32
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 740 matching lines...) Expand 10 before | Expand all | Expand 10 after
751 // 'undefined') because we may have a (legal) redeclaration and we 751 // 'undefined') because we may have a (legal) redeclaration and we
752 // must not destroy the current value. 752 // must not destroy the current value.
753 if (hole_init) { 753 if (hole_init) {
754 __ push(Immediate(isolate()->factory()->the_hole_value())); 754 __ push(Immediate(isolate()->factory()->the_hole_value()));
755 } else { 755 } else {
756 __ push(Immediate(Smi::FromInt(0))); // Indicates no initial value. 756 __ push(Immediate(Smi::FromInt(0))); // Indicates no initial value.
757 } 757 }
758 __ push( 758 __ push(
759 Immediate(Smi::FromInt(variable->DeclarationPropertyAttributes()))); 759 Immediate(Smi::FromInt(variable->DeclarationPropertyAttributes())));
760 __ CallRuntime(Runtime::kDeclareLookupSlot); 760 __ CallRuntime(Runtime::kDeclareLookupSlot);
761 PrepareForBailoutForId(proxy->id(), NO_REGISTERS);
761 break; 762 break;
762 } 763 }
763 } 764 }
764 } 765 }
765 766
766 767
767 void FullCodeGenerator::VisitFunctionDeclaration( 768 void FullCodeGenerator::VisitFunctionDeclaration(
768 FunctionDeclaration* declaration) { 769 FunctionDeclaration* declaration) {
769 VariableProxy* proxy = declaration->proxy(); 770 VariableProxy* proxy = declaration->proxy();
770 Variable* variable = proxy->var(); 771 Variable* variable = proxy->var();
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
804 PrepareForBailoutForId(proxy->id(), NO_REGISTERS); 805 PrepareForBailoutForId(proxy->id(), NO_REGISTERS);
805 break; 806 break;
806 } 807 }
807 808
808 case VariableLocation::LOOKUP: { 809 case VariableLocation::LOOKUP: {
809 Comment cmnt(masm_, "[ FunctionDeclaration"); 810 Comment cmnt(masm_, "[ FunctionDeclaration");
810 PushOperand(variable->name()); 811 PushOperand(variable->name());
811 VisitForStackValue(declaration->fun()); 812 VisitForStackValue(declaration->fun());
812 PushOperand(Smi::FromInt(variable->DeclarationPropertyAttributes())); 813 PushOperand(Smi::FromInt(variable->DeclarationPropertyAttributes()));
813 CallRuntimeWithOperands(Runtime::kDeclareLookupSlot); 814 CallRuntimeWithOperands(Runtime::kDeclareLookupSlot);
815 PrepareForBailoutForId(proxy->id(), NO_REGISTERS);
814 break; 816 break;
815 } 817 }
816 } 818 }
817 } 819 }
818 820
819 821
820 void FullCodeGenerator::DeclareGlobals(Handle<FixedArray> pairs) { 822 void FullCodeGenerator::DeclareGlobals(Handle<FixedArray> pairs) {
821 // Call the runtime to declare the globals. 823 // Call the runtime to declare the globals.
822 __ Push(pairs); 824 __ Push(pairs);
823 __ Push(Smi::FromInt(DeclareGlobalsFlags())); 825 __ Push(Smi::FromInt(DeclareGlobalsFlags()));
(...skipping 3004 matching lines...) Expand 10 before | Expand all | Expand 10 after
3828 isolate->builtins()->OnStackReplacement()->entry(), 3830 isolate->builtins()->OnStackReplacement()->entry(),
3829 Assembler::target_address_at(call_target_address, unoptimized_code)); 3831 Assembler::target_address_at(call_target_address, unoptimized_code));
3830 return ON_STACK_REPLACEMENT; 3832 return ON_STACK_REPLACEMENT;
3831 } 3833 }
3832 3834
3833 3835
3834 } // namespace internal 3836 } // namespace internal
3835 } // namespace v8 3837 } // namespace v8
3836 3838
3837 #endif // V8_TARGET_ARCH_IA32 3839 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/full-codegen/arm64/full-codegen-arm64.cc ('k') | src/full-codegen/mips/full-codegen-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698