OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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_ARM | 5 #if V8_TARGET_ARCH_ARM |
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 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 kPointerSize + | 137 kPointerSize + |
138 TypeFeedbackVector::kHeaderSize)); | 138 TypeFeedbackVector::kHeaderSize)); |
139 __ add(r9, r9, Operand(Smi::FromInt(1))); | 139 __ add(r9, r9, Operand(Smi::FromInt(1))); |
140 __ str(r9, FieldMemOperand(r2, TypeFeedbackVector::kInvocationCountIndex * | 140 __ str(r9, FieldMemOperand(r2, TypeFeedbackVector::kInvocationCountIndex * |
141 kPointerSize + | 141 kPointerSize + |
142 TypeFeedbackVector::kHeaderSize)); | 142 TypeFeedbackVector::kHeaderSize)); |
143 } | 143 } |
144 | 144 |
145 { Comment cmnt(masm_, "[ Allocate locals"); | 145 { Comment cmnt(masm_, "[ Allocate locals"); |
146 int locals_count = info->scope()->num_stack_slots(); | 146 int locals_count = info->scope()->num_stack_slots(); |
147 // Generators allocate locals, if any, in context slots. | |
148 DCHECK(!IsGeneratorFunction(info->literal()->kind()) || locals_count == 0); | |
149 OperandStackDepthIncrement(locals_count); | 147 OperandStackDepthIncrement(locals_count); |
150 if (locals_count > 0) { | 148 if (locals_count > 0) { |
151 if (locals_count >= 128) { | 149 if (locals_count >= 128) { |
152 Label ok; | 150 Label ok; |
153 __ sub(r9, sp, Operand(locals_count * kPointerSize)); | 151 __ sub(r9, sp, Operand(locals_count * kPointerSize)); |
154 __ LoadRoot(r2, Heap::kRealStackLimitRootIndex); | 152 __ LoadRoot(r2, Heap::kRealStackLimitRootIndex); |
155 __ cmp(r9, Operand(r2)); | 153 __ cmp(r9, Operand(r2)); |
156 __ b(hs, &ok); | 154 __ b(hs, &ok); |
157 __ CallRuntime(Runtime::kThrowStackOverflow); | 155 __ CallRuntime(Runtime::kThrowStackOverflow); |
158 __ bind(&ok); | 156 __ bind(&ok); |
(...skipping 3488 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3647 DCHECK(interrupt_address == | 3645 DCHECK(interrupt_address == |
3648 isolate->builtins()->OnStackReplacement()->entry()); | 3646 isolate->builtins()->OnStackReplacement()->entry()); |
3649 return ON_STACK_REPLACEMENT; | 3647 return ON_STACK_REPLACEMENT; |
3650 } | 3648 } |
3651 | 3649 |
3652 | 3650 |
3653 } // namespace internal | 3651 } // namespace internal |
3654 } // namespace v8 | 3652 } // namespace v8 |
3655 | 3653 |
3656 #endif // V8_TARGET_ARCH_ARM | 3654 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |