Commit 7e1c7896 authored by yangguo@chromium.org's avatar yangguo@chromium.org

Remove unused thread locals from debugger.

R=ulan@chromium.org

Review URL: https://codereview.chromium.org/286903003

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21391 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent eabf0602
...@@ -29,8 +29,6 @@ const RegList kJSCallerSaved = ...@@ -29,8 +29,6 @@ const RegList kJSCallerSaved =
const int kNumJSCallerSaved = 4; const int kNumJSCallerSaved = 4;
typedef Object* JSCallerSavedBuffer[kNumJSCallerSaved];
// Return the code of the n-th caller-saved register available to JavaScript // Return the code of the n-th caller-saved register available to JavaScript
// e.g. JSCallerSavedReg(0) returns r0.code() == 0 // e.g. JSCallerSavedReg(0) returns r0.code() == 0
int JSCallerSavedCode(int n); int JSCallerSavedCode(int n);
......
...@@ -15,7 +15,6 @@ const int kNumRegs = kNumberOfRegisters; ...@@ -15,7 +15,6 @@ const int kNumRegs = kNumberOfRegisters;
// Registers x0-x17 are caller-saved. // Registers x0-x17 are caller-saved.
const int kNumJSCallerSaved = 18; const int kNumJSCallerSaved = 18;
const RegList kJSCallerSaved = 0x3ffff; const RegList kJSCallerSaved = 0x3ffff;
typedef Object* JSCallerSavedBuffer[kNumJSCallerSaved];
// Number of registers for which space is reserved in safepoints. Must be a // Number of registers for which space is reserved in safepoints. Must be a
// multiple of eight. // multiple of eight.
......
...@@ -40,7 +40,6 @@ Debug::Debug(Isolate* isolate) ...@@ -40,7 +40,6 @@ Debug::Debug(Isolate* isolate)
promise_catch_handlers_(0), promise_catch_handlers_(0),
promise_getters_(0), promise_getters_(0),
isolate_(isolate) { isolate_(isolate) {
memset(registers_, 0, sizeof(JSCallerSavedBuffer));
ThreadInit(); ThreadInit();
} }
...@@ -518,10 +517,7 @@ void Debug::ThreadInit() { ...@@ -518,10 +517,7 @@ void Debug::ThreadInit() {
char* Debug::ArchiveDebug(char* storage) { char* Debug::ArchiveDebug(char* storage) {
char* to = storage; char* to = storage;
OS::MemCopy(to, reinterpret_cast<char*>(&thread_local_), sizeof(ThreadLocal)); OS::MemCopy(to, reinterpret_cast<char*>(&thread_local_), sizeof(ThreadLocal));
to += sizeof(ThreadLocal);
OS::MemCopy(to, reinterpret_cast<char*>(&registers_), sizeof(registers_));
ThreadInit(); ThreadInit();
ASSERT(to <= storage + ArchiveSpacePerThread());
return storage + ArchiveSpacePerThread(); return storage + ArchiveSpacePerThread();
} }
...@@ -530,15 +526,12 @@ char* Debug::RestoreDebug(char* storage) { ...@@ -530,15 +526,12 @@ char* Debug::RestoreDebug(char* storage) {
char* from = storage; char* from = storage;
OS::MemCopy( OS::MemCopy(
reinterpret_cast<char*>(&thread_local_), from, sizeof(ThreadLocal)); reinterpret_cast<char*>(&thread_local_), from, sizeof(ThreadLocal));
from += sizeof(ThreadLocal);
OS::MemCopy(reinterpret_cast<char*>(&registers_), from, sizeof(registers_));
ASSERT(from <= storage + ArchiveSpacePerThread());
return storage + ArchiveSpacePerThread(); return storage + ArchiveSpacePerThread();
} }
int Debug::ArchiveSpacePerThread() { int Debug::ArchiveSpacePerThread() {
return sizeof(ThreadLocal) + sizeof(JSCallerSavedBuffer); return sizeof(ThreadLocal);
} }
......
...@@ -350,11 +350,6 @@ class Debug { ...@@ -350,11 +350,6 @@ class Debug {
return reinterpret_cast<Address*>(address); return reinterpret_cast<Address*>(address);
} }
// Support for saving/restoring registers when handling debug break calls.
Object** register_address(int r) {
return &registers_[r];
}
static const int kEstimatedNofDebugInfoEntries = 16; static const int kEstimatedNofDebugInfoEntries = 16;
static const int kEstimatedNofBreakPointsInFunction = 16; static const int kEstimatedNofBreakPointsInFunction = 16;
...@@ -586,7 +581,6 @@ class Debug { ...@@ -586,7 +581,6 @@ class Debug {
}; };
// Storage location for registers when handling debug break calls // Storage location for registers when handling debug break calls
JSCallerSavedBuffer registers_;
ThreadLocal thread_local_; ThreadLocal thread_local_;
void ThreadInit(); void ThreadInit();
......
...@@ -24,8 +24,6 @@ const RegList kJSCallerSaved = ...@@ -24,8 +24,6 @@ const RegList kJSCallerSaved =
const int kNumJSCallerSaved = 5; const int kNumJSCallerSaved = 5;
typedef Object* JSCallerSavedBuffer[kNumJSCallerSaved];
// Number of registers for which space is reserved in safepoints. // Number of registers for which space is reserved in safepoints.
const int kNumSafepointRegisters = 8; const int kNumSafepointRegisters = 8;
......
...@@ -87,8 +87,6 @@ const RegList kSafepointSavedRegisters = kJSCallerSaved | kCalleeSaved; ...@@ -87,8 +87,6 @@ const RegList kSafepointSavedRegisters = kJSCallerSaved | kCalleeSaved;
const int kNumSafepointSavedRegisters = const int kNumSafepointSavedRegisters =
kNumJSCallerSaved + kNumCalleeSaved; kNumJSCallerSaved + kNumCalleeSaved;
typedef Object* JSCallerSavedBuffer[kNumJSCallerSaved];
const int kUndefIndex = -1; const int kUndefIndex = -1;
// Map with indexes on stack that corresponds to codes of saved registers. // Map with indexes on stack that corresponds to codes of saved registers.
const int kSafepointRegisterStackIndexMap[kNumRegs] = { const int kSafepointRegisterStackIndexMap[kNumRegs] = {
......
...@@ -18,8 +18,6 @@ const RegList kJSCallerSaved = ...@@ -18,8 +18,6 @@ const RegList kJSCallerSaved =
const int kNumJSCallerSaved = 5; const int kNumJSCallerSaved = 5;
typedef Object* JSCallerSavedBuffer[kNumJSCallerSaved];
// Number of registers for which space is reserved in safepoints. // Number of registers for which space is reserved in safepoints.
const int kNumSafepointRegisters = 16; const int kNumSafepointRegisters = 16;
......
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