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_X64 | 7 #if V8_TARGET_ARCH_X64 |
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 390 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
401 __ call(isolate()->builtins()->InterruptCheck(), | 401 __ call(isolate()->builtins()->InterruptCheck(), |
402 RelocInfo::CODE_TARGET); | 402 RelocInfo::CODE_TARGET); |
403 __ Pop(rax); | 403 __ Pop(rax); |
404 EmitProfilingCounterReset(); | 404 EmitProfilingCounterReset(); |
405 __ bind(&ok); | 405 __ bind(&ok); |
406 #ifdef DEBUG | 406 #ifdef DEBUG |
407 // Add a label for checking the size of the code used for returning. | 407 // Add a label for checking the size of the code used for returning. |
408 Label check_exit_codesize; | 408 Label check_exit_codesize; |
409 masm_->bind(&check_exit_codesize); | 409 masm_->bind(&check_exit_codesize); |
410 #endif | 410 #endif |
411 CodeGenerator::RecordPositions(masm_, function()->end_position() - 1); | 411 if (function()->end_position() != RelocInfo::kNoPosition) { |
| 412 CodeGenerator::RecordPositions(masm_, function()->end_position() - 1); |
| 413 } |
412 __ RecordJSReturn(); | 414 __ RecordJSReturn(); |
413 // Do not use the leave instruction here because it is too short to | 415 // Do not use the leave instruction here because it is too short to |
414 // patch with the code required by the debugger. | 416 // patch with the code required by the debugger. |
415 __ movp(rsp, rbp); | 417 __ movp(rsp, rbp); |
416 __ popq(rbp); | 418 __ popq(rbp); |
417 int no_frame_start = masm_->pc_offset(); | 419 int no_frame_start = masm_->pc_offset(); |
418 | 420 |
419 int arguments_bytes = (info_->scope()->num_parameters() + 1) * kPointerSize; | 421 int arguments_bytes = (info_->scope()->num_parameters() + 1) * kPointerSize; |
420 __ Ret(arguments_bytes, rcx); | 422 __ Ret(arguments_bytes, rcx); |
421 | 423 |
(...skipping 4812 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5234 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), | 5236 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), |
5235 Assembler::target_address_at(call_target_address, | 5237 Assembler::target_address_at(call_target_address, |
5236 unoptimized_code)); | 5238 unoptimized_code)); |
5237 return OSR_AFTER_STACK_CHECK; | 5239 return OSR_AFTER_STACK_CHECK; |
5238 } | 5240 } |
5239 | 5241 |
5240 | 5242 |
5241 } } // namespace v8::internal | 5243 } } // namespace v8::internal |
5242 | 5244 |
5243 #endif // V8_TARGET_ARCH_X64 | 5245 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |