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

Side by Side Diff: src/full-codegen/arm/full-codegen-arm.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/contexts.h ('k') | src/full-codegen/arm64/full-codegen-arm64.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 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/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 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 int locals_count = info->scope()->num_stack_slots(); 148 int locals_count = info->scope()->num_stack_slots();
149 // Generators allocate locals, if any, in context slots. 149 // Generators allocate locals, if any, in context slots.
150 DCHECK(!IsGeneratorFunction(info->literal()->kind()) || locals_count == 0); 150 DCHECK(!IsGeneratorFunction(info->literal()->kind()) || locals_count == 0);
151 if (locals_count > 0) { 151 if (locals_count > 0) {
152 if (locals_count >= 128) { 152 if (locals_count >= 128) {
153 Label ok; 153 Label ok;
154 __ sub(r9, sp, Operand(locals_count * kPointerSize)); 154 __ sub(r9, sp, Operand(locals_count * kPointerSize));
155 __ LoadRoot(r2, Heap::kRealStackLimitRootIndex); 155 __ LoadRoot(r2, Heap::kRealStackLimitRootIndex);
156 __ cmp(r9, Operand(r2)); 156 __ cmp(r9, Operand(r2));
157 __ b(hs, &ok); 157 __ b(hs, &ok);
158 __ InvokeBuiltin(Context::STACK_OVERFLOW_BUILTIN_INDEX, CALL_FUNCTION); 158 __ CallRuntime(Runtime::kThrowStackOverflow, 0);
159 __ bind(&ok); 159 __ bind(&ok);
160 } 160 }
161 __ LoadRoot(r9, Heap::kUndefinedValueRootIndex); 161 __ LoadRoot(r9, Heap::kUndefinedValueRootIndex);
162 int kMaxPushes = FLAG_optimize_for_size ? 4 : 32; 162 int kMaxPushes = FLAG_optimize_for_size ? 4 : 32;
163 if (locals_count >= kMaxPushes) { 163 if (locals_count >= kMaxPushes) {
164 int loop_iterations = locals_count / kMaxPushes; 164 int loop_iterations = locals_count / kMaxPushes;
165 __ mov(r2, Operand(loop_iterations)); 165 __ mov(r2, Operand(loop_iterations));
166 Label loop_header; 166 Label loop_header;
167 __ bind(&loop_header); 167 __ bind(&loop_header);
168 // Do pushes. 168 // Do pushes.
(...skipping 5192 matching lines...) Expand 10 before | Expand all | Expand 10 after
5361 DCHECK(interrupt_address == 5361 DCHECK(interrupt_address ==
5362 isolate->builtins()->OsrAfterStackCheck()->entry()); 5362 isolate->builtins()->OsrAfterStackCheck()->entry());
5363 return OSR_AFTER_STACK_CHECK; 5363 return OSR_AFTER_STACK_CHECK;
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_ARM 5370 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/contexts.h ('k') | src/full-codegen/arm64/full-codegen-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698