| 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
|
|
|