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

Unified Diff: src/x64/code-stubs-x64.cc

Issue 6335016: Unification: introduce ExternalReference::pending_exception_address(). (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressing Mads' concerns Created 9 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/top.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/x64/code-stubs-x64.cc
diff --git a/src/x64/code-stubs-x64.cc b/src/x64/code-stubs-x64.cc
index e38591580b10e765c845bc5689d93445b240e8b1..cdccdee3f536191a30ff4e6f1442f01b8b089f11 100644
--- a/src/x64/code-stubs-x64.cc
+++ b/src/x64/code-stubs-x64.cc
@@ -2126,8 +2126,7 @@ void RegExpExecStub::Generate(MacroAssembler* masm) {
// stack overflow (on the backtrack stack) was detected in RegExp code but
// haven't created the exception yet. Handle that in the runtime system.
// TODO(592): Rerunning the RegExp to get the stack overflow exception.
- ExternalReference pending_exception_address(Top::k_pending_exception_address);
- __ movq(kScratchRegister, pending_exception_address);
+ __ movq(kScratchRegister, ExternalReference::pending_exception_address());
__ Cmp(kScratchRegister, Factory::the_hole_value());
__ j(equal, &runtime);
__ bind(&failure);
@@ -2885,8 +2884,7 @@ void CEntryStub::GenerateCore(MacroAssembler* masm,
__ j(equal, throw_out_of_memory_exception);
// Retrieve the pending exception and clear the variable.
- ExternalReference pending_exception_address(Top::k_pending_exception_address);
- __ movq(kScratchRegister, pending_exception_address);
+ __ movq(kScratchRegister, ExternalReference::pending_exception_address());
__ movq(rax, Operand(kScratchRegister, 0));
__ movq(rdx, ExternalReference::the_hole_value_location());
__ movq(rdx, Operand(rdx, 0));
@@ -2936,9 +2934,8 @@ void CEntryStub::GenerateThrowUncatchable(MacroAssembler* masm,
__ store_rax(external_caught);
// Set pending exception and rax to out of memory exception.
- ExternalReference pending_exception(Top::k_pending_exception_address);
__ movq(rax, Failure::OutOfMemoryException(), RelocInfo::NONE);
- __ store_rax(pending_exception);
+ __ store_rax(ExternalReference::pending_exception_address());
}
// Clear the context pointer.
@@ -3091,8 +3088,7 @@ void JSEntryStub::GenerateBody(MacroAssembler* masm, bool is_construct) {
// Caught exception: Store result (exception) in the pending
// exception field in the JSEnv and return a failure sentinel.
- ExternalReference pending_exception(Top::k_pending_exception_address);
- __ store_rax(pending_exception);
+ __ store_rax(ExternalReference::pending_exception_address());
__ movq(rax, Failure::Exception(), RelocInfo::NONE);
__ jmp(&exit);
@@ -3102,7 +3098,7 @@ void JSEntryStub::GenerateBody(MacroAssembler* masm, bool is_construct) {
// Clear any pending exceptions.
__ load_rax(ExternalReference::the_hole_value_location());
- __ store_rax(pending_exception);
+ __ store_rax(ExternalReference::pending_exception_address());
// Fake a receiver (NULL).
__ push(Immediate(0)); // receiver
« no previous file with comments | « src/top.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698