| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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/bootstrapper.h" | 9 #include "src/bootstrapper.h" |
| 10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
| (...skipping 2397 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2408 if (result_size() > 1) { | 2408 if (result_size() > 1) { |
| 2409 DCHECK_EQ(2, result_size()); | 2409 DCHECK_EQ(2, result_size()); |
| 2410 // Read result values stored on stack. Result is stored | 2410 // Read result values stored on stack. Result is stored |
| 2411 // above the four argument mirror slots and the two | 2411 // above the four argument mirror slots and the two |
| 2412 // Arguments object slots. | 2412 // Arguments object slots. |
| 2413 __ movq(rax, Operand(rsp, 6 * kRegisterSize)); | 2413 __ movq(rax, Operand(rsp, 6 * kRegisterSize)); |
| 2414 __ movq(rdx, Operand(rsp, 7 * kRegisterSize)); | 2414 __ movq(rdx, Operand(rsp, 7 * kRegisterSize)); |
| 2415 } | 2415 } |
| 2416 #endif // _WIN64 | 2416 #endif // _WIN64 |
| 2417 | 2417 |
| 2418 // Runtime functions should not return 'the hole'. Allowing it to escape may | |
| 2419 // lead to crashes in the IC code later. | |
| 2420 if (FLAG_debug_code) { | |
| 2421 Label okay; | |
| 2422 __ CompareRoot(rax, Heap::kTheHoleValueRootIndex); | |
| 2423 __ j(not_equal, &okay, Label::kNear); | |
| 2424 __ int3(); | |
| 2425 __ bind(&okay); | |
| 2426 } | |
| 2427 | |
| 2428 // Check result for exception sentinel. | 2418 // Check result for exception sentinel. |
| 2429 Label exception_returned; | 2419 Label exception_returned; |
| 2430 __ CompareRoot(rax, Heap::kExceptionRootIndex); | 2420 __ CompareRoot(rax, Heap::kExceptionRootIndex); |
| 2431 __ j(equal, &exception_returned); | 2421 __ j(equal, &exception_returned); |
| 2432 | 2422 |
| 2433 // Check that there is no pending exception, otherwise we | 2423 // Check that there is no pending exception, otherwise we |
| 2434 // should have returned the exception sentinel. | 2424 // should have returned the exception sentinel. |
| 2435 if (FLAG_debug_code) { | 2425 if (FLAG_debug_code) { |
| 2436 Label okay; | 2426 Label okay; |
| 2437 __ LoadRoot(r14, Heap::kTheHoleValueRootIndex); | 2427 __ LoadRoot(r14, Heap::kTheHoleValueRootIndex); |
| (...skipping 2928 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5366 CallApiFunctionAndReturn(masm, api_function_address, thunk_ref, getter_arg, | 5356 CallApiFunctionAndReturn(masm, api_function_address, thunk_ref, getter_arg, |
| 5367 kStackSpace, nullptr, return_value_operand, NULL); | 5357 kStackSpace, nullptr, return_value_operand, NULL); |
| 5368 } | 5358 } |
| 5369 | 5359 |
| 5370 | 5360 |
| 5371 #undef __ | 5361 #undef __ |
| 5372 | 5362 |
| 5373 } } // namespace v8::internal | 5363 } } // namespace v8::internal |
| 5374 | 5364 |
| 5375 #endif // V8_TARGET_ARCH_X64 | 5365 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |