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/ppc/full-codegen-ppc.cc

Issue 1413453003: Merged: Squashed multiple commits. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@4.7
Patch Set: Created 5 years, 1 month 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 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/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 802 matching lines...) Expand 10 before | Expand all | Expand 10 after
813 // Note: For variables we must not push an initial value (such as 813 // Note: For variables we must not push an initial value (such as
814 // 'undefined') because we may have a (legal) redeclaration and we 814 // 'undefined') because we may have a (legal) redeclaration and we
815 // must not destroy the current value. 815 // must not destroy the current value.
816 if (hole_init) { 816 if (hole_init) {
817 __ LoadRoot(r3, Heap::kTheHoleValueRootIndex); 817 __ LoadRoot(r3, Heap::kTheHoleValueRootIndex);
818 __ Push(r5, r3); 818 __ Push(r5, r3);
819 } else { 819 } else {
820 __ LoadSmiLiteral(r3, Smi::FromInt(0)); // Indicates no initial value. 820 __ LoadSmiLiteral(r3, Smi::FromInt(0)); // Indicates no initial value.
821 __ Push(r5, r3); 821 __ Push(r5, r3);
822 } 822 }
823 __ CallRuntime(IsImmutableVariableMode(mode) 823 __ LoadSmiLiteral(
824 ? Runtime::kDeclareReadOnlyLookupSlot 824 r3, Smi::FromInt(variable->DeclarationPropertyAttributes()));
825 : Runtime::kDeclareLookupSlot, 825 __ Push(r3);
826 2); 826 __ CallRuntime(Runtime::kDeclareLookupSlot, 3);
827 break; 827 break;
828 } 828 }
829 } 829 }
830 } 830 }
831 831
832 832
833 void FullCodeGenerator::VisitFunctionDeclaration( 833 void FullCodeGenerator::VisitFunctionDeclaration(
834 FunctionDeclaration* declaration) { 834 FunctionDeclaration* declaration) {
835 VariableProxy* proxy = declaration->proxy(); 835 VariableProxy* proxy = declaration->proxy();
836 Variable* variable = proxy->var(); 836 Variable* variable = proxy->var();
(...skipping 30 matching lines...) Expand all
867 PrepareForBailoutForId(proxy->id(), NO_REGISTERS); 867 PrepareForBailoutForId(proxy->id(), NO_REGISTERS);
868 break; 868 break;
869 } 869 }
870 870
871 case VariableLocation::LOOKUP: { 871 case VariableLocation::LOOKUP: {
872 Comment cmnt(masm_, "[ FunctionDeclaration"); 872 Comment cmnt(masm_, "[ FunctionDeclaration");
873 __ mov(r5, Operand(variable->name())); 873 __ mov(r5, Operand(variable->name()));
874 __ Push(r5); 874 __ Push(r5);
875 // Push initial value for function declaration. 875 // Push initial value for function declaration.
876 VisitForStackValue(declaration->fun()); 876 VisitForStackValue(declaration->fun());
877 __ CallRuntime(Runtime::kDeclareLookupSlot, 2); 877 __ LoadSmiLiteral(
878 r5, Smi::FromInt(variable->DeclarationPropertyAttributes()));
879 __ Push(r5);
880 __ CallRuntime(Runtime::kDeclareLookupSlot, 3);
878 break; 881 break;
879 } 882 }
880 } 883 }
881 } 884 }
882 885
883 886
884 void FullCodeGenerator::DeclareGlobals(Handle<FixedArray> pairs) { 887 void FullCodeGenerator::DeclareGlobals(Handle<FixedArray> pairs) {
885 // Call the runtime to declare the globals. 888 // Call the runtime to declare the globals.
886 __ mov(r4, Operand(pairs)); 889 __ mov(r4, Operand(pairs));
887 __ LoadSmiLiteral(r3, Smi::FromInt(DeclareGlobalsFlags())); 890 __ LoadSmiLiteral(r3, Smi::FromInt(DeclareGlobalsFlags()));
(...skipping 4329 matching lines...) Expand 10 before | Expand all | Expand 10 after
5217 return ON_STACK_REPLACEMENT; 5220 return ON_STACK_REPLACEMENT;
5218 } 5221 }
5219 5222
5220 DCHECK(interrupt_address == 5223 DCHECK(interrupt_address ==
5221 isolate->builtins()->OsrAfterStackCheck()->entry()); 5224 isolate->builtins()->OsrAfterStackCheck()->entry());
5222 return OSR_AFTER_STACK_CHECK; 5225 return OSR_AFTER_STACK_CHECK;
5223 } 5226 }
5224 } // namespace internal 5227 } // namespace internal
5225 } // namespace v8 5228 } // namespace v8
5226 #endif // V8_TARGET_ARCH_PPC 5229 #endif // V8_TARGET_ARCH_PPC
OLDNEW
« no previous file with comments | « src/full-codegen/mips64/full-codegen-mips64.cc ('k') | src/full-codegen/x64/full-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698