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

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

Issue 1344793002: X87: [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/x87/builtins-x87.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_X87 5 #if V8_TARGET_ARCH_X87
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 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 __ push(Immediate(isolate()->factory()->undefined_value())); 143 __ push(Immediate(isolate()->factory()->undefined_value()));
144 } else if (locals_count > 1) { 144 } else if (locals_count > 1) {
145 if (locals_count >= 128) { 145 if (locals_count >= 128) {
146 Label ok; 146 Label ok;
147 __ mov(ecx, esp); 147 __ mov(ecx, esp);
148 __ sub(ecx, Immediate(locals_count * kPointerSize)); 148 __ sub(ecx, Immediate(locals_count * kPointerSize));
149 ExternalReference stack_limit = 149 ExternalReference stack_limit =
150 ExternalReference::address_of_real_stack_limit(isolate()); 150 ExternalReference::address_of_real_stack_limit(isolate());
151 __ cmp(ecx, Operand::StaticVariable(stack_limit)); 151 __ cmp(ecx, Operand::StaticVariable(stack_limit));
152 __ j(above_equal, &ok, Label::kNear); 152 __ j(above_equal, &ok, Label::kNear);
153 __ InvokeBuiltin(Context::STACK_OVERFLOW_BUILTIN_INDEX, CALL_FUNCTION); 153 __ CallRuntime(Runtime::kThrowStackOverflow, 0);
154 __ bind(&ok); 154 __ bind(&ok);
155 } 155 }
156 __ mov(eax, Immediate(isolate()->factory()->undefined_value())); 156 __ mov(eax, Immediate(isolate()->factory()->undefined_value()));
157 const int kMaxPushes = 32; 157 const int kMaxPushes = 32;
158 if (locals_count >= kMaxPushes) { 158 if (locals_count >= kMaxPushes) {
159 int loop_iterations = locals_count / kMaxPushes; 159 int loop_iterations = locals_count / kMaxPushes;
160 __ mov(ecx, loop_iterations); 160 __ mov(ecx, loop_iterations);
161 Label loop_header; 161 Label loop_header;
162 __ bind(&loop_header); 162 __ bind(&loop_header);
163 // Do pushes. 163 // Do pushes.
(...skipping 4976 matching lines...) Expand 10 before | Expand all | Expand 10 after
5140 Assembler::target_address_at(call_target_address, 5140 Assembler::target_address_at(call_target_address,
5141 unoptimized_code)); 5141 unoptimized_code));
5142 return OSR_AFTER_STACK_CHECK; 5142 return OSR_AFTER_STACK_CHECK;
5143 } 5143 }
5144 5144
5145 5145
5146 } // namespace internal 5146 } // namespace internal
5147 } // namespace v8 5147 } // namespace v8
5148 5148
5149 #endif // V8_TARGET_ARCH_X87 5149 #endif // V8_TARGET_ARCH_X87
OLDNEW
« no previous file with comments | « no previous file | src/x87/builtins-x87.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698