OLD | NEW |
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_IA32 | 5 #if V8_TARGET_ARCH_IA32 |
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 Loading... |
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 5073 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5237 Assembler::target_address_at(call_target_address, | 5237 Assembler::target_address_at(call_target_address, |
5238 unoptimized_code)); | 5238 unoptimized_code)); |
5239 return OSR_AFTER_STACK_CHECK; | 5239 return OSR_AFTER_STACK_CHECK; |
5240 } | 5240 } |
5241 | 5241 |
5242 | 5242 |
5243 } // namespace internal | 5243 } // namespace internal |
5244 } // namespace v8 | 5244 } // namespace v8 |
5245 | 5245 |
5246 #endif // V8_TARGET_ARCH_IA32 | 5246 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |