OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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_ARM64 | 5 #if V8_TARGET_ARCH_ARM64 |
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 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
142 TypeFeedbackVector::kHeaderSize)); | 142 TypeFeedbackVector::kHeaderSize)); |
143 __ Add(x10, x10, Operand(Smi::FromInt(1))); | 143 __ Add(x10, x10, Operand(Smi::FromInt(1))); |
144 __ Str(x10, FieldMemOperand(x11, TypeFeedbackVector::kInvocationCountIndex * | 144 __ Str(x10, FieldMemOperand(x11, TypeFeedbackVector::kInvocationCountIndex * |
145 kPointerSize + | 145 kPointerSize + |
146 TypeFeedbackVector::kHeaderSize)); | 146 TypeFeedbackVector::kHeaderSize)); |
147 } | 147 } |
148 | 148 |
149 // Reserve space on the stack for locals. | 149 // Reserve space on the stack for locals. |
150 { Comment cmnt(masm_, "[ Allocate locals"); | 150 { Comment cmnt(masm_, "[ Allocate locals"); |
151 int locals_count = info->scope()->num_stack_slots(); | 151 int locals_count = info->scope()->num_stack_slots(); |
152 // Generators allocate locals, if any, in context slots. | |
153 DCHECK(!IsGeneratorFunction(info->literal()->kind()) || locals_count == 0); | |
154 OperandStackDepthIncrement(locals_count); | 152 OperandStackDepthIncrement(locals_count); |
155 if (locals_count > 0) { | 153 if (locals_count > 0) { |
156 if (locals_count >= 128) { | 154 if (locals_count >= 128) { |
157 Label ok; | 155 Label ok; |
158 DCHECK(jssp.Is(__ StackPointer())); | 156 DCHECK(jssp.Is(__ StackPointer())); |
159 __ Sub(x10, jssp, locals_count * kPointerSize); | 157 __ Sub(x10, jssp, locals_count * kPointerSize); |
160 __ CompareRoot(x10, Heap::kRealStackLimitRootIndex); | 158 __ CompareRoot(x10, Heap::kRealStackLimitRootIndex); |
161 __ B(hs, &ok); | 159 __ B(hs, &ok); |
162 __ CallRuntime(Runtime::kThrowStackOverflow); | 160 __ CallRuntime(Runtime::kThrowStackOverflow); |
163 __ Bind(&ok); | 161 __ Bind(&ok); |
(...skipping 3482 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3646 } | 3644 } |
3647 | 3645 |
3648 return INTERRUPT; | 3646 return INTERRUPT; |
3649 } | 3647 } |
3650 | 3648 |
3651 | 3649 |
3652 } // namespace internal | 3650 } // namespace internal |
3653 } // namespace v8 | 3651 } // namespace v8 |
3654 | 3652 |
3655 #endif // V8_TARGET_ARCH_ARM64 | 3653 #endif // V8_TARGET_ARCH_ARM64 |
OLD | NEW |