OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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_S390 | 5 #if V8_TARGET_ARCH_S390 |
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 731 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
742 case VariableLocation::LOOKUP: { | 742 case VariableLocation::LOOKUP: { |
743 Comment cmnt(masm_, "[ VariableDeclaration"); | 743 Comment cmnt(masm_, "[ VariableDeclaration"); |
744 DCHECK_EQ(VAR, mode); | 744 DCHECK_EQ(VAR, mode); |
745 DCHECK(!hole_init); | 745 DCHECK(!hole_init); |
746 __ mov(r4, Operand(variable->name())); | 746 __ mov(r4, Operand(variable->name())); |
747 __ Push(r4); | 747 __ Push(r4); |
748 __ CallRuntime(Runtime::kDeclareEvalVar); | 748 __ CallRuntime(Runtime::kDeclareEvalVar); |
749 PrepareForBailoutForId(proxy->id(), BailoutState::NO_REGISTERS); | 749 PrepareForBailoutForId(proxy->id(), BailoutState::NO_REGISTERS); |
750 break; | 750 break; |
751 } | 751 } |
| 752 |
| 753 case VariableLocation::MODULE: |
| 754 UNREACHABLE(); |
752 } | 755 } |
753 } | 756 } |
754 | 757 |
755 void FullCodeGenerator::VisitFunctionDeclaration( | 758 void FullCodeGenerator::VisitFunctionDeclaration( |
756 FunctionDeclaration* declaration) { | 759 FunctionDeclaration* declaration) { |
757 VariableProxy* proxy = declaration->proxy(); | 760 VariableProxy* proxy = declaration->proxy(); |
758 Variable* variable = proxy->var(); | 761 Variable* variable = proxy->var(); |
759 switch (variable->location()) { | 762 switch (variable->location()) { |
760 case VariableLocation::GLOBAL: | 763 case VariableLocation::GLOBAL: |
761 case VariableLocation::UNALLOCATED: { | 764 case VariableLocation::UNALLOCATED: { |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
795 case VariableLocation::LOOKUP: { | 798 case VariableLocation::LOOKUP: { |
796 Comment cmnt(masm_, "[ FunctionDeclaration"); | 799 Comment cmnt(masm_, "[ FunctionDeclaration"); |
797 __ mov(r4, Operand(variable->name())); | 800 __ mov(r4, Operand(variable->name())); |
798 PushOperand(r4); | 801 PushOperand(r4); |
799 // Push initial value for function declaration. | 802 // Push initial value for function declaration. |
800 VisitForStackValue(declaration->fun()); | 803 VisitForStackValue(declaration->fun()); |
801 CallRuntimeWithOperands(Runtime::kDeclareEvalFunction); | 804 CallRuntimeWithOperands(Runtime::kDeclareEvalFunction); |
802 PrepareForBailoutForId(proxy->id(), BailoutState::NO_REGISTERS); | 805 PrepareForBailoutForId(proxy->id(), BailoutState::NO_REGISTERS); |
803 break; | 806 break; |
804 } | 807 } |
| 808 |
| 809 case VariableLocation::MODULE: |
| 810 UNREACHABLE(); |
805 } | 811 } |
806 } | 812 } |
807 | 813 |
808 void FullCodeGenerator::DeclareGlobals(Handle<FixedArray> pairs) { | 814 void FullCodeGenerator::DeclareGlobals(Handle<FixedArray> pairs) { |
809 // Call the runtime to declare the globals. | 815 // Call the runtime to declare the globals. |
810 __ mov(r3, Operand(pairs)); | 816 __ mov(r3, Operand(pairs)); |
811 __ LoadSmiLiteral(r2, Smi::FromInt(DeclareGlobalsFlags())); | 817 __ LoadSmiLiteral(r2, Smi::FromInt(DeclareGlobalsFlags())); |
812 __ EmitLoadTypeFeedbackVector(r4); | 818 __ EmitLoadTypeFeedbackVector(r4); |
813 __ Push(r3, r2, r4); | 819 __ Push(r3, r2, r4); |
814 __ CallRuntime(Runtime::kDeclareGlobals); | 820 __ CallRuntime(Runtime::kDeclareGlobals); |
(...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1279 EmitDynamicLookupFastCase(proxy, typeof_mode, &slow, &done); | 1285 EmitDynamicLookupFastCase(proxy, typeof_mode, &slow, &done); |
1280 __ bind(&slow); | 1286 __ bind(&slow); |
1281 __ Push(var->name()); | 1287 __ Push(var->name()); |
1282 Runtime::FunctionId function_id = | 1288 Runtime::FunctionId function_id = |
1283 typeof_mode == NOT_INSIDE_TYPEOF | 1289 typeof_mode == NOT_INSIDE_TYPEOF |
1284 ? Runtime::kLoadLookupSlot | 1290 ? Runtime::kLoadLookupSlot |
1285 : Runtime::kLoadLookupSlotInsideTypeof; | 1291 : Runtime::kLoadLookupSlotInsideTypeof; |
1286 __ CallRuntime(function_id); | 1292 __ CallRuntime(function_id); |
1287 __ bind(&done); | 1293 __ bind(&done); |
1288 context()->Plug(r2); | 1294 context()->Plug(r2); |
| 1295 break; |
1289 } | 1296 } |
| 1297 |
| 1298 case VariableLocation::MODULE: |
| 1299 UNREACHABLE(); |
1290 } | 1300 } |
1291 } | 1301 } |
1292 | 1302 |
1293 void FullCodeGenerator::EmitAccessor(ObjectLiteralProperty* property) { | 1303 void FullCodeGenerator::EmitAccessor(ObjectLiteralProperty* property) { |
1294 Expression* expression = (property == NULL) ? NULL : property->value(); | 1304 Expression* expression = (property == NULL) ? NULL : property->value(); |
1295 if (expression == NULL) { | 1305 if (expression == NULL) { |
1296 __ LoadRoot(r3, Heap::kNullValueRootIndex); | 1306 __ LoadRoot(r3, Heap::kNullValueRootIndex); |
1297 PushOperand(r3); | 1307 PushOperand(r3); |
1298 } else { | 1308 } else { |
1299 VisitForStackValue(expression); | 1309 VisitForStackValue(expression); |
(...skipping 2377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3677 DCHECK(kOSRBranchInstruction == br_instr); | 3687 DCHECK(kOSRBranchInstruction == br_instr); |
3678 | 3688 |
3679 DCHECK(interrupt_address == | 3689 DCHECK(interrupt_address == |
3680 isolate->builtins()->OnStackReplacement()->entry()); | 3690 isolate->builtins()->OnStackReplacement()->entry()); |
3681 return ON_STACK_REPLACEMENT; | 3691 return ON_STACK_REPLACEMENT; |
3682 } | 3692 } |
3683 | 3693 |
3684 } // namespace internal | 3694 } // namespace internal |
3685 } // namespace v8 | 3695 } // namespace v8 |
3686 #endif // V8_TARGET_ARCH_S390 | 3696 #endif // V8_TARGET_ARCH_S390 |
OLD | NEW |