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 #if V8_TARGET_ARCH_X64 | 5 #if V8_TARGET_ARCH_X64 |
6 | 6 |
7 #include "src/code-stubs.h" | 7 #include "src/code-stubs.h" |
8 #include "src/api-arguments.h" | 8 #include "src/api-arguments.h" |
9 #include "src/bootstrapper.h" | 9 #include "src/bootstrapper.h" |
10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
(...skipping 1771 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1782 ExternalReference pending_exception(Isolate::kPendingExceptionAddress, | 1782 ExternalReference pending_exception(Isolate::kPendingExceptionAddress, |
1783 isolate()); | 1783 isolate()); |
1784 __ Store(pending_exception, rax); | 1784 __ Store(pending_exception, rax); |
1785 __ LoadRoot(rax, Heap::kExceptionRootIndex); | 1785 __ LoadRoot(rax, Heap::kExceptionRootIndex); |
1786 __ jmp(&exit); | 1786 __ jmp(&exit); |
1787 | 1787 |
1788 // Invoke: Link this frame into the handler chain. | 1788 // Invoke: Link this frame into the handler chain. |
1789 __ bind(&invoke); | 1789 __ bind(&invoke); |
1790 __ PushStackHandler(); | 1790 __ PushStackHandler(); |
1791 | 1791 |
1792 // Clear any pending exceptions. | |
1793 __ LoadRoot(rax, Heap::kTheHoleValueRootIndex); | |
1794 __ Store(pending_exception, rax); | |
1795 | |
1796 // Fake a receiver (NULL). | 1792 // Fake a receiver (NULL). |
1797 __ Push(Immediate(0)); // receiver | 1793 __ Push(Immediate(0)); // receiver |
1798 | 1794 |
1799 // Invoke the function by calling through JS entry trampoline builtin and | 1795 // Invoke the function by calling through JS entry trampoline builtin and |
1800 // pop the faked function when we return. We load the address from an | 1796 // pop the faked function when we return. We load the address from an |
1801 // external reference instead of inlining the call target address directly | 1797 // external reference instead of inlining the call target address directly |
1802 // in the code, because the builtin stubs may not have been generated yet | 1798 // in the code, because the builtin stubs may not have been generated yet |
1803 // at the time this code is generated. | 1799 // at the time this code is generated. |
1804 if (type() == StackFrame::ENTRY_CONSTRUCT) { | 1800 if (type() == StackFrame::ENTRY_CONSTRUCT) { |
1805 ExternalReference construct_entry(Builtins::kJSConstructEntryTrampoline, | 1801 ExternalReference construct_entry(Builtins::kJSConstructEntryTrampoline, |
(...skipping 3402 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5208 kStackUnwindSpace, nullptr, return_value_operand, | 5204 kStackUnwindSpace, nullptr, return_value_operand, |
5209 NULL); | 5205 NULL); |
5210 } | 5206 } |
5211 | 5207 |
5212 #undef __ | 5208 #undef __ |
5213 | 5209 |
5214 } // namespace internal | 5210 } // namespace internal |
5215 } // namespace v8 | 5211 } // namespace v8 |
5216 | 5212 |
5217 #endif // V8_TARGET_ARCH_X64 | 5213 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |