Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(9)

Side by Side Diff: src/x64/code-stubs-x64.cc

Issue 2208663002: Clear exceptions in Invoke instead of JSEntryStub (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@port-no-sideeffect-to-string
Patch Set: Rebase Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/mips64/code-stubs-mips64.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « src/mips64/code-stubs-mips64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698