| 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/full-codegen/full-codegen.h" | 7 #include "src/full-codegen/full-codegen.h" |
| 8 #include "src/ast/compile-time-value.h" | 8 #include "src/ast/compile-time-value.h" |
| 9 #include "src/ast/scopes.h" | 9 #include "src/ast/scopes.h" |
| 10 #include "src/code-factory.h" | 10 #include "src/code-factory.h" |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 __ AddSmiLiteral(r1, r1, Smi::FromInt(1), r0); | 144 __ AddSmiLiteral(r1, r1, Smi::FromInt(1), r0); |
| 145 __ StoreP(r1, | 145 __ StoreP(r1, |
| 146 FieldMemOperand( | 146 FieldMemOperand( |
| 147 r6, TypeFeedbackVector::kInvocationCountIndex * kPointerSize + | 147 r6, TypeFeedbackVector::kInvocationCountIndex * kPointerSize + |
| 148 TypeFeedbackVector::kHeaderSize)); | 148 TypeFeedbackVector::kHeaderSize)); |
| 149 } | 149 } |
| 150 | 150 |
| 151 { | 151 { |
| 152 Comment cmnt(masm_, "[ Allocate locals"); | 152 Comment cmnt(masm_, "[ Allocate locals"); |
| 153 int locals_count = info->scope()->num_stack_slots(); | 153 int locals_count = info->scope()->num_stack_slots(); |
| 154 // Generators allocate locals, if any, in context slots. | |
| 155 DCHECK(!IsGeneratorFunction(info->literal()->kind()) || locals_count == 0); | |
| 156 OperandStackDepthIncrement(locals_count); | 154 OperandStackDepthIncrement(locals_count); |
| 157 if (locals_count > 0) { | 155 if (locals_count > 0) { |
| 158 if (locals_count >= 128) { | 156 if (locals_count >= 128) { |
| 159 Label ok; | 157 Label ok; |
| 160 __ AddP(ip, sp, Operand(-(locals_count * kPointerSize))); | 158 __ AddP(ip, sp, Operand(-(locals_count * kPointerSize))); |
| 161 __ LoadRoot(r5, Heap::kRealStackLimitRootIndex); | 159 __ LoadRoot(r5, Heap::kRealStackLimitRootIndex); |
| 162 __ CmpLogicalP(ip, r5); | 160 __ CmpLogicalP(ip, r5); |
| 163 __ bge(&ok, Label::kNear); | 161 __ bge(&ok, Label::kNear); |
| 164 __ CallRuntime(Runtime::kThrowStackOverflow); | 162 __ CallRuntime(Runtime::kThrowStackOverflow); |
| 165 __ bind(&ok); | 163 __ bind(&ok); |
| (...skipping 3334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3500 DCHECK(kOSRBranchInstruction == br_instr); | 3498 DCHECK(kOSRBranchInstruction == br_instr); |
| 3501 | 3499 |
| 3502 DCHECK(interrupt_address == | 3500 DCHECK(interrupt_address == |
| 3503 isolate->builtins()->OnStackReplacement()->entry()); | 3501 isolate->builtins()->OnStackReplacement()->entry()); |
| 3504 return ON_STACK_REPLACEMENT; | 3502 return ON_STACK_REPLACEMENT; |
| 3505 } | 3503 } |
| 3506 | 3504 |
| 3507 } // namespace internal | 3505 } // namespace internal |
| 3508 } // namespace v8 | 3506 } // namespace v8 |
| 3509 #endif // V8_TARGET_ARCH_S390 | 3507 #endif // V8_TARGET_ARCH_S390 |
| OLD | NEW |