Use more style-guide-friendly names for some constants.

This is a renaming only change.

R=erik.corry@gmail.com
BUG=
TEST=

Review URL: http://codereview.chromium.org/7849020

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9200 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent d409a49d
...@@ -3432,7 +3432,7 @@ void CEntryStub::GenerateCore(MacroAssembler* masm, ...@@ -3432,7 +3432,7 @@ void CEntryStub::GenerateCore(MacroAssembler* masm,
// Retrieve the pending exception and clear the variable. // Retrieve the pending exception and clear the variable.
__ mov(ip, Operand(ExternalReference::the_hole_value_location(isolate))); __ mov(ip, Operand(ExternalReference::the_hole_value_location(isolate)));
__ ldr(r3, MemOperand(ip)); __ ldr(r3, MemOperand(ip));
__ mov(ip, Operand(ExternalReference(Isolate::k_pending_exception_address, __ mov(ip, Operand(ExternalReference(Isolate::kPendingExceptionAddress,
isolate))); isolate)));
__ ldr(r0, MemOperand(ip)); __ ldr(r0, MemOperand(ip));
__ str(r3, MemOperand(ip)); __ str(r3, MemOperand(ip));
...@@ -3567,7 +3567,7 @@ void JSEntryStub::GenerateBody(MacroAssembler* masm, bool is_construct) { ...@@ -3567,7 +3567,7 @@ void JSEntryStub::GenerateBody(MacroAssembler* masm, bool is_construct) {
__ mov(r7, Operand(Smi::FromInt(marker))); __ mov(r7, Operand(Smi::FromInt(marker)));
__ mov(r6, Operand(Smi::FromInt(marker))); __ mov(r6, Operand(Smi::FromInt(marker)));
__ mov(r5, __ mov(r5,
Operand(ExternalReference(Isolate::k_c_entry_fp_address, isolate))); Operand(ExternalReference(Isolate::kCEntryFPAddress, isolate)));
__ ldr(r5, MemOperand(r5)); __ ldr(r5, MemOperand(r5));
__ Push(r8, r7, r6, r5); __ Push(r8, r7, r6, r5);
...@@ -3576,7 +3576,7 @@ void JSEntryStub::GenerateBody(MacroAssembler* masm, bool is_construct) { ...@@ -3576,7 +3576,7 @@ void JSEntryStub::GenerateBody(MacroAssembler* masm, bool is_construct) {
// If this is the outermost JS call, set js_entry_sp value. // If this is the outermost JS call, set js_entry_sp value.
Label non_outermost_js; Label non_outermost_js;
ExternalReference js_entry_sp(Isolate::k_js_entry_sp_address, isolate); ExternalReference js_entry_sp(Isolate::kJSEntrySPAddress, isolate);
__ mov(r5, Operand(ExternalReference(js_entry_sp))); __ mov(r5, Operand(ExternalReference(js_entry_sp)));
__ ldr(r6, MemOperand(r5)); __ ldr(r6, MemOperand(r5));
__ cmp(r6, Operand::Zero()); __ cmp(r6, Operand::Zero());
...@@ -3597,7 +3597,7 @@ void JSEntryStub::GenerateBody(MacroAssembler* masm, bool is_construct) { ...@@ -3597,7 +3597,7 @@ void JSEntryStub::GenerateBody(MacroAssembler* masm, bool is_construct) {
// exception field in the JSEnv and return a failure sentinel. // exception field in the JSEnv and return a failure sentinel.
// Coming in here the fp will be invalid because the PushTryHandler below // Coming in here the fp will be invalid because the PushTryHandler below
// sets it to 0 to signal the existence of the JSEntry frame. // sets it to 0 to signal the existence of the JSEntry frame.
__ mov(ip, Operand(ExternalReference(Isolate::k_pending_exception_address, __ mov(ip, Operand(ExternalReference(Isolate::kPendingExceptionAddress,
isolate))); isolate)));
__ str(r0, MemOperand(ip)); __ str(r0, MemOperand(ip));
__ mov(r0, Operand(reinterpret_cast<int32_t>(Failure::Exception()))); __ mov(r0, Operand(reinterpret_cast<int32_t>(Failure::Exception())));
...@@ -3615,7 +3615,7 @@ void JSEntryStub::GenerateBody(MacroAssembler* masm, bool is_construct) { ...@@ -3615,7 +3615,7 @@ void JSEntryStub::GenerateBody(MacroAssembler* masm, bool is_construct) {
// Clear any pending exceptions. // Clear any pending exceptions.
__ mov(ip, Operand(ExternalReference::the_hole_value_location(isolate))); __ mov(ip, Operand(ExternalReference::the_hole_value_location(isolate)));
__ ldr(r5, MemOperand(ip)); __ ldr(r5, MemOperand(ip));
__ mov(ip, Operand(ExternalReference(Isolate::k_pending_exception_address, __ mov(ip, Operand(ExternalReference(Isolate::kPendingExceptionAddress,
isolate))); isolate)));
__ str(r5, MemOperand(ip)); __ str(r5, MemOperand(ip));
...@@ -3662,7 +3662,7 @@ void JSEntryStub::GenerateBody(MacroAssembler* masm, bool is_construct) { ...@@ -3662,7 +3662,7 @@ void JSEntryStub::GenerateBody(MacroAssembler* masm, bool is_construct) {
// Restore the top frame descriptors from the stack. // Restore the top frame descriptors from the stack.
__ pop(r3); __ pop(r3);
__ mov(ip, __ mov(ip,
Operand(ExternalReference(Isolate::k_c_entry_fp_address, isolate))); Operand(ExternalReference(Isolate::kCEntryFPAddress, isolate)));
__ str(r3, MemOperand(ip)); __ str(r3, MemOperand(ip));
// Reset the stack to the callee saved registers. // Reset the stack to the callee saved registers.
...@@ -4534,7 +4534,7 @@ void RegExpExecStub::Generate(MacroAssembler* masm) { ...@@ -4534,7 +4534,7 @@ void RegExpExecStub::Generate(MacroAssembler* masm) {
// TODO(592): Rerunning the RegExp to get the stack overflow exception. // TODO(592): Rerunning the RegExp to get the stack overflow exception.
__ mov(r1, Operand(ExternalReference::the_hole_value_location(isolate))); __ mov(r1, Operand(ExternalReference::the_hole_value_location(isolate)));
__ ldr(r1, MemOperand(r1, 0)); __ ldr(r1, MemOperand(r1, 0));
__ mov(r2, Operand(ExternalReference(Isolate::k_pending_exception_address, __ mov(r2, Operand(ExternalReference(Isolate::kPendingExceptionAddress,
isolate))); isolate)));
__ ldr(r0, MemOperand(r2, 0)); __ ldr(r0, MemOperand(r2, 0));
__ cmp(r0, r1); __ cmp(r0, r1);
......
...@@ -760,9 +760,9 @@ void MacroAssembler::EnterExitFrame(bool save_doubles, int stack_space) { ...@@ -760,9 +760,9 @@ void MacroAssembler::EnterExitFrame(bool save_doubles, int stack_space) {
str(ip, MemOperand(fp, ExitFrameConstants::kCodeOffset)); str(ip, MemOperand(fp, ExitFrameConstants::kCodeOffset));
// Save the frame pointer and the context in top. // Save the frame pointer and the context in top.
mov(ip, Operand(ExternalReference(Isolate::k_c_entry_fp_address, isolate()))); mov(ip, Operand(ExternalReference(Isolate::kCEntryFPAddress, isolate())));
str(fp, MemOperand(ip)); str(fp, MemOperand(ip));
mov(ip, Operand(ExternalReference(Isolate::k_context_address, isolate()))); mov(ip, Operand(ExternalReference(Isolate::kContextAddress, isolate())));
str(cp, MemOperand(ip)); str(cp, MemOperand(ip));
// Optionally save all double registers. // Optionally save all double registers.
...@@ -838,11 +838,11 @@ void MacroAssembler::LeaveExitFrame(bool save_doubles, ...@@ -838,11 +838,11 @@ void MacroAssembler::LeaveExitFrame(bool save_doubles,
// Clear top frame. // Clear top frame.
mov(r3, Operand(0, RelocInfo::NONE)); mov(r3, Operand(0, RelocInfo::NONE));
mov(ip, Operand(ExternalReference(Isolate::k_c_entry_fp_address, isolate()))); mov(ip, Operand(ExternalReference(Isolate::kCEntryFPAddress, isolate())));
str(r3, MemOperand(ip)); str(r3, MemOperand(ip));
// Restore current context from top and clear it in debug mode. // Restore current context from top and clear it in debug mode.
mov(ip, Operand(ExternalReference(Isolate::k_context_address, isolate()))); mov(ip, Operand(ExternalReference(Isolate::kContextAddress, isolate())));
ldr(cp, MemOperand(ip)); ldr(cp, MemOperand(ip));
#ifdef DEBUG #ifdef DEBUG
str(r3, MemOperand(ip)); str(r3, MemOperand(ip));
...@@ -1118,7 +1118,7 @@ void MacroAssembler::PushTryHandler(CodeLocation try_location, ...@@ -1118,7 +1118,7 @@ void MacroAssembler::PushTryHandler(CodeLocation try_location,
} }
stm(db_w, sp, r3.bit() | cp.bit() | fp.bit() | lr.bit()); stm(db_w, sp, r3.bit() | cp.bit() | fp.bit() | lr.bit());
// Save the current handler as the next handler. // Save the current handler as the next handler.
mov(r3, Operand(ExternalReference(Isolate::k_handler_address, isolate()))); mov(r3, Operand(ExternalReference(Isolate::kHandlerAddress, isolate())));
ldr(r1, MemOperand(r3)); ldr(r1, MemOperand(r3));
push(r1); push(r1);
// Link this handler as the new current one. // Link this handler as the new current one.
...@@ -1134,7 +1134,7 @@ void MacroAssembler::PushTryHandler(CodeLocation try_location, ...@@ -1134,7 +1134,7 @@ void MacroAssembler::PushTryHandler(CodeLocation try_location,
mov(r7, Operand(0, RelocInfo::NONE)); // NULL frame pointer. mov(r7, Operand(0, RelocInfo::NONE)); // NULL frame pointer.
stm(db_w, sp, r5.bit() | r6.bit() | r7.bit() | lr.bit()); stm(db_w, sp, r5.bit() | r6.bit() | r7.bit() | lr.bit());
// Save the current handler as the next handler. // Save the current handler as the next handler.
mov(r7, Operand(ExternalReference(Isolate::k_handler_address, isolate()))); mov(r7, Operand(ExternalReference(Isolate::kHandlerAddress, isolate())));
ldr(r6, MemOperand(r7)); ldr(r6, MemOperand(r7));
push(r6); push(r6);
// Link this handler as the new current one. // Link this handler as the new current one.
...@@ -1146,7 +1146,7 @@ void MacroAssembler::PushTryHandler(CodeLocation try_location, ...@@ -1146,7 +1146,7 @@ void MacroAssembler::PushTryHandler(CodeLocation try_location,
void MacroAssembler::PopTryHandler() { void MacroAssembler::PopTryHandler() {
STATIC_ASSERT(StackHandlerConstants::kNextOffset == 0); STATIC_ASSERT(StackHandlerConstants::kNextOffset == 0);
pop(r1); pop(r1);
mov(ip, Operand(ExternalReference(Isolate::k_handler_address, isolate()))); mov(ip, Operand(ExternalReference(Isolate::kHandlerAddress, isolate())));
add(sp, sp, Operand(StackHandlerConstants::kSize - kPointerSize)); add(sp, sp, Operand(StackHandlerConstants::kSize - kPointerSize));
str(r1, MemOperand(ip)); str(r1, MemOperand(ip));
} }
...@@ -1166,7 +1166,7 @@ void MacroAssembler::Throw(Register value) { ...@@ -1166,7 +1166,7 @@ void MacroAssembler::Throw(Register value) {
} }
// Drop the sp to the top of the handler. // Drop the sp to the top of the handler.
mov(r3, Operand(ExternalReference(Isolate::k_handler_address, isolate()))); mov(r3, Operand(ExternalReference(Isolate::kHandlerAddress, isolate())));
ldr(sp, MemOperand(r3)); ldr(sp, MemOperand(r3));
// Restore the next handler. // Restore the next handler.
...@@ -1206,7 +1206,7 @@ void MacroAssembler::ThrowUncatchable(UncatchableExceptionType type, ...@@ -1206,7 +1206,7 @@ void MacroAssembler::ThrowUncatchable(UncatchableExceptionType type,
} }
// Drop sp to the top stack handler. // Drop sp to the top stack handler.
mov(r3, Operand(ExternalReference(Isolate::k_handler_address, isolate()))); mov(r3, Operand(ExternalReference(Isolate::kHandlerAddress, isolate())));
ldr(sp, MemOperand(r3)); ldr(sp, MemOperand(r3));
// Unwind the handlers until the ENTRY handler is found. // Unwind the handlers until the ENTRY handler is found.
...@@ -1230,7 +1230,7 @@ void MacroAssembler::ThrowUncatchable(UncatchableExceptionType type, ...@@ -1230,7 +1230,7 @@ void MacroAssembler::ThrowUncatchable(UncatchableExceptionType type,
if (type == OUT_OF_MEMORY) { if (type == OUT_OF_MEMORY) {
// Set external caught exception to false. // Set external caught exception to false.
ExternalReference external_caught( ExternalReference external_caught(
Isolate::k_external_caught_exception_address, isolate()); Isolate::kExternalCaughtExceptionAddress, isolate());
mov(r0, Operand(false, RelocInfo::NONE)); mov(r0, Operand(false, RelocInfo::NONE));
mov(r2, Operand(external_caught)); mov(r2, Operand(external_caught));
str(r0, MemOperand(r2)); str(r0, MemOperand(r2));
...@@ -1238,7 +1238,7 @@ void MacroAssembler::ThrowUncatchable(UncatchableExceptionType type, ...@@ -1238,7 +1238,7 @@ void MacroAssembler::ThrowUncatchable(UncatchableExceptionType type,
// Set pending exception and r0 to out of memory exception. // Set pending exception and r0 to out of memory exception.
Failure* out_of_memory = Failure::OutOfMemoryException(); Failure* out_of_memory = Failure::OutOfMemoryException();
mov(r0, Operand(reinterpret_cast<int32_t>(out_of_memory))); mov(r0, Operand(reinterpret_cast<int32_t>(out_of_memory)));
mov(r2, Operand(ExternalReference(Isolate::k_pending_exception_address, mov(r2, Operand(ExternalReference(Isolate::kPendingExceptionAddress,
isolate()))); isolate())));
str(r0, MemOperand(r2)); str(r0, MemOperand(r2));
} }
......
...@@ -3551,7 +3551,7 @@ void RegExpExecStub::Generate(MacroAssembler* masm) { ...@@ -3551,7 +3551,7 @@ void RegExpExecStub::Generate(MacroAssembler* masm) {
// stack overflow (on the backtrack stack) was detected in RegExp code but // stack overflow (on the backtrack stack) was detected in RegExp code but
// haven't created the exception yet. Handle that in the runtime system. // haven't created the exception yet. Handle that in the runtime system.
// TODO(592): Rerunning the RegExp to get the stack overflow exception. // TODO(592): Rerunning the RegExp to get the stack overflow exception.
ExternalReference pending_exception(Isolate::k_pending_exception_address, ExternalReference pending_exception(Isolate::kPendingExceptionAddress,
masm->isolate()); masm->isolate());
__ mov(edx, __ mov(edx,
Operand::StaticVariable(ExternalReference::the_hole_value_location( Operand::StaticVariable(ExternalReference::the_hole_value_location(
...@@ -4341,7 +4341,7 @@ void CEntryStub::GenerateCore(MacroAssembler* masm, ...@@ -4341,7 +4341,7 @@ void CEntryStub::GenerateCore(MacroAssembler* masm,
__ j(zero, &failure_returned); __ j(zero, &failure_returned);
ExternalReference pending_exception_address( ExternalReference pending_exception_address(
Isolate::k_pending_exception_address, masm->isolate()); Isolate::kPendingExceptionAddress, masm->isolate());
// Check that there is no pending exception, otherwise we // Check that there is no pending exception, otherwise we
// should have returned some failure value. // should have returned some failure value.
...@@ -4482,11 +4482,11 @@ void JSEntryStub::GenerateBody(MacroAssembler* masm, bool is_construct) { ...@@ -4482,11 +4482,11 @@ void JSEntryStub::GenerateBody(MacroAssembler* masm, bool is_construct) {
__ push(ebx); __ push(ebx);
// Save copies of the top frame descriptor on the stack. // Save copies of the top frame descriptor on the stack.
ExternalReference c_entry_fp(Isolate::k_c_entry_fp_address, masm->isolate()); ExternalReference c_entry_fp(Isolate::kCEntryFPAddress, masm->isolate());
__ push(Operand::StaticVariable(c_entry_fp)); __ push(Operand::StaticVariable(c_entry_fp));
// If this is the outermost JS call, set js_entry_sp value. // If this is the outermost JS call, set js_entry_sp value.
ExternalReference js_entry_sp(Isolate::k_js_entry_sp_address, ExternalReference js_entry_sp(Isolate::kJSEntrySPAddress,
masm->isolate()); masm->isolate());
__ cmp(Operand::StaticVariable(js_entry_sp), Immediate(0)); __ cmp(Operand::StaticVariable(js_entry_sp), Immediate(0));
__ j(not_equal, &not_outermost_js, Label::kNear); __ j(not_equal, &not_outermost_js, Label::kNear);
...@@ -4503,7 +4503,7 @@ void JSEntryStub::GenerateBody(MacroAssembler* masm, bool is_construct) { ...@@ -4503,7 +4503,7 @@ void JSEntryStub::GenerateBody(MacroAssembler* masm, bool is_construct) {
// Caught exception: Store result (exception) in the pending // Caught exception: Store result (exception) in the pending
// exception field in the JSEnv and return a failure sentinel. // exception field in the JSEnv and return a failure sentinel.
ExternalReference pending_exception(Isolate::k_pending_exception_address, ExternalReference pending_exception(Isolate::kPendingExceptionAddress,
masm->isolate()); masm->isolate());
__ mov(Operand::StaticVariable(pending_exception), eax); __ mov(Operand::StaticVariable(pending_exception), eax);
__ mov(eax, reinterpret_cast<int32_t>(Failure::Exception())); __ mov(eax, reinterpret_cast<int32_t>(Failure::Exception()));
...@@ -4554,7 +4554,7 @@ void JSEntryStub::GenerateBody(MacroAssembler* masm, bool is_construct) { ...@@ -4554,7 +4554,7 @@ void JSEntryStub::GenerateBody(MacroAssembler* masm, bool is_construct) {
// Restore the top frame descriptor from the stack. // Restore the top frame descriptor from the stack.
__ pop(Operand::StaticVariable(ExternalReference( __ pop(Operand::StaticVariable(ExternalReference(
Isolate::k_c_entry_fp_address, Isolate::kCEntryFPAddress,
masm->isolate()))); masm->isolate())));
// Restore callee-saved registers (C calling conventions). // Restore callee-saved registers (C calling conventions).
......
...@@ -437,9 +437,9 @@ void MacroAssembler::EnterExitFramePrologue() { ...@@ -437,9 +437,9 @@ void MacroAssembler::EnterExitFramePrologue() {
push(Immediate(CodeObject())); // Accessed from ExitFrame::code_slot. push(Immediate(CodeObject())); // Accessed from ExitFrame::code_slot.
// Save the frame pointer and the context in top. // Save the frame pointer and the context in top.
ExternalReference c_entry_fp_address(Isolate::k_c_entry_fp_address, ExternalReference c_entry_fp_address(Isolate::kCEntryFPAddress,
isolate()); isolate());
ExternalReference context_address(Isolate::k_context_address, ExternalReference context_address(Isolate::kContextAddress,
isolate()); isolate());
mov(Operand::StaticVariable(c_entry_fp_address), ebp); mov(Operand::StaticVariable(c_entry_fp_address), ebp);
mov(Operand::StaticVariable(context_address), esi); mov(Operand::StaticVariable(context_address), esi);
...@@ -518,14 +518,14 @@ void MacroAssembler::LeaveExitFrame(bool save_doubles) { ...@@ -518,14 +518,14 @@ void MacroAssembler::LeaveExitFrame(bool save_doubles) {
void MacroAssembler::LeaveExitFrameEpilogue() { void MacroAssembler::LeaveExitFrameEpilogue() {
// Restore current context from top and clear it in debug mode. // Restore current context from top and clear it in debug mode.
ExternalReference context_address(Isolate::k_context_address, isolate()); ExternalReference context_address(Isolate::kContextAddress, isolate());
mov(esi, Operand::StaticVariable(context_address)); mov(esi, Operand::StaticVariable(context_address));
#ifdef DEBUG #ifdef DEBUG
mov(Operand::StaticVariable(context_address), Immediate(0)); mov(Operand::StaticVariable(context_address), Immediate(0));
#endif #endif
// Clear the top frame. // Clear the top frame.
ExternalReference c_entry_fp_address(Isolate::k_c_entry_fp_address, ExternalReference c_entry_fp_address(Isolate::kCEntryFPAddress,
isolate()); isolate());
mov(Operand::StaticVariable(c_entry_fp_address), Immediate(0)); mov(Operand::StaticVariable(c_entry_fp_address), Immediate(0));
} }
...@@ -567,10 +567,10 @@ void MacroAssembler::PushTryHandler(CodeLocation try_location, ...@@ -567,10 +567,10 @@ void MacroAssembler::PushTryHandler(CodeLocation try_location,
push(Immediate(Smi::FromInt(0))); // No context. push(Immediate(Smi::FromInt(0))); // No context.
} }
// Save the current handler as the next handler. // Save the current handler as the next handler.
push(Operand::StaticVariable(ExternalReference(Isolate::k_handler_address, push(Operand::StaticVariable(ExternalReference(Isolate::kHandlerAddress,
isolate()))); isolate())));
// Link this handler as the new current one. // Link this handler as the new current one.
mov(Operand::StaticVariable(ExternalReference(Isolate::k_handler_address, mov(Operand::StaticVariable(ExternalReference(Isolate::kHandlerAddress,
isolate())), isolate())),
esp); esp);
} }
...@@ -578,7 +578,7 @@ void MacroAssembler::PushTryHandler(CodeLocation try_location, ...@@ -578,7 +578,7 @@ void MacroAssembler::PushTryHandler(CodeLocation try_location,
void MacroAssembler::PopTryHandler() { void MacroAssembler::PopTryHandler() {
STATIC_ASSERT(StackHandlerConstants::kNextOffset == 0); STATIC_ASSERT(StackHandlerConstants::kNextOffset == 0);
pop(Operand::StaticVariable(ExternalReference(Isolate::k_handler_address, pop(Operand::StaticVariable(ExternalReference(Isolate::kHandlerAddress,
isolate()))); isolate())));
add(Operand(esp), Immediate(StackHandlerConstants::kSize - kPointerSize)); add(Operand(esp), Immediate(StackHandlerConstants::kSize - kPointerSize));
} }
...@@ -598,7 +598,7 @@ void MacroAssembler::Throw(Register value) { ...@@ -598,7 +598,7 @@ void MacroAssembler::Throw(Register value) {
} }
// Drop the sp to the top of the handler. // Drop the sp to the top of the handler.
ExternalReference handler_address(Isolate::k_handler_address, ExternalReference handler_address(Isolate::kHandlerAddress,
isolate()); isolate());
mov(esp, Operand::StaticVariable(handler_address)); mov(esp, Operand::StaticVariable(handler_address));
...@@ -637,7 +637,7 @@ void MacroAssembler::ThrowUncatchable(UncatchableExceptionType type, ...@@ -637,7 +637,7 @@ void MacroAssembler::ThrowUncatchable(UncatchableExceptionType type,
} }
// Drop sp to the top stack handler. // Drop sp to the top stack handler.
ExternalReference handler_address(Isolate::k_handler_address, ExternalReference handler_address(Isolate::kHandlerAddress,
isolate()); isolate());
mov(esp, Operand::StaticVariable(handler_address)); mov(esp, Operand::StaticVariable(handler_address));
...@@ -660,13 +660,13 @@ void MacroAssembler::ThrowUncatchable(UncatchableExceptionType type, ...@@ -660,13 +660,13 @@ void MacroAssembler::ThrowUncatchable(UncatchableExceptionType type,
if (type == OUT_OF_MEMORY) { if (type == OUT_OF_MEMORY) {
// Set external caught exception to false. // Set external caught exception to false.
ExternalReference external_caught( ExternalReference external_caught(
Isolate::k_external_caught_exception_address, Isolate::kExternalCaughtExceptionAddress,
isolate()); isolate());
mov(eax, false); mov(eax, false);
mov(Operand::StaticVariable(external_caught), eax); mov(Operand::StaticVariable(external_caught), eax);
// Set pending exception and eax to out of memory exception. // Set pending exception and eax to out of memory exception.
ExternalReference pending_exception(Isolate::k_pending_exception_address, ExternalReference pending_exception(Isolate::kPendingExceptionAddress,
isolate()); isolate());
mov(eax, reinterpret_cast<int32_t>(Failure::OutOfMemoryException())); mov(eax, reinterpret_cast<int32_t>(Failure::OutOfMemoryException()));
mov(Operand::StaticVariable(pending_exception), eax); mov(Operand::StaticVariable(pending_exception), eax);
......
...@@ -1414,7 +1414,7 @@ Isolate::Isolate() ...@@ -1414,7 +1414,7 @@ Isolate::Isolate()
TRACE_ISOLATE(constructor); TRACE_ISOLATE(constructor);
memset(isolate_addresses_, 0, memset(isolate_addresses_, 0,
sizeof(isolate_addresses_[0]) * (k_isolate_address_count + 1)); sizeof(isolate_addresses_[0]) * (kIsolateAddressCount + 1));
heap_.isolate_ = this; heap_.isolate_ = this;
zone_.isolate_ = this; zone_.isolate_ = this;
...@@ -1686,9 +1686,10 @@ bool Isolate::Init(Deserializer* des) { ...@@ -1686,9 +1686,10 @@ bool Isolate::Init(Deserializer* des) {
// ensuring that Isolate::Current() == this. // ensuring that Isolate::Current() == this.
heap_.SetStackLimits(); heap_.SetStackLimits();
#define C(name) isolate_addresses_[Isolate::k_##name] = \ #define ASSIGN_ELEMENT(CamelName, hacker_name) \
reinterpret_cast<Address>(name()); isolate_addresses_[Isolate::k##CamelName##Address] = \
ISOLATE_ADDRESS_LIST(C) reinterpret_cast<Address>(hacker_name##_address());
FOR_EACH_ISOLATE_ADDRESS_NAME(ASSIGN_ELEMENT)
#undef C #undef C
string_tracker_ = new StringTracker(); string_tracker_ = new StringTracker();
......
...@@ -119,13 +119,13 @@ typedef ZoneList<Handle<Object> > ZoneObjectList; ...@@ -119,13 +119,13 @@ typedef ZoneList<Handle<Object> > ZoneObjectList;
#define RETURN_IF_EMPTY_HANDLE(isolate, call) \ #define RETURN_IF_EMPTY_HANDLE(isolate, call) \
RETURN_IF_EMPTY_HANDLE_VALUE(isolate, call, Failure::Exception()) RETURN_IF_EMPTY_HANDLE_VALUE(isolate, call, Failure::Exception())
#define ISOLATE_ADDRESS_LIST(C) \ #define FOR_EACH_ISOLATE_ADDRESS_NAME(C) \
C(handler_address) \ C(Handler, handler) \
C(c_entry_fp_address) \ C(CEntryFP, c_entry_fp) \
C(context_address) \ C(Context, context) \
C(pending_exception_address) \ C(PendingException, pending_exception) \
C(external_caught_exception_address) \ C(ExternalCaughtException, external_caught_exception) \
C(js_entry_sp_address) C(JSEntrySP, js_entry_sp)
// Platform-independent, reliable thread identifier. // Platform-independent, reliable thread identifier.
...@@ -423,10 +423,10 @@ class Isolate { ...@@ -423,10 +423,10 @@ class Isolate {
enum AddressId { enum AddressId {
#define C(name) k_##name, #define DECLARE_ENUM(CamelName, hacker_name) k##CamelName##Address,
ISOLATE_ADDRESS_LIST(C) FOR_EACH_ISOLATE_ADDRESS_NAME(DECLARE_ENUM)
#undef C #undef C
k_isolate_address_count kIsolateAddressCount
}; };
// Returns the PerIsolateThreadData for the current thread (or NULL if one is // Returns the PerIsolateThreadData for the current thread (or NULL if one is
...@@ -1097,7 +1097,7 @@ class Isolate { ...@@ -1097,7 +1097,7 @@ class Isolate {
StringStream* incomplete_message_; StringStream* incomplete_message_;
// The preallocated memory thread singleton. // The preallocated memory thread singleton.
PreallocatedMemoryThread* preallocated_memory_thread_; PreallocatedMemoryThread* preallocated_memory_thread_;
Address isolate_addresses_[k_isolate_address_count + 1]; // NOLINT Address isolate_addresses_[kIsolateAddressCount + 1]; // NOLINT
NoAllocationStringAllocator* preallocated_message_space_; NoAllocationStringAllocator* preallocated_message_space_;
Bootstrapper* bootstrapper_; Bootstrapper* bootstrapper_;
......
...@@ -1450,7 +1450,7 @@ static bool FixTryCatchHandler(StackFrame* top_frame, ...@@ -1450,7 +1450,7 @@ static bool FixTryCatchHandler(StackFrame* top_frame,
StackFrame* bottom_frame) { StackFrame* bottom_frame) {
Address* pointer_address = Address* pointer_address =
&Memory::Address_at(Isolate::Current()->get_address_from_id( &Memory::Address_at(Isolate::Current()->get_address_from_id(
Isolate::k_handler_address)); Isolate::kHandlerAddress));
while (*pointer_address < top_frame->sp()) { while (*pointer_address < top_frame->sp()) {
pointer_address = &Memory::Address_at(*pointer_address); pointer_address = &Memory::Address_at(*pointer_address);
......
...@@ -3591,7 +3591,7 @@ void CEntryStub::GenerateCore(MacroAssembler* masm, ...@@ -3591,7 +3591,7 @@ void CEntryStub::GenerateCore(MacroAssembler* masm,
__ li(t0, __ li(t0,
Operand(ExternalReference::the_hole_value_location(masm->isolate()))); Operand(ExternalReference::the_hole_value_location(masm->isolate())));
__ lw(a3, MemOperand(t0)); __ lw(a3, MemOperand(t0));
__ li(t0, Operand(ExternalReference(Isolate::k_pending_exception_address, __ li(t0, Operand(ExternalReference(Isolate::kPendingExceptionAddress,
masm->isolate()))); masm->isolate())));
__ lw(v0, MemOperand(t0)); __ lw(v0, MemOperand(t0));
__ sw(a3, MemOperand(t0)); __ sw(a3, MemOperand(t0));
...@@ -3714,7 +3714,7 @@ void JSEntryStub::GenerateBody(MacroAssembler* masm, bool is_construct) { ...@@ -3714,7 +3714,7 @@ void JSEntryStub::GenerateBody(MacroAssembler* masm, bool is_construct) {
int marker = is_construct ? StackFrame::ENTRY_CONSTRUCT : StackFrame::ENTRY; int marker = is_construct ? StackFrame::ENTRY_CONSTRUCT : StackFrame::ENTRY;
__ li(t2, Operand(Smi::FromInt(marker))); __ li(t2, Operand(Smi::FromInt(marker)));
__ li(t1, Operand(Smi::FromInt(marker))); __ li(t1, Operand(Smi::FromInt(marker)));
__ li(t0, Operand(ExternalReference(Isolate::k_c_entry_fp_address, __ li(t0, Operand(ExternalReference(Isolate::kCEntryFPAddress,
masm->isolate()))); masm->isolate())));
__ lw(t0, MemOperand(t0)); __ lw(t0, MemOperand(t0));
__ Push(t3, t2, t1, t0); __ Push(t3, t2, t1, t0);
...@@ -3739,7 +3739,7 @@ void JSEntryStub::GenerateBody(MacroAssembler* masm, bool is_construct) { ...@@ -3739,7 +3739,7 @@ void JSEntryStub::GenerateBody(MacroAssembler* masm, bool is_construct) {
// If this is the outermost JS call, set js_entry_sp value. // If this is the outermost JS call, set js_entry_sp value.
Label non_outermost_js; Label non_outermost_js;
ExternalReference js_entry_sp(Isolate::k_js_entry_sp_address, ExternalReference js_entry_sp(Isolate::kJSEntrySPAddress,
masm->isolate()); masm->isolate());
__ li(t1, Operand(ExternalReference(js_entry_sp))); __ li(t1, Operand(ExternalReference(js_entry_sp)));
__ lw(t2, MemOperand(t1)); __ lw(t2, MemOperand(t1));
...@@ -3762,7 +3762,7 @@ void JSEntryStub::GenerateBody(MacroAssembler* masm, bool is_construct) { ...@@ -3762,7 +3762,7 @@ void JSEntryStub::GenerateBody(MacroAssembler* masm, bool is_construct) {
// exception field in the JSEnv and return a failure sentinel. // exception field in the JSEnv and return a failure sentinel.
// Coming in here the fp will be invalid because the PushTryHandler below // Coming in here the fp will be invalid because the PushTryHandler below
// sets it to 0 to signal the existence of the JSEntry frame. // sets it to 0 to signal the existence of the JSEntry frame.
__ li(t0, Operand(ExternalReference(Isolate::k_pending_exception_address, __ li(t0, Operand(ExternalReference(Isolate::kPendingExceptionAddress,
masm->isolate()))); masm->isolate())));
__ sw(v0, MemOperand(t0)); // We come back from 'invoke'. result is in v0. __ sw(v0, MemOperand(t0)); // We come back from 'invoke'. result is in v0.
__ li(v0, Operand(reinterpret_cast<int32_t>(Failure::Exception()))); __ li(v0, Operand(reinterpret_cast<int32_t>(Failure::Exception())));
...@@ -3781,7 +3781,7 @@ void JSEntryStub::GenerateBody(MacroAssembler* masm, bool is_construct) { ...@@ -3781,7 +3781,7 @@ void JSEntryStub::GenerateBody(MacroAssembler* masm, bool is_construct) {
__ li(t0, __ li(t0,
Operand(ExternalReference::the_hole_value_location(masm->isolate()))); Operand(ExternalReference::the_hole_value_location(masm->isolate())));
__ lw(t1, MemOperand(t0)); __ lw(t1, MemOperand(t0));
__ li(t0, Operand(ExternalReference(Isolate::k_pending_exception_address, __ li(t0, Operand(ExternalReference(Isolate::kPendingExceptionAddress,
masm->isolate()))); masm->isolate())));
__ sw(t1, MemOperand(t0)); __ sw(t1, MemOperand(t0));
...@@ -3832,7 +3832,7 @@ void JSEntryStub::GenerateBody(MacroAssembler* masm, bool is_construct) { ...@@ -3832,7 +3832,7 @@ void JSEntryStub::GenerateBody(MacroAssembler* masm, bool is_construct) {
// Restore the top frame descriptors from the stack. // Restore the top frame descriptors from the stack.
__ pop(t1); __ pop(t1);
__ li(t0, Operand(ExternalReference(Isolate::k_c_entry_fp_address, __ li(t0, Operand(ExternalReference(Isolate::kCEntryFPAddress,
masm->isolate()))); masm->isolate())));
__ sw(t1, MemOperand(t0)); __ sw(t1, MemOperand(t0));
...@@ -4718,7 +4718,7 @@ void RegExpExecStub::Generate(MacroAssembler* masm) { ...@@ -4718,7 +4718,7 @@ void RegExpExecStub::Generate(MacroAssembler* masm) {
__ li(a1, Operand( __ li(a1, Operand(
ExternalReference::the_hole_value_location(masm->isolate()))); ExternalReference::the_hole_value_location(masm->isolate())));
__ lw(a1, MemOperand(a1, 0)); __ lw(a1, MemOperand(a1, 0));
__ li(a2, Operand(ExternalReference(Isolate::k_pending_exception_address, __ li(a2, Operand(ExternalReference(Isolate::kPendingExceptionAddress,
masm->isolate()))); masm->isolate())));
__ lw(v0, MemOperand(a2, 0)); __ lw(v0, MemOperand(a2, 0));
__ Branch(&runtime, eq, v0, Operand(a1)); __ Branch(&runtime, eq, v0, Operand(a1));
......
...@@ -2337,7 +2337,7 @@ void MacroAssembler::PushTryHandler(CodeLocation try_location, ...@@ -2337,7 +2337,7 @@ void MacroAssembler::PushTryHandler(CodeLocation try_location,
li(t0, Operand(StackHandler::TRY_FINALLY)); li(t0, Operand(StackHandler::TRY_FINALLY));
} }
// Save the current handler as the next handler. // Save the current handler as the next handler.
li(t2, Operand(ExternalReference(Isolate::k_handler_address, isolate()))); li(t2, Operand(ExternalReference(Isolate::kHandlerAddress, isolate())));
lw(t1, MemOperand(t2)); lw(t1, MemOperand(t2));
addiu(sp, sp, -StackHandlerConstants::kSize); addiu(sp, sp, -StackHandlerConstants::kSize);
...@@ -2359,7 +2359,7 @@ void MacroAssembler::PushTryHandler(CodeLocation try_location, ...@@ -2359,7 +2359,7 @@ void MacroAssembler::PushTryHandler(CodeLocation try_location,
li(t0, Operand(StackHandler::ENTRY)); li(t0, Operand(StackHandler::ENTRY));
// Save the current handler as the next handler. // Save the current handler as the next handler.
li(t2, Operand(ExternalReference(Isolate::k_handler_address, isolate()))); li(t2, Operand(ExternalReference(Isolate::kHandlerAddress, isolate())));
lw(t1, MemOperand(t2)); lw(t1, MemOperand(t2));
ASSERT(Smi::FromInt(0) == 0); // Used for no context. ASSERT(Smi::FromInt(0) == 0); // Used for no context.
...@@ -2381,7 +2381,7 @@ void MacroAssembler::PopTryHandler() { ...@@ -2381,7 +2381,7 @@ void MacroAssembler::PopTryHandler() {
STATIC_ASSERT(StackHandlerConstants::kNextOffset == 0); STATIC_ASSERT(StackHandlerConstants::kNextOffset == 0);
pop(a1); pop(a1);
Addu(sp, sp, Operand(StackHandlerConstants::kSize - kPointerSize)); Addu(sp, sp, Operand(StackHandlerConstants::kSize - kPointerSize));
li(at, Operand(ExternalReference(Isolate::k_handler_address, isolate()))); li(at, Operand(ExternalReference(Isolate::kHandlerAddress, isolate())));
sw(a1, MemOperand(at)); sw(a1, MemOperand(at));
} }
...@@ -2399,7 +2399,7 @@ void MacroAssembler::Throw(Register value) { ...@@ -2399,7 +2399,7 @@ void MacroAssembler::Throw(Register value) {
STATIC_ASSERT(StackHandlerConstants::kPCOffset == 4 * kPointerSize); STATIC_ASSERT(StackHandlerConstants::kPCOffset == 4 * kPointerSize);
// Drop the sp to the top of the handler. // Drop the sp to the top of the handler.
li(a3, Operand(ExternalReference(Isolate::k_handler_address, li(a3, Operand(ExternalReference(Isolate::kHandlerAddress,
isolate()))); isolate())));
lw(sp, MemOperand(a3)); lw(sp, MemOperand(a3));
...@@ -2462,7 +2462,7 @@ void MacroAssembler::ThrowUncatchable(UncatchableExceptionType type, ...@@ -2462,7 +2462,7 @@ void MacroAssembler::ThrowUncatchable(UncatchableExceptionType type,
Move(v0, value); Move(v0, value);
// Drop sp to the top stack handler. // Drop sp to the top stack handler.
li(a3, Operand(ExternalReference(Isolate::k_handler_address, isolate()))); li(a3, Operand(ExternalReference(Isolate::kHandlerAddress, isolate())));
lw(sp, MemOperand(a3)); lw(sp, MemOperand(a3));
// Unwind the handlers until the ENTRY handler is found. // Unwind the handlers until the ENTRY handler is found.
...@@ -2485,7 +2485,7 @@ void MacroAssembler::ThrowUncatchable(UncatchableExceptionType type, ...@@ -2485,7 +2485,7 @@ void MacroAssembler::ThrowUncatchable(UncatchableExceptionType type,
if (type == OUT_OF_MEMORY) { if (type == OUT_OF_MEMORY) {
// Set external caught exception to false. // Set external caught exception to false.
ExternalReference external_caught( ExternalReference external_caught(
Isolate::k_external_caught_exception_address, isolate()); Isolate::kExternalCaughtExceptionAddress, isolate());
li(a0, Operand(false, RelocInfo::NONE)); li(a0, Operand(false, RelocInfo::NONE));
li(a2, Operand(external_caught)); li(a2, Operand(external_caught));
sw(a0, MemOperand(a2)); sw(a0, MemOperand(a2));
...@@ -2493,7 +2493,7 @@ void MacroAssembler::ThrowUncatchable(UncatchableExceptionType type, ...@@ -2493,7 +2493,7 @@ void MacroAssembler::ThrowUncatchable(UncatchableExceptionType type,
// Set pending exception and v0 to out of memory exception. // Set pending exception and v0 to out of memory exception.
Failure* out_of_memory = Failure::OutOfMemoryException(); Failure* out_of_memory = Failure::OutOfMemoryException();
li(v0, Operand(reinterpret_cast<int32_t>(out_of_memory))); li(v0, Operand(reinterpret_cast<int32_t>(out_of_memory)));
li(a2, Operand(ExternalReference(Isolate::k_pending_exception_address, li(a2, Operand(ExternalReference(Isolate::kPendingExceptionAddress,
isolate()))); isolate())));
sw(v0, MemOperand(a2)); sw(v0, MemOperand(a2));
} }
...@@ -3973,9 +3973,9 @@ void MacroAssembler::EnterExitFrame(bool save_doubles, ...@@ -3973,9 +3973,9 @@ void MacroAssembler::EnterExitFrame(bool save_doubles,
sw(t8, MemOperand(fp, ExitFrameConstants::kCodeOffset)); sw(t8, MemOperand(fp, ExitFrameConstants::kCodeOffset));
// Save the frame pointer and the context in top. // Save the frame pointer and the context in top.
li(t8, Operand(ExternalReference(Isolate::k_c_entry_fp_address, isolate()))); li(t8, Operand(ExternalReference(Isolate::kCEntryFPAddress, isolate())));
sw(fp, MemOperand(t8)); sw(fp, MemOperand(t8));
li(t8, Operand(ExternalReference(Isolate::k_context_address, isolate()))); li(t8, Operand(ExternalReference(Isolate::kContextAddress, isolate())));
sw(cp, MemOperand(t8)); sw(cp, MemOperand(t8));
const int frame_alignment = MacroAssembler::ActivationFrameAlignment(); const int frame_alignment = MacroAssembler::ActivationFrameAlignment();
...@@ -4025,11 +4025,11 @@ void MacroAssembler::LeaveExitFrame(bool save_doubles, ...@@ -4025,11 +4025,11 @@ void MacroAssembler::LeaveExitFrame(bool save_doubles,
} }
// Clear top frame. // Clear top frame.
li(t8, Operand(ExternalReference(Isolate::k_c_entry_fp_address, isolate()))); li(t8, Operand(ExternalReference(Isolate::kCEntryFPAddress, isolate())));
sw(zero_reg, MemOperand(t8)); sw(zero_reg, MemOperand(t8));
// Restore current context from top and clear it in debug mode. // Restore current context from top and clear it in debug mode.
li(t8, Operand(ExternalReference(Isolate::k_context_address, isolate()))); li(t8, Operand(ExternalReference(Isolate::kContextAddress, isolate())));
lw(cp, MemOperand(t8)); lw(cp, MemOperand(t8));
#ifdef DEBUG #ifdef DEBUG
sw(a3, MemOperand(t8)); sw(a3, MemOperand(t8));
......
...@@ -240,13 +240,14 @@ void ExternalReferenceTable::PopulateTable(Isolate* isolate) { ...@@ -240,13 +240,14 @@ void ExternalReferenceTable::PopulateTable(Isolate* isolate) {
// Top addresses // Top addresses
const char* AddressNames[] = { const char* AddressNames[] = {
#define C(name) "Isolate::" #name, #define BUILD_NAME_LITERAL(CamelName, hacker_name) \
ISOLATE_ADDRESS_LIST(C) "Isolate::" #hacker_name "_address",
FOR_EACH_ISOLATE_ADDRESS_NAME(BUILD_NAME_LITERAL)
NULL NULL
#undef C #undef C
}; };
for (uint16_t i = 0; i < Isolate::k_isolate_address_count; ++i) { for (uint16_t i = 0; i < Isolate::kIsolateAddressCount; ++i) {
Add(isolate->get_address_from_id((Isolate::AddressId)i), Add(isolate->get_address_from_id((Isolate::AddressId)i),
TOP_ADDRESS, i, AddressNames[i]); TOP_ADDRESS, i, AddressNames[i]);
} }
......
...@@ -2712,7 +2712,7 @@ void RegExpExecStub::Generate(MacroAssembler* masm) { ...@@ -2712,7 +2712,7 @@ void RegExpExecStub::Generate(MacroAssembler* masm) {
// haven't created the exception yet. Handle that in the runtime system. // haven't created the exception yet. Handle that in the runtime system.
// TODO(592): Rerunning the RegExp to get the stack overflow exception. // TODO(592): Rerunning the RegExp to get the stack overflow exception.
ExternalReference pending_exception_address( ExternalReference pending_exception_address(
Isolate::k_pending_exception_address, isolate); Isolate::kPendingExceptionAddress, isolate);
Operand pending_exception_operand = Operand pending_exception_operand =
masm->ExternalOperand(pending_exception_address, rbx); masm->ExternalOperand(pending_exception_address, rbx);
__ movq(rax, pending_exception_operand); __ movq(rax, pending_exception_operand);
...@@ -3428,7 +3428,7 @@ void CEntryStub::GenerateCore(MacroAssembler* masm, ...@@ -3428,7 +3428,7 @@ void CEntryStub::GenerateCore(MacroAssembler* masm,
// Retrieve the pending exception and clear the variable. // Retrieve the pending exception and clear the variable.
ExternalReference pending_exception_address( ExternalReference pending_exception_address(
Isolate::k_pending_exception_address, masm->isolate()); Isolate::kPendingExceptionAddress, masm->isolate());
Operand pending_exception_operand = Operand pending_exception_operand =
masm->ExternalOperand(pending_exception_address); masm->ExternalOperand(pending_exception_address);
__ movq(rax, pending_exception_operand); __ movq(rax, pending_exception_operand);
...@@ -3568,14 +3568,14 @@ void JSEntryStub::GenerateBody(MacroAssembler* masm, bool is_construct) { ...@@ -3568,14 +3568,14 @@ void JSEntryStub::GenerateBody(MacroAssembler* masm, bool is_construct) {
Isolate* isolate = masm->isolate(); Isolate* isolate = masm->isolate();
// Save copies of the top frame descriptor on the stack. // Save copies of the top frame descriptor on the stack.
ExternalReference c_entry_fp(Isolate::k_c_entry_fp_address, isolate); ExternalReference c_entry_fp(Isolate::kCEntryFPAddress, isolate);
{ {
Operand c_entry_fp_operand = masm->ExternalOperand(c_entry_fp); Operand c_entry_fp_operand = masm->ExternalOperand(c_entry_fp);
__ push(c_entry_fp_operand); __ push(c_entry_fp_operand);
} }
// If this is the outermost JS call, set js_entry_sp value. // If this is the outermost JS call, set js_entry_sp value.
ExternalReference js_entry_sp(Isolate::k_js_entry_sp_address, isolate); ExternalReference js_entry_sp(Isolate::kJSEntrySPAddress, isolate);
__ Load(rax, js_entry_sp); __ Load(rax, js_entry_sp);
__ testq(rax, rax); __ testq(rax, rax);
__ j(not_zero, &not_outermost_js); __ j(not_zero, &not_outermost_js);
...@@ -3593,7 +3593,7 @@ void JSEntryStub::GenerateBody(MacroAssembler* masm, bool is_construct) { ...@@ -3593,7 +3593,7 @@ void JSEntryStub::GenerateBody(MacroAssembler* masm, bool is_construct) {
// Caught exception: Store result (exception) in the pending // Caught exception: Store result (exception) in the pending
// exception field in the JSEnv and return a failure sentinel. // exception field in the JSEnv and return a failure sentinel.
ExternalReference pending_exception(Isolate::k_pending_exception_address, ExternalReference pending_exception(Isolate::kPendingExceptionAddress,
isolate); isolate);
__ Store(pending_exception, rax); __ Store(pending_exception, rax);
__ movq(rax, Failure::Exception(), RelocInfo::NONE); __ movq(rax, Failure::Exception(), RelocInfo::NONE);
......
...@@ -2415,7 +2415,7 @@ void MacroAssembler::PushTryHandler(CodeLocation try_location, ...@@ -2415,7 +2415,7 @@ void MacroAssembler::PushTryHandler(CodeLocation try_location,
} }
// Save the current handler. // Save the current handler.
Operand handler_operand = Operand handler_operand =
ExternalOperand(ExternalReference(Isolate::k_handler_address, isolate())); ExternalOperand(ExternalReference(Isolate::kHandlerAddress, isolate()));
push(handler_operand); push(handler_operand);
// Link this handler. // Link this handler.
movq(handler_operand, rsp); movq(handler_operand, rsp);
...@@ -2426,7 +2426,7 @@ void MacroAssembler::PopTryHandler() { ...@@ -2426,7 +2426,7 @@ void MacroAssembler::PopTryHandler() {
ASSERT_EQ(0, StackHandlerConstants::kNextOffset); ASSERT_EQ(0, StackHandlerConstants::kNextOffset);
// Unlink this handler. // Unlink this handler.
Operand handler_operand = Operand handler_operand =
ExternalOperand(ExternalReference(Isolate::k_handler_address, isolate())); ExternalOperand(ExternalReference(Isolate::kHandlerAddress, isolate()));
pop(handler_operand); pop(handler_operand);
// Remove the remaining fields. // Remove the remaining fields.
addq(rsp, Immediate(StackHandlerConstants::kSize - kPointerSize)); addq(rsp, Immediate(StackHandlerConstants::kSize - kPointerSize));
...@@ -2446,7 +2446,7 @@ void MacroAssembler::Throw(Register value) { ...@@ -2446,7 +2446,7 @@ void MacroAssembler::Throw(Register value) {
movq(rax, value); movq(rax, value);
} }
ExternalReference handler_address(Isolate::k_handler_address, isolate()); ExternalReference handler_address(Isolate::kHandlerAddress, isolate());
Operand handler_operand = ExternalOperand(handler_address); Operand handler_operand = ExternalOperand(handler_address);
movq(rsp, handler_operand); movq(rsp, handler_operand);
// get next in chain // get next in chain
...@@ -2482,7 +2482,7 @@ void MacroAssembler::ThrowUncatchable(UncatchableExceptionType type, ...@@ -2482,7 +2482,7 @@ void MacroAssembler::ThrowUncatchable(UncatchableExceptionType type,
movq(rax, value); movq(rax, value);
} }
// Fetch top stack handler. // Fetch top stack handler.
ExternalReference handler_address(Isolate::k_handler_address, isolate()); ExternalReference handler_address(Isolate::kHandlerAddress, isolate());
Load(rsp, handler_address); Load(rsp, handler_address);
// Unwind the handlers until the ENTRY handler is found. // Unwind the handlers until the ENTRY handler is found.
...@@ -2505,12 +2505,12 @@ void MacroAssembler::ThrowUncatchable(UncatchableExceptionType type, ...@@ -2505,12 +2505,12 @@ void MacroAssembler::ThrowUncatchable(UncatchableExceptionType type,
if (type == OUT_OF_MEMORY) { if (type == OUT_OF_MEMORY) {
// Set external caught exception to false. // Set external caught exception to false.
ExternalReference external_caught( ExternalReference external_caught(
Isolate::k_external_caught_exception_address, isolate()); Isolate::kExternalCaughtExceptionAddress, isolate());
Set(rax, static_cast<int64_t>(false)); Set(rax, static_cast<int64_t>(false));
Store(external_caught, rax); Store(external_caught, rax);
// Set pending exception and rax to out of memory exception. // Set pending exception and rax to out of memory exception.
ExternalReference pending_exception(Isolate::k_pending_exception_address, ExternalReference pending_exception(Isolate::kPendingExceptionAddress,
isolate()); isolate());
movq(rax, Failure::OutOfMemoryException(), RelocInfo::NONE); movq(rax, Failure::OutOfMemoryException(), RelocInfo::NONE);
Store(pending_exception, rax); Store(pending_exception, rax);
...@@ -3041,8 +3041,8 @@ void MacroAssembler::EnterExitFramePrologue(bool save_rax) { ...@@ -3041,8 +3041,8 @@ void MacroAssembler::EnterExitFramePrologue(bool save_rax) {
movq(r14, rax); // Backup rax in callee-save register. movq(r14, rax); // Backup rax in callee-save register.
} }
Store(ExternalReference(Isolate::k_c_entry_fp_address, isolate()), rbp); Store(ExternalReference(Isolate::kCEntryFPAddress, isolate()), rbp);
Store(ExternalReference(Isolate::k_context_address, isolate()), rsi); Store(ExternalReference(Isolate::kContextAddress, isolate()), rsi);
} }
...@@ -3132,7 +3132,7 @@ void MacroAssembler::LeaveApiExitFrame() { ...@@ -3132,7 +3132,7 @@ void MacroAssembler::LeaveApiExitFrame() {
void MacroAssembler::LeaveExitFrameEpilogue() { void MacroAssembler::LeaveExitFrameEpilogue() {
// Restore current context from top and clear it in debug mode. // Restore current context from top and clear it in debug mode.
ExternalReference context_address(Isolate::k_context_address, isolate()); ExternalReference context_address(Isolate::kContextAddress, isolate());
Operand context_operand = ExternalOperand(context_address); Operand context_operand = ExternalOperand(context_address);
movq(rsi, context_operand); movq(rsi, context_operand);
#ifdef DEBUG #ifdef DEBUG
...@@ -3140,7 +3140,7 @@ void MacroAssembler::LeaveExitFrameEpilogue() { ...@@ -3140,7 +3140,7 @@ void MacroAssembler::LeaveExitFrameEpilogue() {
#endif #endif
// Clear the top frame. // Clear the top frame.
ExternalReference c_entry_fp_address(Isolate::k_c_entry_fp_address, ExternalReference c_entry_fp_address(Isolate::kCEntryFPAddress,
isolate()); isolate());
Operand c_entry_fp_operand = ExternalOperand(c_entry_fp_address); Operand c_entry_fp_operand = ExternalOperand(c_entry_fp_address);
movq(c_entry_fp_operand, Immediate(0)); movq(c_entry_fp_operand, Immediate(0));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment