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 #include "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #if V8_TARGET_ARCH_X87 | 7 #if V8_TARGET_ARCH_X87 |
8 | 8 |
9 #include "src/code-factory.h" | 9 #include "src/code-factory.h" |
10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
(...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
395 __ call(isolate()->builtins()->InterruptCheck(), | 395 __ call(isolate()->builtins()->InterruptCheck(), |
396 RelocInfo::CODE_TARGET); | 396 RelocInfo::CODE_TARGET); |
397 __ pop(eax); | 397 __ pop(eax); |
398 EmitProfilingCounterReset(); | 398 EmitProfilingCounterReset(); |
399 __ bind(&ok); | 399 __ bind(&ok); |
400 #ifdef DEBUG | 400 #ifdef DEBUG |
401 // Add a label for checking the size of the code used for returning. | 401 // Add a label for checking the size of the code used for returning. |
402 Label check_exit_codesize; | 402 Label check_exit_codesize; |
403 masm_->bind(&check_exit_codesize); | 403 masm_->bind(&check_exit_codesize); |
404 #endif | 404 #endif |
405 SetSourcePosition(function()->end_position() - 1); | 405 if (function()->end_position() != RelocInfo::kNoPosition) { |
| 406 SetSourcePosition(function()->end_position() - 1); |
| 407 } |
406 __ RecordJSReturn(); | 408 __ RecordJSReturn(); |
407 // Do not use the leave instruction here because it is too short to | 409 // Do not use the leave instruction here because it is too short to |
408 // patch with the code required by the debugger. | 410 // patch with the code required by the debugger. |
409 __ mov(esp, ebp); | 411 __ mov(esp, ebp); |
410 int no_frame_start = masm_->pc_offset(); | 412 int no_frame_start = masm_->pc_offset(); |
411 __ pop(ebp); | 413 __ pop(ebp); |
412 | 414 |
413 int arguments_bytes = (info_->scope()->num_parameters() + 1) * kPointerSize; | 415 int arguments_bytes = (info_->scope()->num_parameters() + 1) * kPointerSize; |
414 __ Ret(arguments_bytes, ecx); | 416 __ Ret(arguments_bytes, ecx); |
415 // Check that the size of the code used for returning is large enough | 417 // Check that the size of the code used for returning is large enough |
(...skipping 4788 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5204 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), | 5206 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), |
5205 Assembler::target_address_at(call_target_address, | 5207 Assembler::target_address_at(call_target_address, |
5206 unoptimized_code)); | 5208 unoptimized_code)); |
5207 return OSR_AFTER_STACK_CHECK; | 5209 return OSR_AFTER_STACK_CHECK; |
5208 } | 5210 } |
5209 | 5211 |
5210 | 5212 |
5211 } } // namespace v8::internal | 5213 } } // namespace v8::internal |
5212 | 5214 |
5213 #endif // V8_TARGET_ARCH_X87 | 5215 #endif // V8_TARGET_ARCH_X87 |
OLD | NEW |