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

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

Issue 2085623003: PPC/s390: [cleanup] Remove dead code from DeclareLookupSlot and rename it (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 6 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 | « no previous file | src/full-codegen/s390/full-codegen-s390.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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_PPC 5 #if V8_TARGET_ARCH_PPC
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 745 matching lines...) Expand 10 before | Expand all | Expand 10 after
756 EmitDebugCheckDeclarationContext(variable); 756 EmitDebugCheckDeclarationContext(variable);
757 __ LoadRoot(ip, Heap::kTheHoleValueRootIndex); 757 __ LoadRoot(ip, Heap::kTheHoleValueRootIndex);
758 __ StoreP(ip, ContextMemOperand(cp, variable->index()), r0); 758 __ StoreP(ip, ContextMemOperand(cp, variable->index()), r0);
759 // No write barrier since the_hole_value is in old space. 759 // No write barrier since the_hole_value is in old space.
760 PrepareForBailoutForId(proxy->id(), BailoutState::NO_REGISTERS); 760 PrepareForBailoutForId(proxy->id(), BailoutState::NO_REGISTERS);
761 } 761 }
762 break; 762 break;
763 763
764 case VariableLocation::LOOKUP: { 764 case VariableLocation::LOOKUP: {
765 Comment cmnt(masm_, "[ VariableDeclaration"); 765 Comment cmnt(masm_, "[ VariableDeclaration");
766 DCHECK_EQ(VAR, mode);
767 DCHECK(!hole_init);
766 __ mov(r5, Operand(variable->name())); 768 __ mov(r5, Operand(variable->name()));
767 // Declaration nodes are always introduced in one of four modes. 769 __ Push(r5);
768 DCHECK(IsDeclaredVariableMode(mode)); 770 __ CallRuntime(Runtime::kDeclareEvalVar);
769 DCHECK(!hole_init);
770 __ LoadSmiLiteral(r3, Smi::FromInt(0)); // Indicates no initial value.
771 __ Push(r5, r3);
772 __ Push(Smi::FromInt(variable->DeclarationPropertyAttributes()));
773 __ CallRuntime(Runtime::kDeclareLookupSlot);
774 PrepareForBailoutForId(proxy->id(), BailoutState::NO_REGISTERS); 771 PrepareForBailoutForId(proxy->id(), BailoutState::NO_REGISTERS);
775 break; 772 break;
776 } 773 }
777 } 774 }
778 } 775 }
779 776
780 777
781 void FullCodeGenerator::VisitFunctionDeclaration( 778 void FullCodeGenerator::VisitFunctionDeclaration(
782 FunctionDeclaration* declaration) { 779 FunctionDeclaration* declaration) {
783 VariableProxy* proxy = declaration->proxy(); 780 VariableProxy* proxy = declaration->proxy();
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
816 PrepareForBailoutForId(proxy->id(), BailoutState::NO_REGISTERS); 813 PrepareForBailoutForId(proxy->id(), BailoutState::NO_REGISTERS);
817 break; 814 break;
818 } 815 }
819 816
820 case VariableLocation::LOOKUP: { 817 case VariableLocation::LOOKUP: {
821 Comment cmnt(masm_, "[ FunctionDeclaration"); 818 Comment cmnt(masm_, "[ FunctionDeclaration");
822 __ mov(r5, Operand(variable->name())); 819 __ mov(r5, Operand(variable->name()));
823 PushOperand(r5); 820 PushOperand(r5);
824 // Push initial value for function declaration. 821 // Push initial value for function declaration.
825 VisitForStackValue(declaration->fun()); 822 VisitForStackValue(declaration->fun());
826 PushOperand(Smi::FromInt(variable->DeclarationPropertyAttributes())); 823 CallRuntimeWithOperands(Runtime::kDeclareEvalFunction);
827 CallRuntimeWithOperands(Runtime::kDeclareLookupSlot);
828 PrepareForBailoutForId(proxy->id(), BailoutState::NO_REGISTERS); 824 PrepareForBailoutForId(proxy->id(), BailoutState::NO_REGISTERS);
829 break; 825 break;
830 } 826 }
831 } 827 }
832 } 828 }
833 829
834 830
835 void FullCodeGenerator::DeclareGlobals(Handle<FixedArray> pairs) { 831 void FullCodeGenerator::DeclareGlobals(Handle<FixedArray> pairs) {
836 // Call the runtime to declare the globals. 832 // Call the runtime to declare the globals.
837 __ mov(r4, Operand(pairs)); 833 __ mov(r4, Operand(pairs));
(...skipping 2948 matching lines...) Expand 10 before | Expand all | Expand 10 after
3786 3782
3787 DCHECK(Assembler::IsCrSet(Assembler::instr_at(cmp_address))); 3783 DCHECK(Assembler::IsCrSet(Assembler::instr_at(cmp_address)));
3788 3784
3789 DCHECK(interrupt_address == 3785 DCHECK(interrupt_address ==
3790 isolate->builtins()->OnStackReplacement()->entry()); 3786 isolate->builtins()->OnStackReplacement()->entry());
3791 return ON_STACK_REPLACEMENT; 3787 return ON_STACK_REPLACEMENT;
3792 } 3788 }
3793 } // namespace internal 3789 } // namespace internal
3794 } // namespace v8 3790 } // namespace v8
3795 #endif // V8_TARGET_ARCH_PPC 3791 #endif // V8_TARGET_ARCH_PPC
OLDNEW
« no previous file with comments | « no previous file | src/full-codegen/s390/full-codegen-s390.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698