Revision: 9200
Author: [email protected]
Date: Thu Sep 8 09:29:57 2011
Log: Use more style-guide-friendly names for some constants.
This is a renaming only change.
[email protected]
BUG=
TEST=
Review URL: http://codereview.chromium.org/7849020
http://code.google.com/p/v8/source/detail?r=9200
Modified:
/branches/bleeding_edge/src/arm/code-stubs-arm.cc
/branches/bleeding_edge/src/arm/macro-assembler-arm.cc
/branches/bleeding_edge/src/ia32/code-stubs-ia32.cc
/branches/bleeding_edge/src/ia32/macro-assembler-ia32.cc
/branches/bleeding_edge/src/isolate.cc
/branches/bleeding_edge/src/isolate.h
/branches/bleeding_edge/src/liveedit.cc
/branches/bleeding_edge/src/mips/code-stubs-mips.cc
/branches/bleeding_edge/src/mips/macro-assembler-mips.cc
/branches/bleeding_edge/src/serialize.cc
/branches/bleeding_edge/src/x64/code-stubs-x64.cc
/branches/bleeding_edge/src/x64/macro-assembler-x64.cc
=======================================
--- /branches/bleeding_edge/src/arm/code-stubs-arm.cc Fri Sep 2 06:42:50
2011
+++ /branches/bleeding_edge/src/arm/code-stubs-arm.cc Thu Sep 8 09:29:57
2011
@@ -3432,7 +3432,7 @@
// Retrieve the pending exception and clear the variable.
__ mov(ip, Operand(ExternalReference::the_hole_value_location(isolate)));
__ ldr(r3, MemOperand(ip));
- __ mov(ip,
Operand(ExternalReference(Isolate::k_pending_exception_address,
+ __ mov(ip, Operand(ExternalReference(Isolate::kPendingExceptionAddress,
isolate)));
__ ldr(r0, MemOperand(ip));
__ str(r3, MemOperand(ip));
@@ -3567,7 +3567,7 @@
__ mov(r7, Operand(Smi::FromInt(marker)));
__ mov(r6, Operand(Smi::FromInt(marker)));
__ mov(r5,
- Operand(ExternalReference(Isolate::k_c_entry_fp_address,
isolate)));
+ Operand(ExternalReference(Isolate::kCEntryFPAddress, isolate)));
__ ldr(r5, MemOperand(r5));
__ Push(r8, r7, r6, r5);
@@ -3576,7 +3576,7 @@
// If this is the outermost JS call, set js_entry_sp value.
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)));
__ ldr(r6, MemOperand(r5));
__ cmp(r6, Operand::Zero());
@@ -3597,7 +3597,7 @@
// exception field in the JSEnv and return a failure sentinel.
// Coming in here the fp will be invalid because the PushTryHandler below
// 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)));
__ str(r0, MemOperand(ip));
__ mov(r0, Operand(reinterpret_cast<int32_t>(Failure::Exception())));
@@ -3615,7 +3615,7 @@
// Clear any pending exceptions.
__ mov(ip, Operand(ExternalReference::the_hole_value_location(isolate)));
__ ldr(r5, MemOperand(ip));
- __ mov(ip,
Operand(ExternalReference(Isolate::k_pending_exception_address,
+ __ mov(ip, Operand(ExternalReference(Isolate::kPendingExceptionAddress,
isolate)));
__ str(r5, MemOperand(ip));
@@ -3662,7 +3662,7 @@
// Restore the top frame descriptors from the stack.
__ pop(r3);
__ mov(ip,
- Operand(ExternalReference(Isolate::k_c_entry_fp_address,
isolate)));
+ Operand(ExternalReference(Isolate::kCEntryFPAddress, isolate)));
__ str(r3, MemOperand(ip));
// Reset the stack to the callee saved registers.
@@ -4534,7 +4534,7 @@
// TODO(592): Rerunning the RegExp to get the stack overflow exception.
__ mov(r1, Operand(ExternalReference::the_hole_value_location(isolate)));
__ ldr(r1, MemOperand(r1, 0));
- __ mov(r2,
Operand(ExternalReference(Isolate::k_pending_exception_address,
+ __ mov(r2, Operand(ExternalReference(Isolate::kPendingExceptionAddress,
isolate)));
__ ldr(r0, MemOperand(r2, 0));
__ cmp(r0, r1);
=======================================
--- /branches/bleeding_edge/src/arm/macro-assembler-arm.cc Thu Sep 1
08:24:26 2011
+++ /branches/bleeding_edge/src/arm/macro-assembler-arm.cc Thu Sep 8
09:29:57 2011
@@ -760,9 +760,9 @@
str(ip, MemOperand(fp, ExitFrameConstants::kCodeOffset));
// 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));
- mov(ip, Operand(ExternalReference(Isolate::k_context_address,
isolate())));
+ mov(ip, Operand(ExternalReference(Isolate::kContextAddress, isolate())));
str(cp, MemOperand(ip));
// Optionally save all double registers.
@@ -838,11 +838,11 @@
// Clear top frame.
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));
// 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));
#ifdef DEBUG
str(r3, MemOperand(ip));
@@ -1118,7 +1118,7 @@
}
stm(db_w, sp, r3.bit() | cp.bit() | fp.bit() | lr.bit());
// 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));
push(r1);
// Link this handler as the new current one.
@@ -1134,7 +1134,7 @@
mov(r7, Operand(0, RelocInfo::NONE)); // NULL frame pointer.
stm(db_w, sp, r5.bit() | r6.bit() | r7.bit() | lr.bit());
// 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));
push(r6);
// Link this handler as the new current one.
@@ -1146,7 +1146,7 @@
void MacroAssembler::PopTryHandler() {
STATIC_ASSERT(StackHandlerConstants::kNextOffset == 0);
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));
str(r1, MemOperand(ip));
}
@@ -1166,7 +1166,7 @@
}
// 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));
// Restore the next handler.
@@ -1206,7 +1206,7 @@
}
// 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));
// Unwind the handlers until the ENTRY handler is found.
@@ -1230,7 +1230,7 @@
if (type == OUT_OF_MEMORY) {
// Set external caught exception to false.
ExternalReference external_caught(
- Isolate::k_external_caught_exception_address, isolate());
+ Isolate::kExternalCaughtExceptionAddress, isolate());
mov(r0, Operand(false, RelocInfo::NONE));
mov(r2, Operand(external_caught));
str(r0, MemOperand(r2));
@@ -1238,7 +1238,7 @@
// Set pending exception and r0 to out of memory exception.
Failure* out_of_memory = Failure::OutOfMemoryException();
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())));
str(r0, MemOperand(r2));
}
=======================================
--- /branches/bleeding_edge/src/ia32/code-stubs-ia32.cc Thu Sep 1 08:24:26
2011
+++ /branches/bleeding_edge/src/ia32/code-stubs-ia32.cc Thu Sep 8 09:29:57
2011
@@ -3551,7 +3551,7 @@
// 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(Isolate::k_pending_exception_address,
+ ExternalReference pending_exception(Isolate::kPendingExceptionAddress,
masm->isolate());
__ mov(edx,
Operand::StaticVariable(ExternalReference::the_hole_value_location(
@@ -4341,7 +4341,7 @@
__ j(zero, &failure_returned);
ExternalReference pending_exception_address(
- Isolate::k_pending_exception_address, masm->isolate());
+ Isolate::kPendingExceptionAddress, masm->isolate());
// Check that there is no pending exception, otherwise we
// should have returned some failure value.
@@ -4482,11 +4482,11 @@
__ push(ebx);
// 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));
// 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());
__ cmp(Operand::StaticVariable(js_entry_sp), Immediate(0));
__ j(not_equal, ¬_outermost_js, Label::kNear);
@@ -4503,7 +4503,7 @@
// Caught exception: Store result (exception) in the pending
// 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());
__ mov(Operand::StaticVariable(pending_exception), eax);
__ mov(eax, reinterpret_cast<int32_t>(Failure::Exception()));
@@ -4554,7 +4554,7 @@
// Restore the top frame descriptor from the stack.
__ pop(Operand::StaticVariable(ExternalReference(
- Isolate::k_c_entry_fp_address,
+ Isolate::kCEntryFPAddress,
masm->isolate())));
// Restore callee-saved registers (C calling conventions).
=======================================
--- /branches/bleeding_edge/src/ia32/macro-assembler-ia32.cc Thu Sep 1
08:24:26 2011
+++ /branches/bleeding_edge/src/ia32/macro-assembler-ia32.cc Thu Sep 8
09:29:57 2011
@@ -437,9 +437,9 @@
push(Immediate(CodeObject())); // Accessed from ExitFrame::code_slot.
// 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());
- ExternalReference context_address(Isolate::k_context_address,
+ ExternalReference context_address(Isolate::kContextAddress,
isolate());
mov(Operand::StaticVariable(c_entry_fp_address), ebp);
mov(Operand::StaticVariable(context_address), esi);
@@ -518,14 +518,14 @@
void MacroAssembler::LeaveExitFrameEpilogue() {
// 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));
#ifdef DEBUG
mov(Operand::StaticVariable(context_address), Immediate(0));
#endif
// Clear the top frame.
- ExternalReference c_entry_fp_address(Isolate::k_c_entry_fp_address,
+ ExternalReference c_entry_fp_address(Isolate::kCEntryFPAddress,
isolate());
mov(Operand::StaticVariable(c_entry_fp_address), Immediate(0));
}
@@ -567,10 +567,10 @@
push(Immediate(Smi::FromInt(0))); // No context.
}
// Save the current handler as the next handler.
-
push(Operand::StaticVariable(ExternalReference(Isolate::k_handler_address,
+ push(Operand::StaticVariable(ExternalReference(Isolate::kHandlerAddress,
isolate())));
// Link this handler as the new current one.
- mov(Operand::StaticVariable(ExternalReference(Isolate::k_handler_address,
+ mov(Operand::StaticVariable(ExternalReference(Isolate::kHandlerAddress,
isolate())),
esp);
}
@@ -578,7 +578,7 @@
void MacroAssembler::PopTryHandler() {
STATIC_ASSERT(StackHandlerConstants::kNextOffset == 0);
- pop(Operand::StaticVariable(ExternalReference(Isolate::k_handler_address,
+ pop(Operand::StaticVariable(ExternalReference(Isolate::kHandlerAddress,
isolate())));
add(Operand(esp), Immediate(StackHandlerConstants::kSize -
kPointerSize));
}
@@ -598,7 +598,7 @@
}
// Drop the sp to the top of the handler.
- ExternalReference handler_address(Isolate::k_handler_address,
+ ExternalReference handler_address(Isolate::kHandlerAddress,
isolate());
mov(esp, Operand::StaticVariable(handler_address));
@@ -637,7 +637,7 @@
}
// Drop sp to the top stack handler.
- ExternalReference handler_address(Isolate::k_handler_address,
+ ExternalReference handler_address(Isolate::kHandlerAddress,
isolate());
mov(esp, Operand::StaticVariable(handler_address));
@@ -660,13 +660,13 @@
if (type == OUT_OF_MEMORY) {
// Set external caught exception to false.
ExternalReference external_caught(
- Isolate::k_external_caught_exception_address,
+ Isolate::kExternalCaughtExceptionAddress,
isolate());
mov(eax, false);
mov(Operand::StaticVariable(external_caught), eax);
// Set pending exception and eax to out of memory exception.
- ExternalReference
pending_exception(Isolate::k_pending_exception_address,
+ ExternalReference pending_exception(Isolate::kPendingExceptionAddress,
isolate());
mov(eax, reinterpret_cast<int32_t>(Failure::OutOfMemoryException()));
mov(Operand::StaticVariable(pending_exception), eax);
=======================================
--- /branches/bleeding_edge/src/isolate.cc Thu Sep 8 06:06:44 2011
+++ /branches/bleeding_edge/src/isolate.cc Thu Sep 8 09:29:57 2011
@@ -1414,7 +1414,7 @@
TRACE_ISOLATE(constructor);
memset(isolate_addresses_, 0,
- sizeof(isolate_addresses_[0]) * (k_isolate_address_count + 1));
+ sizeof(isolate_addresses_[0]) * (kIsolateAddressCount + 1));
heap_.isolate_ = this;
zone_.isolate_ = this;
@@ -1686,9 +1686,10 @@
// ensuring that Isolate::Current() == this.
heap_.SetStackLimits();
-#define C(name) isolate_addresses_[Isolate::k_##name]
= \
- reinterpret_cast<Address>(name());
- ISOLATE_ADDRESS_LIST(C)
+#define ASSIGN_ELEMENT(CamelName, hacker_name) \
+ isolate_addresses_[Isolate::k##CamelName##Address] = \
+ reinterpret_cast<Address>(hacker_name##_address());
+ FOR_EACH_ISOLATE_ADDRESS_NAME(ASSIGN_ELEMENT)
#undef C
string_tracker_ = new StringTracker();
=======================================
--- /branches/bleeding_edge/src/isolate.h Fri Sep 2 05:59:05 2011
+++ /branches/bleeding_edge/src/isolate.h Thu Sep 8 09:29:57 2011
@@ -119,13 +119,13 @@
#define RETURN_IF_EMPTY_HANDLE(isolate, call) \
RETURN_IF_EMPTY_HANDLE_VALUE(isolate, call, Failure::Exception())
-#define ISOLATE_ADDRESS_LIST(C) \
- C(handler_address) \
- C(c_entry_fp_address) \
- C(context_address) \
- C(pending_exception_address) \
- C(external_caught_exception_address) \
- C(js_entry_sp_address)
+#define FOR_EACH_ISOLATE_ADDRESS_NAME(C) \
+ C(Handler, handler) \
+ C(CEntryFP, c_entry_fp) \
+ C(Context, context) \
+ C(PendingException, pending_exception) \
+ C(ExternalCaughtException, external_caught_exception) \
+ C(JSEntrySP, js_entry_sp)
// Platform-independent, reliable thread identifier.
@@ -423,10 +423,10 @@
enum AddressId {
-#define C(name) k_##name,
- ISOLATE_ADDRESS_LIST(C)
+#define DECLARE_ENUM(CamelName, hacker_name) k##CamelName##Address,
+ FOR_EACH_ISOLATE_ADDRESS_NAME(DECLARE_ENUM)
#undef C
- k_isolate_address_count
+ kIsolateAddressCount
};
// Returns the PerIsolateThreadData for the current thread (or NULL if
one is
@@ -1097,7 +1097,7 @@
StringStream* incomplete_message_;
// The preallocated memory thread singleton.
PreallocatedMemoryThread* preallocated_memory_thread_;
- Address isolate_addresses_[k_isolate_address_count + 1]; // NOLINT
+ Address isolate_addresses_[kIsolateAddressCount + 1]; // NOLINT
NoAllocationStringAllocator* preallocated_message_space_;
Bootstrapper* bootstrapper_;
=======================================
--- /branches/bleeding_edge/src/liveedit.cc Wed Sep 7 04:02:31 2011
+++ /branches/bleeding_edge/src/liveedit.cc Thu Sep 8 09:29:57 2011
@@ -1450,7 +1450,7 @@
StackFrame* bottom_frame) {
Address* pointer_address =
&Memory::Address_at(Isolate::Current()->get_address_from_id(
- Isolate::k_handler_address));
+ Isolate::kHandlerAddress));
while (*pointer_address < top_frame->sp()) {
pointer_address = &Memory::Address_at(*pointer_address);
=======================================
--- /branches/bleeding_edge/src/mips/code-stubs-mips.cc Tue Sep 6 00:09:53
2011
+++ /branches/bleeding_edge/src/mips/code-stubs-mips.cc Thu Sep 8 09:29:57
2011
@@ -3591,7 +3591,7 @@
__ li(t0,
Operand(ExternalReference::the_hole_value_location(masm->isolate())));
__ lw(a3, MemOperand(t0));
- __ li(t0, Operand(ExternalReference(Isolate::k_pending_exception_address,
+ __ li(t0, Operand(ExternalReference(Isolate::kPendingExceptionAddress,
masm->isolate())));
__ lw(v0, MemOperand(t0));
__ sw(a3, MemOperand(t0));
@@ -3714,7 +3714,7 @@
int marker = is_construct ? StackFrame::ENTRY_CONSTRUCT :
StackFrame::ENTRY;
__ li(t2, 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())));
__ lw(t0, MemOperand(t0));
__ Push(t3, t2, t1, t0);
@@ -3739,7 +3739,7 @@
// If this is the outermost JS call, set js_entry_sp value.
Label non_outermost_js;
- ExternalReference js_entry_sp(Isolate::k_js_entry_sp_address,
+ ExternalReference js_entry_sp(Isolate::kJSEntrySPAddress,
masm->isolate());
__ li(t1, Operand(ExternalReference(js_entry_sp)));
__ lw(t2, MemOperand(t1));
@@ -3762,7 +3762,7 @@
// exception field in the JSEnv and return a failure sentinel.
// Coming in here the fp will be invalid because the PushTryHandler below
// 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())));
__ sw(v0, MemOperand(t0)); // We come back from 'invoke'. result is in
v0.
__ li(v0, Operand(reinterpret_cast<int32_t>(Failure::Exception())));
@@ -3781,7 +3781,7 @@
__ li(t0,
Operand(ExternalReference::the_hole_value_location(masm->isolate())));
__ lw(t1, MemOperand(t0));
- __ li(t0, Operand(ExternalReference(Isolate::k_pending_exception_address,
+ __ li(t0, Operand(ExternalReference(Isolate::kPendingExceptionAddress,
masm->isolate())));
__ sw(t1, MemOperand(t0));
@@ -3832,7 +3832,7 @@
// Restore the top frame descriptors from the stack.
__ pop(t1);
- __ li(t0, Operand(ExternalReference(Isolate::k_c_entry_fp_address,
+ __ li(t0, Operand(ExternalReference(Isolate::kCEntryFPAddress,
masm->isolate())));
__ sw(t1, MemOperand(t0));
@@ -4718,7 +4718,7 @@
__ li(a1, Operand(
ExternalReference::the_hole_value_location(masm->isolate())));
__ lw(a1, MemOperand(a1, 0));
- __ li(a2, Operand(ExternalReference(Isolate::k_pending_exception_address,
+ __ li(a2, Operand(ExternalReference(Isolate::kPendingExceptionAddress,
masm->isolate())));
__ lw(v0, MemOperand(a2, 0));
__ Branch(&runtime, eq, v0, Operand(a1));
=======================================
--- /branches/bleeding_edge/src/mips/macro-assembler-mips.cc Mon Sep 5
02:05:52 2011
+++ /branches/bleeding_edge/src/mips/macro-assembler-mips.cc Thu Sep 8
09:29:57 2011
@@ -2337,7 +2337,7 @@
li(t0, Operand(StackHandler::TRY_FINALLY));
}
// 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));
addiu(sp, sp, -StackHandlerConstants::kSize);
@@ -2359,7 +2359,7 @@
li(t0, Operand(StackHandler::ENTRY));
// 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));
ASSERT(Smi::FromInt(0) == 0); // Used for no context.
@@ -2381,7 +2381,7 @@
STATIC_ASSERT(StackHandlerConstants::kNextOffset == 0);
pop(a1);
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));
}
@@ -2399,7 +2399,7 @@
STATIC_ASSERT(StackHandlerConstants::kPCOffset == 4 * kPointerSize);
// Drop the sp to the top of the handler.
- li(a3, Operand(ExternalReference(Isolate::k_handler_address,
+ li(a3, Operand(ExternalReference(Isolate::kHandlerAddress,
isolate())));
lw(sp, MemOperand(a3));
@@ -2462,7 +2462,7 @@
Move(v0, value);
// 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));
// Unwind the handlers until the ENTRY handler is found.
@@ -2485,7 +2485,7 @@
if (type == OUT_OF_MEMORY) {
// Set external caught exception to false.
ExternalReference external_caught(
- Isolate::k_external_caught_exception_address, isolate());
+ Isolate::kExternalCaughtExceptionAddress, isolate());
li(a0, Operand(false, RelocInfo::NONE));
li(a2, Operand(external_caught));
sw(a0, MemOperand(a2));
@@ -2493,7 +2493,7 @@
// Set pending exception and v0 to out of memory exception.
Failure* out_of_memory = Failure::OutOfMemoryException();
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())));
sw(v0, MemOperand(a2));
}
@@ -3973,9 +3973,9 @@
sw(t8, MemOperand(fp, ExitFrameConstants::kCodeOffset));
// 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));
- li(t8, Operand(ExternalReference(Isolate::k_context_address,
isolate())));
+ li(t8, Operand(ExternalReference(Isolate::kContextAddress, isolate())));
sw(cp, MemOperand(t8));
const int frame_alignment = MacroAssembler::ActivationFrameAlignment();
@@ -4025,11 +4025,11 @@
}
// 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));
// 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));
#ifdef DEBUG
sw(a3, MemOperand(t8));
=======================================
--- /branches/bleeding_edge/src/serialize.cc Wed Aug 17 01:48:54 2011
+++ /branches/bleeding_edge/src/serialize.cc Thu Sep 8 09:29:57 2011
@@ -240,13 +240,14 @@
// Top addresses
const char* AddressNames[] = {
-#define C(name) "Isolate::" #name,
- ISOLATE_ADDRESS_LIST(C)
+#define BUILD_NAME_LITERAL(CamelName, hacker_name) \
+ "Isolate::" #hacker_name "_address",
+ FOR_EACH_ISOLATE_ADDRESS_NAME(BUILD_NAME_LITERAL)
NULL
#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),
TOP_ADDRESS, i, AddressNames[i]);
}
=======================================
--- /branches/bleeding_edge/src/x64/code-stubs-x64.cc Thu Sep 1 08:24:26
2011
+++ /branches/bleeding_edge/src/x64/code-stubs-x64.cc Thu Sep 8 09:29:57
2011
@@ -2712,7 +2712,7 @@
// 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(
- Isolate::k_pending_exception_address, isolate);
+ Isolate::kPendingExceptionAddress, isolate);
Operand pending_exception_operand =
masm->ExternalOperand(pending_exception_address, rbx);
__ movq(rax, pending_exception_operand);
@@ -3428,7 +3428,7 @@
// Retrieve the pending exception and clear the variable.
ExternalReference pending_exception_address(
- Isolate::k_pending_exception_address, masm->isolate());
+ Isolate::kPendingExceptionAddress, masm->isolate());
Operand pending_exception_operand =
masm->ExternalOperand(pending_exception_address);
__ movq(rax, pending_exception_operand);
@@ -3568,14 +3568,14 @@
Isolate* isolate = masm->isolate();
// 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);
__ push(c_entry_fp_operand);
}
// 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);
__ testq(rax, rax);
__ j(not_zero, ¬_outermost_js);
@@ -3593,7 +3593,7 @@
// Caught exception: Store result (exception) in the pending
// exception field in the JSEnv and return a failure sentinel.
- ExternalReference pending_exception(Isolate::k_pending_exception_address,
+ ExternalReference pending_exception(Isolate::kPendingExceptionAddress,
isolate);
__ Store(pending_exception, rax);
__ movq(rax, Failure::Exception(), RelocInfo::NONE);
=======================================
--- /branches/bleeding_edge/src/x64/macro-assembler-x64.cc Thu Sep 1
08:24:26 2011
+++ /branches/bleeding_edge/src/x64/macro-assembler-x64.cc Thu Sep 8
09:29:57 2011
@@ -2415,7 +2415,7 @@
}
// Save the current handler.
Operand handler_operand =
- ExternalOperand(ExternalReference(Isolate::k_handler_address,
isolate()));
+ ExternalOperand(ExternalReference(Isolate::kHandlerAddress,
isolate()));
push(handler_operand);
// Link this handler.
movq(handler_operand, rsp);
@@ -2426,7 +2426,7 @@
ASSERT_EQ(0, StackHandlerConstants::kNextOffset);
// Unlink this handler.
Operand handler_operand =
- ExternalOperand(ExternalReference(Isolate::k_handler_address,
isolate()));
+ ExternalOperand(ExternalReference(Isolate::kHandlerAddress,
isolate()));
pop(handler_operand);
// Remove the remaining fields.
addq(rsp, Immediate(StackHandlerConstants::kSize - kPointerSize));
@@ -2446,7 +2446,7 @@
movq(rax, value);
}
- ExternalReference handler_address(Isolate::k_handler_address, isolate());
+ ExternalReference handler_address(Isolate::kHandlerAddress, isolate());
Operand handler_operand = ExternalOperand(handler_address);
movq(rsp, handler_operand);
// get next in chain
@@ -2482,7 +2482,7 @@
movq(rax, value);
}
// Fetch top stack handler.
- ExternalReference handler_address(Isolate::k_handler_address, isolate());
+ ExternalReference handler_address(Isolate::kHandlerAddress, isolate());
Load(rsp, handler_address);
// Unwind the handlers until the ENTRY handler is found.
@@ -2505,12 +2505,12 @@
if (type == OUT_OF_MEMORY) {
// Set external caught exception to false.
ExternalReference external_caught(
- Isolate::k_external_caught_exception_address, isolate());
+ Isolate::kExternalCaughtExceptionAddress, isolate());
Set(rax, static_cast<int64_t>(false));
Store(external_caught, rax);
// Set pending exception and rax to out of memory exception.
- ExternalReference
pending_exception(Isolate::k_pending_exception_address,
+ ExternalReference pending_exception(Isolate::kPendingExceptionAddress,
isolate());
movq(rax, Failure::OutOfMemoryException(), RelocInfo::NONE);
Store(pending_exception, rax);
@@ -3041,8 +3041,8 @@
movq(r14, rax); // Backup rax in callee-save register.
}
- Store(ExternalReference(Isolate::k_c_entry_fp_address, isolate()), rbp);
- Store(ExternalReference(Isolate::k_context_address, isolate()), rsi);
+ Store(ExternalReference(Isolate::kCEntryFPAddress, isolate()), rbp);
+ Store(ExternalReference(Isolate::kContextAddress, isolate()), rsi);
}
@@ -3132,7 +3132,7 @@
void MacroAssembler::LeaveExitFrameEpilogue() {
// 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);
movq(rsi, context_operand);
#ifdef DEBUG
@@ -3140,7 +3140,7 @@
#endif
// Clear the top frame.
- ExternalReference c_entry_fp_address(Isolate::k_c_entry_fp_address,
+ ExternalReference c_entry_fp_address(Isolate::kCEntryFPAddress,
isolate());
Operand c_entry_fp_operand = ExternalOperand(c_entry_fp_address);
movq(c_entry_fp_operand, Immediate(0));
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev