| OLD | NEW |
| 1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 200 __ bind(&return_label_); | 200 __ bind(&return_label_); |
| 201 if (FLAG_trace) { | 201 if (FLAG_trace) { |
| 202 __ push(rax); | 202 __ push(rax); |
| 203 __ CallRuntime(Runtime::kTraceExit, 1); | 203 __ CallRuntime(Runtime::kTraceExit, 1); |
| 204 } | 204 } |
| 205 #ifdef DEBUG | 205 #ifdef DEBUG |
| 206 // Add a label for checking the size of the code used for returning. | 206 // Add a label for checking the size of the code used for returning. |
| 207 Label check_exit_codesize; | 207 Label check_exit_codesize; |
| 208 masm_->bind(&check_exit_codesize); | 208 masm_->bind(&check_exit_codesize); |
| 209 #endif | 209 #endif |
| 210 CodeGenerator::RecordPositions(masm_, function()->end_position()); | 210 CodeGenerator::RecordPositions(masm_, function()->end_position() - 1); |
| 211 __ RecordJSReturn(); | 211 __ RecordJSReturn(); |
| 212 // Do not use the leave instruction here because it is too short to | 212 // Do not use the leave instruction here because it is too short to |
| 213 // patch with the code required by the debugger. | 213 // patch with the code required by the debugger. |
| 214 __ movq(rsp, rbp); | 214 __ movq(rsp, rbp); |
| 215 __ pop(rbp); | 215 __ pop(rbp); |
| 216 __ ret((scope()->num_parameters() + 1) * kPointerSize); | 216 __ ret((scope()->num_parameters() + 1) * kPointerSize); |
| 217 #ifdef ENABLE_DEBUGGER_SUPPORT | 217 #ifdef ENABLE_DEBUGGER_SUPPORT |
| 218 // Add padding that will be overwritten by a debugger breakpoint. We | 218 // Add padding that will be overwritten by a debugger breakpoint. We |
| 219 // have just generated "movq rsp, rbp; pop rbp; ret k" with length 7 | 219 // have just generated "movq rsp, rbp; pop rbp; ret k" with length 7 |
| 220 // (3 + 1 + 3). | 220 // (3 + 1 + 3). |
| (...skipping 3040 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3261 __ ret(0); | 3261 __ ret(0); |
| 3262 } | 3262 } |
| 3263 | 3263 |
| 3264 | 3264 |
| 3265 #undef __ | 3265 #undef __ |
| 3266 | 3266 |
| 3267 | 3267 |
| 3268 } } // namespace v8::internal | 3268 } } // namespace v8::internal |
| 3269 | 3269 |
| 3270 #endif // V8_TARGET_ARCH_X64 | 3270 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |