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/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 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 __ StoreP(r8, | 145 __ StoreP(r8, |
146 FieldMemOperand( | 146 FieldMemOperand( |
147 r7, TypeFeedbackVector::kInvocationCountIndex * kPointerSize + | 147 r7, TypeFeedbackVector::kInvocationCountIndex * kPointerSize + |
148 TypeFeedbackVector::kHeaderSize), | 148 TypeFeedbackVector::kHeaderSize), |
149 r0); | 149 r0); |
150 } | 150 } |
151 | 151 |
152 { | 152 { |
153 Comment cmnt(masm_, "[ Allocate locals"); | 153 Comment cmnt(masm_, "[ Allocate locals"); |
154 int locals_count = info->scope()->num_stack_slots(); | 154 int locals_count = info->scope()->num_stack_slots(); |
155 // Generators allocate locals, if any, in context slots. | |
156 DCHECK(!IsGeneratorFunction(info->literal()->kind()) || locals_count == 0); | |
157 OperandStackDepthIncrement(locals_count); | 155 OperandStackDepthIncrement(locals_count); |
158 if (locals_count > 0) { | 156 if (locals_count > 0) { |
159 if (locals_count >= 128) { | 157 if (locals_count >= 128) { |
160 Label ok; | 158 Label ok; |
161 __ Add(ip, sp, -(locals_count * kPointerSize), r0); | 159 __ Add(ip, sp, -(locals_count * kPointerSize), r0); |
162 __ LoadRoot(r5, Heap::kRealStackLimitRootIndex); | 160 __ LoadRoot(r5, Heap::kRealStackLimitRootIndex); |
163 __ cmpl(ip, r5); | 161 __ cmpl(ip, r5); |
164 __ bc_short(ge, &ok); | 162 __ bc_short(ge, &ok); |
165 __ CallRuntime(Runtime::kThrowStackOverflow); | 163 __ CallRuntime(Runtime::kThrowStackOverflow); |
166 __ bind(&ok); | 164 __ bind(&ok); |
(...skipping 3411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3578 | 3576 |
3579 DCHECK(Assembler::IsCrSet(Assembler::instr_at(cmp_address))); | 3577 DCHECK(Assembler::IsCrSet(Assembler::instr_at(cmp_address))); |
3580 | 3578 |
3581 DCHECK(interrupt_address == | 3579 DCHECK(interrupt_address == |
3582 isolate->builtins()->OnStackReplacement()->entry()); | 3580 isolate->builtins()->OnStackReplacement()->entry()); |
3583 return ON_STACK_REPLACEMENT; | 3581 return ON_STACK_REPLACEMENT; |
3584 } | 3582 } |
3585 } // namespace internal | 3583 } // namespace internal |
3586 } // namespace v8 | 3584 } // namespace v8 |
3587 #endif // V8_TARGET_ARCH_PPC | 3585 #endif // V8_TARGET_ARCH_PPC |
OLD | NEW |