Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(447)

Side by Side Diff: src/full-codegen/arm64/full-codegen-arm64.cc

Issue 1337883002: [builtins] Remove the weird STACK_OVERFLOW builtin. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/full-codegen/arm/full-codegen-arm.cc ('k') | src/full-codegen/ia32/full-codegen-ia32.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « src/full-codegen/arm/full-codegen-arm.cc ('k') | src/full-codegen/ia32/full-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698