Revision: 21421
Author: [email protected]
Date: Thu May 22 07:57:33 2014 UTC
Log: Remove special debug ExternalReferences.
[email protected]
Review URL: https://codereview.chromium.org/296043002
http://code.google.com/p/v8/source/detail?r=21421
Modified:
/branches/bleeding_edge/src/arm/debug-arm.cc
/branches/bleeding_edge/src/arm64/debug-arm64.cc
/branches/bleeding_edge/src/assembler.cc
/branches/bleeding_edge/src/assembler.h
/branches/bleeding_edge/src/debug.h
/branches/bleeding_edge/src/ia32/debug-ia32.cc
/branches/bleeding_edge/src/mips/debug-mips.cc
/branches/bleeding_edge/src/serialize.cc
/branches/bleeding_edge/src/serialize.h
/branches/bleeding_edge/src/x64/debug-x64.cc
/branches/bleeding_edge/test/cctest/test-disasm-ia32.cc
/branches/bleeding_edge/test/cctest/test-disasm-x64.cc
=======================================
--- /branches/bleeding_edge/src/arm/debug-arm.cc Mon May 5 07:10:38 2014
UTC
+++ /branches/bleeding_edge/src/arm/debug-arm.cc Thu May 22 07:57:33 2014
UTC
@@ -148,7 +148,7 @@
// jumping to the target address intended by the caller and that was
// overwritten by the address of DebugBreakXXX.
ExternalReference after_break_target =
- ExternalReference(Debug_Address::AfterBreakTarget(),
masm->isolate());
+ ExternalReference::debug_after_break_target_address(masm->isolate());
__ mov(ip, Operand(after_break_target));
__ ldr(ip, MemOperand(ip));
__ Jump(ip);
=======================================
--- /branches/bleeding_edge/src/arm64/debug-arm64.cc Mon May 5 07:10:38
2014 UTC
+++ /branches/bleeding_edge/src/arm64/debug-arm64.cc Thu May 22 07:57:33
2014 UTC
@@ -207,8 +207,8 @@
// Now that the break point has been handled, resume normal execution by
// jumping to the target address intended by the caller and that was
// overwritten by the address of DebugBreakXXX.
- ExternalReference after_break_target(Debug_Address::AfterBreakTarget(),
- masm->isolate());
+ ExternalReference after_break_target =
+ ExternalReference::debug_after_break_target_address(masm->isolate());
__ Mov(scratch, after_break_target);
__ Ldr(scratch, MemOperand(scratch));
__ Br(scratch);
=======================================
--- /branches/bleeding_edge/src/assembler.cc Fri May 16 15:18:24 2014 UTC
+++ /branches/bleeding_edge/src/assembler.cc Thu May 22 07:57:33 2014 UTC
@@ -996,9 +996,6 @@
Isolate* isolate)
: address_(Redirect(isolate, ic_utility.address())) {}
-ExternalReference::ExternalReference(const Debug_Address& debug_address,
- Isolate* isolate)
- : address_(debug_address.address(isolate)) {}
ExternalReference::ExternalReference(StatsCounter* counter)
: address_(reinterpret_cast<Address>(counter->GetInternalPointer())) {}
@@ -1429,6 +1426,20 @@
ASSERT(CpuFeatures::initialized_);
return ExternalReference(&CpuFeatures::supported_);
}
+
+
+ExternalReference ExternalReference::debug_after_break_target_address(
+ Isolate* isolate) {
+ return ExternalReference(isolate->debug()->after_break_target_address());
+}
+
+
+ExternalReference
+ ExternalReference::debug_restarter_frame_function_pointer_address(
+ Isolate* isolate) {
+ return ExternalReference(
+ isolate->debug()->restarter_frame_function_pointer_address());
+}
double power_helper(double x, double y) {
=======================================
--- /branches/bleeding_edge/src/assembler.h Tue May 20 09:21:45 2014 UTC
+++ /branches/bleeding_edge/src/assembler.h Thu May 22 07:57:33 2014 UTC
@@ -794,8 +794,6 @@
ExternalReference(const IC_Utility& ic_utility, Isolate* isolate);
- ExternalReference(const Debug_Address& debug_address, Isolate* isolate);
-
explicit ExternalReference(StatsCounter* counter);
ExternalReference(Isolate::AddressId id, Isolate* isolate);
@@ -915,6 +913,10 @@
static ExternalReference cpu_features();
+ static ExternalReference debug_after_break_target_address(Isolate*
isolate);
+ static ExternalReference debug_restarter_frame_function_pointer_address(
+ Isolate* isolate);
+
static ExternalReference is_profiling_address(Isolate* isolate);
static ExternalReference invoke_function_callback(Isolate* isolate);
static ExternalReference invoke_accessor_getter_callback(Isolate*
isolate);
=======================================
--- /branches/bleeding_edge/src/debug.h Wed May 21 15:00:32 2014 UTC
+++ /branches/bleeding_edge/src/debug.h Thu May 22 07:57:33 2014 UTC
@@ -342,12 +342,13 @@
};
// Support for setting the address to jump to when returning from break
point.
- Address* after_break_target_address() {
- return reinterpret_cast<Address*>(&thread_local_.after_break_target_);
+ Address after_break_target_address() {
+ return reinterpret_cast<Address>(&thread_local_.after_break_target_);
}
- Address* restarter_frame_function_pointer_address() {
+
+ Address restarter_frame_function_pointer_address() {
Object*** address = &thread_local_.restarter_frame_function_pointer_;
- return reinterpret_cast<Address*>(address);
+ return reinterpret_cast<Address>(address);
}
static const int kEstimatedNofDebugInfoEntries = 16;
@@ -927,39 +928,6 @@
bool prev_disable_break_;
};
-
-// Debug_Address encapsulates the Address pointers used in generating debug
-// code.
-class Debug_Address {
- public:
- explicit Debug_Address(Debug::AddressId id) : id_(id) { }
-
- static Debug_Address AfterBreakTarget() {
- return Debug_Address(Debug::k_after_break_target_address);
- }
-
- static Debug_Address RestarterFrameFunctionPointer() {
- return Debug_Address(Debug::k_restarter_frame_function_pointer);
- }
-
- Address address(Isolate* isolate) const {
- Debug* debug = isolate->debug();
- switch (id_) {
- case Debug::k_after_break_target_address:
- return
reinterpret_cast<Address>(debug->after_break_target_address());
- case Debug::k_restarter_frame_function_pointer:
- return reinterpret_cast<Address>(
- debug->restarter_frame_function_pointer_address());
- default:
- UNREACHABLE();
- return NULL;
- }
- }
-
- private:
- Debug::AddressId id_;
-};
-
} } // namespace v8::internal
#endif // V8_DEBUG_H_
=======================================
--- /branches/bleeding_edge/src/ia32/debug-ia32.cc Mon May 5 07:10:38 2014
UTC
+++ /branches/bleeding_edge/src/ia32/debug-ia32.cc Thu May 22 07:57:33 2014
UTC
@@ -167,7 +167,7 @@
// jumping to the target address intended by the caller and that was
// overwritten by the address of DebugBreakXXX.
ExternalReference after_break_target =
- ExternalReference(Debug_Address::AfterBreakTarget(),
masm->isolate());
+ ExternalReference::debug_after_break_target_address(masm->isolate());
__ jmp(Operand::StaticVariable(after_break_target));
}
@@ -308,8 +308,8 @@
void Debug::GenerateFrameDropperLiveEdit(MacroAssembler* masm) {
ExternalReference restarter_frame_function_slot =
- ExternalReference(Debug_Address::RestarterFrameFunctionPointer(),
- masm->isolate());
+ ExternalReference::debug_restarter_frame_function_pointer_address(
+ masm->isolate());
__ mov(Operand::StaticVariable(restarter_frame_function_slot),
Immediate(0));
// We do not know our frame height, but set esp based on ebp.
=======================================
--- /branches/bleeding_edge/src/mips/debug-mips.cc Mon May 5 07:10:38 2014
UTC
+++ /branches/bleeding_edge/src/mips/debug-mips.cc Thu May 22 07:57:33 2014
UTC
@@ -155,8 +155,9 @@
// Now that the break point has been handled, resume normal execution by
// jumping to the target address intended by the caller and that was
// overwritten by the address of DebugBreakXXX.
- __ li(t9, Operand(
- ExternalReference(Debug_Address::AfterBreakTarget(),
masm->isolate())));
+ ExternalReference after_break_target =
+ ExternalReference::debug_after_break_target_address(masm->isolate());
+ __ li(t9, Operand(after_break_target));
__ lw(t9, MemOperand(t9));
__ Jump(t9);
}
=======================================
--- /branches/bleeding_edge/src/serialize.cc Thu May 22 05:36:27 2014 UTC
+++ /branches/bleeding_edge/src/serialize.cc Thu May 22 07:57:33 2014 UTC
@@ -184,16 +184,6 @@
ref_table[i].name,
isolate);
}
-
- // Debug addresses
- Add(Debug_Address(Debug::k_after_break_target_address).address(isolate),
- DEBUG_ADDRESS,
- Debug::k_after_break_target_address << kDebugIdShift,
- "Debug::after_break_target_address()");
-
Add(Debug_Address(Debug::k_restarter_frame_function_pointer).address(isolate),
- DEBUG_ADDRESS,
- Debug::k_restarter_frame_function_pointer << kDebugIdShift,
- "Debug::restarter_frame_function_pointer_address()");
// Stat counters
struct StatsRefTableEntry {
@@ -535,6 +525,18 @@
66,
"InvokeAccessorGetterCallback");
+ // Debug addresses
+
Add(ExternalReference::debug_after_break_target_address(isolate).address(),
+ UNCLASSIFIED,
+ 67,
+ "Debug::after_break_target_address()");
+
+ Add(ExternalReference::debug_restarter_frame_function_pointer_address(
+ isolate).address(),
+ UNCLASSIFIED,
+ 68,
+ "Debug::restarter_frame_function_pointer_address()");
+
// Add a small set of deopt entry addresses to encoder without
generating the
// deopt table code, which isn't possible at deserialization time.
HandleScope scope(isolate);
@@ -563,7 +565,7 @@
uint32_t ExternalReferenceEncoder::Encode(Address key) const {
int index = IndexOf(key);
ASSERT(key == NULL || index >= 0);
- return index >=0 ?
+ return index >= 0 ?
ExternalReferenceTable::instance(isolate_)->code(index) : 0;
}
=======================================
--- /branches/bleeding_edge/src/serialize.h Wed Apr 30 09:50:58 2014 UTC
+++ /branches/bleeding_edge/src/serialize.h Thu May 22 07:57:33 2014 UTC
@@ -17,7 +17,6 @@
BUILTIN,
RUNTIME_FUNCTION,
IC_UTILITY,
- DEBUG_ADDRESS,
STATS_COUNTER,
TOP_ADDRESS,
C_BUILTIN,
@@ -34,8 +33,6 @@
const int kReferenceIdBits = 16;
const int kReferenceIdMask = (1 << kReferenceIdBits) - 1;
const int kReferenceTypeShift = kReferenceIdBits;
-const int kDebugRegisterBits = 4;
-const int kDebugIdShift = kDebugRegisterBits;
const int kDeoptTableSerializeEntryCount = 12;
=======================================
--- /branches/bleeding_edge/src/x64/debug-x64.cc Mon May 5 07:10:38 2014
UTC
+++ /branches/bleeding_edge/src/x64/debug-x64.cc Thu May 22 07:57:33 2014
UTC
@@ -146,7 +146,7 @@
// jumping to the target address intended by the caller and that was
// overwritten by the address of DebugBreakXXX.
ExternalReference after_break_target =
- ExternalReference(Debug_Address::AfterBreakTarget(),
masm->isolate());
+ ExternalReference::debug_after_break_target_address(masm->isolate());
__ Move(kScratchRegister, after_break_target);
__ Jump(Operand(kScratchRegister, 0));
}
@@ -285,8 +285,8 @@
void Debug::GenerateFrameDropperLiveEdit(MacroAssembler* masm) {
ExternalReference restarter_frame_function_slot =
- ExternalReference(Debug_Address::RestarterFrameFunctionPointer(),
- masm->isolate());
+ ExternalReference::debug_restarter_frame_function_pointer_address(
+ masm->isolate());
__ Move(rax, restarter_frame_function_slot);
__ movp(Operand(rax, 0), Immediate(0));
=======================================
--- /branches/bleeding_edge/test/cctest/test-disasm-ia32.cc Tue May 13
08:16:26 2014 UTC
+++ /branches/bleeding_edge/test/cctest/test-disasm-ia32.cc Thu May 22
07:57:33 2014 UTC
@@ -275,7 +275,7 @@
__ jmp(&L1);
__ jmp(Operand(ebx, ecx, times_4, 10000));
ExternalReference after_break_target =
- ExternalReference(Debug_Address::AfterBreakTarget(), isolate);
+ ExternalReference::debug_after_break_target_address(isolate);
__ jmp(Operand::StaticVariable(after_break_target));
__ jmp(ic, RelocInfo::CODE_TARGET);
__ nop();
=======================================
--- /branches/bleeding_edge/test/cctest/test-disasm-x64.cc Fri Apr 25
11:00:37 2014 UTC
+++ /branches/bleeding_edge/test/cctest/test-disasm-x64.cc Thu May 22
07:57:33 2014 UTC
@@ -261,7 +261,7 @@
// TODO(mstarzinger): The following is protected.
// __ jmp(Operand(rbx, rcx, times_4, 10000));
ExternalReference after_break_target =
- ExternalReference(Debug_Address::AfterBreakTarget(), isolate);
+ ExternalReference::debug_after_break_target_address(isolate);
USE(after_break_target);
__ jmp(ic, RelocInfo::CODE_TARGET);
__ nop();
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.