| OLD | NEW |
| 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 756 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 767 // 'undefined') because we may have a (legal) redeclaration and we | 767 // 'undefined') because we may have a (legal) redeclaration and we |
| 768 // must not destroy the current value. | 768 // must not destroy the current value. |
| 769 if (hole_init) { | 769 if (hole_init) { |
| 770 __ LoadRoot(r3, Heap::kTheHoleValueRootIndex); | 770 __ LoadRoot(r3, Heap::kTheHoleValueRootIndex); |
| 771 } else { | 771 } else { |
| 772 __ LoadSmiLiteral(r3, Smi::FromInt(0)); // Indicates no initial value. | 772 __ LoadSmiLiteral(r3, Smi::FromInt(0)); // Indicates no initial value. |
| 773 } | 773 } |
| 774 __ Push(r5, r3); | 774 __ Push(r5, r3); |
| 775 __ Push(Smi::FromInt(variable->DeclarationPropertyAttributes())); | 775 __ Push(Smi::FromInt(variable->DeclarationPropertyAttributes())); |
| 776 __ CallRuntime(Runtime::kDeclareLookupSlot); | 776 __ CallRuntime(Runtime::kDeclareLookupSlot); |
| 777 PrepareForBailoutForId(proxy->id(), NO_REGISTERS); |
| 777 break; | 778 break; |
| 778 } | 779 } |
| 779 } | 780 } |
| 780 } | 781 } |
| 781 | 782 |
| 782 | 783 |
| 783 void FullCodeGenerator::VisitFunctionDeclaration( | 784 void FullCodeGenerator::VisitFunctionDeclaration( |
| 784 FunctionDeclaration* declaration) { | 785 FunctionDeclaration* declaration) { |
| 785 VariableProxy* proxy = declaration->proxy(); | 786 VariableProxy* proxy = declaration->proxy(); |
| 786 Variable* variable = proxy->var(); | 787 Variable* variable = proxy->var(); |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 820 } | 821 } |
| 821 | 822 |
| 822 case VariableLocation::LOOKUP: { | 823 case VariableLocation::LOOKUP: { |
| 823 Comment cmnt(masm_, "[ FunctionDeclaration"); | 824 Comment cmnt(masm_, "[ FunctionDeclaration"); |
| 824 __ mov(r5, Operand(variable->name())); | 825 __ mov(r5, Operand(variable->name())); |
| 825 PushOperand(r5); | 826 PushOperand(r5); |
| 826 // Push initial value for function declaration. | 827 // Push initial value for function declaration. |
| 827 VisitForStackValue(declaration->fun()); | 828 VisitForStackValue(declaration->fun()); |
| 828 PushOperand(Smi::FromInt(variable->DeclarationPropertyAttributes())); | 829 PushOperand(Smi::FromInt(variable->DeclarationPropertyAttributes())); |
| 829 CallRuntimeWithOperands(Runtime::kDeclareLookupSlot); | 830 CallRuntimeWithOperands(Runtime::kDeclareLookupSlot); |
| 831 PrepareForBailoutForId(proxy->id(), NO_REGISTERS); |
| 830 break; | 832 break; |
| 831 } | 833 } |
| 832 } | 834 } |
| 833 } | 835 } |
| 834 | 836 |
| 835 | 837 |
| 836 void FullCodeGenerator::DeclareGlobals(Handle<FixedArray> pairs) { | 838 void FullCodeGenerator::DeclareGlobals(Handle<FixedArray> pairs) { |
| 837 // Call the runtime to declare the globals. | 839 // Call the runtime to declare the globals. |
| 838 __ mov(r4, Operand(pairs)); | 840 __ mov(r4, Operand(pairs)); |
| 839 __ LoadSmiLiteral(r3, Smi::FromInt(DeclareGlobalsFlags())); | 841 __ LoadSmiLiteral(r3, Smi::FromInt(DeclareGlobalsFlags())); |
| (...skipping 3060 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3900 | 3902 |
| 3901 DCHECK(Assembler::IsCrSet(Assembler::instr_at(cmp_address))); | 3903 DCHECK(Assembler::IsCrSet(Assembler::instr_at(cmp_address))); |
| 3902 | 3904 |
| 3903 DCHECK(interrupt_address == | 3905 DCHECK(interrupt_address == |
| 3904 isolate->builtins()->OnStackReplacement()->entry()); | 3906 isolate->builtins()->OnStackReplacement()->entry()); |
| 3905 return ON_STACK_REPLACEMENT; | 3907 return ON_STACK_REPLACEMENT; |
| 3906 } | 3908 } |
| 3907 } // namespace internal | 3909 } // namespace internal |
| 3908 } // namespace v8 | 3910 } // namespace v8 |
| 3909 #endif // V8_TARGET_ARCH_PPC | 3911 #endif // V8_TARGET_ARCH_PPC |
| OLD | NEW |