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

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

Issue 1382513003: Test for var declarations in eval which conflict with let (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: mask out eval bit 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
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/debug/debug.h" 10 #include "src/debug/debug.h"
(...skipping 799 matching lines...) Expand 10 before | Expand all | Expand 10 after
810 // Note: For variables we must not push an initial value (such as 810 // Note: For variables we must not push an initial value (such as
811 // 'undefined') because we may have a (legal) redeclaration and we 811 // 'undefined') because we may have a (legal) redeclaration and we
812 // must not destroy the current value. 812 // must not destroy the current value.
813 if (hole_init) { 813 if (hole_init) {
814 __ LoadRoot(r3, Heap::kTheHoleValueRootIndex); 814 __ LoadRoot(r3, Heap::kTheHoleValueRootIndex);
815 __ Push(r5, r3); 815 __ Push(r5, r3);
816 } else { 816 } else {
817 __ LoadSmiLiteral(r3, Smi::FromInt(0)); // Indicates no initial value. 817 __ LoadSmiLiteral(r3, Smi::FromInt(0)); // Indicates no initial value.
818 __ Push(r5, r3); 818 __ Push(r5, r3);
819 } 819 }
820 __ CallRuntime(IsImmutableVariableMode(mode) 820 __ LoadSmiLiteral(
821 ? Runtime::kDeclareReadOnlyLookupSlot 821 r3, Smi::FromInt(variable->DeclarationPropertyAttributes()));
822 : Runtime::kDeclareLookupSlot, 822 __ Push(r3);
823 2); 823 __ CallRuntime(Runtime::kDeclareLookupSlot, 3);
824 break; 824 break;
825 } 825 }
826 } 826 }
827 } 827 }
828 828
829 829
830 void FullCodeGenerator::VisitFunctionDeclaration( 830 void FullCodeGenerator::VisitFunctionDeclaration(
831 FunctionDeclaration* declaration) { 831 FunctionDeclaration* declaration) {
832 VariableProxy* proxy = declaration->proxy(); 832 VariableProxy* proxy = declaration->proxy();
833 Variable* variable = proxy->var(); 833 Variable* variable = proxy->var();
(...skipping 30 matching lines...) Expand all
864 PrepareForBailoutForId(proxy->id(), NO_REGISTERS); 864 PrepareForBailoutForId(proxy->id(), NO_REGISTERS);
865 break; 865 break;
866 } 866 }
867 867
868 case VariableLocation::LOOKUP: { 868 case VariableLocation::LOOKUP: {
869 Comment cmnt(masm_, "[ FunctionDeclaration"); 869 Comment cmnt(masm_, "[ FunctionDeclaration");
870 __ mov(r5, Operand(variable->name())); 870 __ mov(r5, Operand(variable->name()));
871 __ Push(r5); 871 __ Push(r5);
872 // Push initial value for function declaration. 872 // Push initial value for function declaration.
873 VisitForStackValue(declaration->fun()); 873 VisitForStackValue(declaration->fun());
874 __ CallRuntime(Runtime::kDeclareLookupSlot, 2); 874 __ LoadSmiLiteral(
875 r5, Smi::FromInt(variable->DeclarationPropertyAttributes()));
876 __ Push(r5);
877 __ CallRuntime(Runtime::kDeclareLookupSlot, 3);
875 break; 878 break;
876 } 879 }
877 } 880 }
878 } 881 }
879 882
880 883
881 void FullCodeGenerator::DeclareGlobals(Handle<FixedArray> pairs) { 884 void FullCodeGenerator::DeclareGlobals(Handle<FixedArray> pairs) {
882 // Call the runtime to declare the globals. 885 // Call the runtime to declare the globals.
883 __ mov(r4, Operand(pairs)); 886 __ mov(r4, Operand(pairs));
884 __ LoadSmiLiteral(r3, Smi::FromInt(DeclareGlobalsFlags())); 887 __ LoadSmiLiteral(r3, Smi::FromInt(DeclareGlobalsFlags()));
(...skipping 4343 matching lines...) Expand 10 before | Expand all | Expand 10 after
5228 return ON_STACK_REPLACEMENT; 5231 return ON_STACK_REPLACEMENT;
5229 } 5232 }
5230 5233
5231 DCHECK(interrupt_address == 5234 DCHECK(interrupt_address ==
5232 isolate->builtins()->OsrAfterStackCheck()->entry()); 5235 isolate->builtins()->OsrAfterStackCheck()->entry());
5233 return OSR_AFTER_STACK_CHECK; 5236 return OSR_AFTER_STACK_CHECK;
5234 } 5237 }
5235 } // namespace internal 5238 } // namespace internal
5236 } // namespace v8 5239 } // namespace v8
5237 #endif // V8_TARGET_ARCH_PPC 5240 #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