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/code-factory.h" | 7 #include "src/code-factory.h" |
8 #include "src/code-stubs.h" | 8 #include "src/code-stubs.h" |
9 #include "src/codegen.h" | 9 #include "src/codegen.h" |
10 #include "src/compiler.h" | 10 #include "src/compiler.h" |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 // Generators allocate locals, if any, in context slots. | 152 // Generators allocate locals, if any, in context slots. |
153 DCHECK(!IsGeneratorFunction(info->literal()->kind()) || locals_count == 0); | 153 DCHECK(!IsGeneratorFunction(info->literal()->kind()) || locals_count == 0); |
154 | 154 |
155 if (locals_count > 0) { | 155 if (locals_count > 0) { |
156 if (locals_count >= 128) { | 156 if (locals_count >= 128) { |
157 Label ok; | 157 Label ok; |
158 DCHECK(jssp.Is(__ StackPointer())); | 158 DCHECK(jssp.Is(__ StackPointer())); |
159 __ Sub(x10, jssp, locals_count * kPointerSize); | 159 __ Sub(x10, jssp, locals_count * kPointerSize); |
160 __ CompareRoot(x10, Heap::kRealStackLimitRootIndex); | 160 __ CompareRoot(x10, Heap::kRealStackLimitRootIndex); |
161 __ B(hs, &ok); | 161 __ B(hs, &ok); |
162 __ InvokeBuiltin(Context::STACK_OVERFLOW_BUILTIN_INDEX, CALL_FUNCTION); | 162 __ CallRuntime(Runtime::kThrowStackOverflow, 0); |
163 __ Bind(&ok); | 163 __ Bind(&ok); |
164 } | 164 } |
165 __ LoadRoot(x10, Heap::kUndefinedValueRootIndex); | 165 __ LoadRoot(x10, Heap::kUndefinedValueRootIndex); |
166 if (FLAG_optimize_for_size) { | 166 if (FLAG_optimize_for_size) { |
167 __ PushMultipleTimes(x10 , locals_count); | 167 __ PushMultipleTimes(x10 , locals_count); |
168 } else { | 168 } else { |
169 const int kMaxPushes = 32; | 169 const int kMaxPushes = 32; |
170 if (locals_count >= kMaxPushes) { | 170 if (locals_count >= kMaxPushes) { |
171 int loop_iterations = locals_count / kMaxPushes; | 171 int loop_iterations = locals_count / kMaxPushes; |
172 __ Mov(x3, loop_iterations); | 172 __ Mov(x3, loop_iterations); |
(...skipping 5188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5361 } | 5361 } |
5362 | 5362 |
5363 return INTERRUPT; | 5363 return INTERRUPT; |
5364 } | 5364 } |
5365 | 5365 |
5366 | 5366 |
5367 } // namespace internal | 5367 } // namespace internal |
5368 } // namespace v8 | 5368 } // namespace v8 |
5369 | 5369 |
5370 #endif // V8_TARGET_ARCH_ARM64 | 5370 #endif // V8_TARGET_ARCH_ARM64 |
OLD | NEW |