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

Side by Side Diff: src/ia32/code-stubs-ia32.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/flag-definitions.h ('k') | src/messages.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #if V8_TARGET_ARCH_IA32 5 #if V8_TARGET_ARCH_IA32
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/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/bootstrapper.h" 10 #include "src/bootstrapper.h"
(...skipping 1829 matching lines...) Expand 10 before | Expand all | Expand 10 after
1840 ExternalReference pending_exception(Isolate::kPendingExceptionAddress, 1840 ExternalReference pending_exception(Isolate::kPendingExceptionAddress,
1841 isolate()); 1841 isolate());
1842 __ mov(Operand::StaticVariable(pending_exception), eax); 1842 __ mov(Operand::StaticVariable(pending_exception), eax);
1843 __ mov(eax, Immediate(isolate()->factory()->exception())); 1843 __ mov(eax, Immediate(isolate()->factory()->exception()));
1844 __ jmp(&exit); 1844 __ jmp(&exit);
1845 1845
1846 // Invoke: Link this frame into the handler chain. 1846 // Invoke: Link this frame into the handler chain.
1847 __ bind(&invoke); 1847 __ bind(&invoke);
1848 __ PushStackHandler(); 1848 __ PushStackHandler();
1849 1849
1850 // Clear any pending exceptions.
1851 __ mov(edx, Immediate(isolate()->factory()->the_hole_value()));
1852 __ mov(Operand::StaticVariable(pending_exception), edx);
1853
1854 // Fake a receiver (NULL). 1850 // Fake a receiver (NULL).
1855 __ push(Immediate(0)); // receiver 1851 __ push(Immediate(0)); // receiver
1856 1852
1857 // Invoke the function by calling through JS entry trampoline builtin and 1853 // Invoke the function by calling through JS entry trampoline builtin and
1858 // pop the faked function when we return. Notice that we cannot store a 1854 // pop the faked function when we return. Notice that we cannot store a
1859 // reference to the trampoline code directly in this stub, because the 1855 // reference to the trampoline code directly in this stub, because the
1860 // builtin stubs may not have been generated yet. 1856 // builtin stubs may not have been generated yet.
1861 if (type() == StackFrame::ENTRY_CONSTRUCT) { 1857 if (type() == StackFrame::ENTRY_CONSTRUCT) {
1862 ExternalReference construct_entry(Builtins::kJSConstructEntryTrampoline, 1858 ExternalReference construct_entry(Builtins::kJSConstructEntryTrampoline,
1863 isolate()); 1859 isolate());
(...skipping 3626 matching lines...) Expand 10 before | Expand all | Expand 10 after
5490 kStackUnwindSpace, nullptr, return_value_operand, 5486 kStackUnwindSpace, nullptr, return_value_operand,
5491 NULL); 5487 NULL);
5492 } 5488 }
5493 5489
5494 #undef __ 5490 #undef __
5495 5491
5496 } // namespace internal 5492 } // namespace internal
5497 } // namespace v8 5493 } // namespace v8
5498 5494
5499 #endif // V8_TARGET_ARCH_IA32 5495 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/flag-definitions.h ('k') | src/messages.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698