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

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

Issue 1334303002: PPC: [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 | « no previous file | src/ppc/builtins-ppc.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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_PPC 5 #if V8_TARGET_ARCH_PPC
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 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 int locals_count = info->scope()->num_stack_slots(); 153 int locals_count = info->scope()->num_stack_slots();
154 // Generators allocate locals, if any, in context slots. 154 // Generators allocate locals, if any, in context slots.
155 DCHECK(!IsGeneratorFunction(info->literal()->kind()) || locals_count == 0); 155 DCHECK(!IsGeneratorFunction(info->literal()->kind()) || locals_count == 0);
156 if (locals_count > 0) { 156 if (locals_count > 0) {
157 if (locals_count >= 128) { 157 if (locals_count >= 128) {
158 Label ok; 158 Label ok;
159 __ Add(ip, sp, -(locals_count * kPointerSize), r0); 159 __ Add(ip, sp, -(locals_count * kPointerSize), r0);
160 __ LoadRoot(r5, Heap::kRealStackLimitRootIndex); 160 __ LoadRoot(r5, Heap::kRealStackLimitRootIndex);
161 __ cmpl(ip, r5); 161 __ cmpl(ip, r5);
162 __ bc_short(ge, &ok); 162 __ bc_short(ge, &ok);
163 __ InvokeBuiltin(Context::STACK_OVERFLOW_BUILTIN_INDEX, CALL_FUNCTION); 163 __ CallRuntime(Runtime::kThrowStackOverflow, 0);
164 __ bind(&ok); 164 __ bind(&ok);
165 } 165 }
166 __ LoadRoot(ip, Heap::kUndefinedValueRootIndex); 166 __ LoadRoot(ip, Heap::kUndefinedValueRootIndex);
167 int kMaxPushes = FLAG_optimize_for_size ? 4 : 32; 167 int kMaxPushes = FLAG_optimize_for_size ? 4 : 32;
168 if (locals_count >= kMaxPushes) { 168 if (locals_count >= kMaxPushes) {
169 int loop_iterations = locals_count / kMaxPushes; 169 int loop_iterations = locals_count / kMaxPushes;
170 __ mov(r5, Operand(loop_iterations)); 170 __ mov(r5, Operand(loop_iterations));
171 __ mtctr(r5); 171 __ mtctr(r5);
172 Label loop_header; 172 Label loop_header;
173 __ bind(&loop_header); 173 __ bind(&loop_header);
(...skipping 5136 matching lines...) Expand 10 before | Expand all | Expand 10 after
5310 return ON_STACK_REPLACEMENT; 5310 return ON_STACK_REPLACEMENT;
5311 } 5311 }
5312 5312
5313 DCHECK(interrupt_address == 5313 DCHECK(interrupt_address ==
5314 isolate->builtins()->OsrAfterStackCheck()->entry()); 5314 isolate->builtins()->OsrAfterStackCheck()->entry());
5315 return OSR_AFTER_STACK_CHECK; 5315 return OSR_AFTER_STACK_CHECK;
5316 } 5316 }
5317 } // namespace internal 5317 } // namespace internal
5318 } // namespace v8 5318 } // namespace v8
5319 #endif // V8_TARGET_ARCH_PPC 5319 #endif // V8_TARGET_ARCH_PPC
OLDNEW
« no previous file with comments | « no previous file | src/ppc/builtins-ppc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698