Reviewers: danno,
Message:
Happened to find these while building using Chromium's version of clang.
Description:
Remove unused private member variables found by clang -Wunused-private-field
Please review this at https://codereview.chromium.org/11414207/
SVN Base: http://v8.googlecode.com/svn/branches/bleeding_edge
Affected files:
M src/d8.cc
M src/deoptimizer.h
M src/incremental-marking.cc
M src/objects.cc
M src/parser.h
M src/spaces.h
M src/store-buffer.h
M test/cctest/test-api.cc
M test/cctest/test-heap-profiler.cc
M test/cctest/test-lockers.cc
Index: src/d8.cc
diff --git a/src/d8.cc b/src/d8.cc
index
814a8f44ee52e11c25ee104b133808d6337a5017..8233f861ea46c85dc344e83e61c4539a4fac5694
100644
--- a/src/d8.cc
+++ b/src/d8.cc
@@ -1511,9 +1511,9 @@ void Shell::RunShell(Isolate* isolate) {
class ShellThread : public i::Thread {
public:
// Takes ownership of the underlying char array of |files|.
- ShellThread(Isolate* isolate, int no, char* files)
+ ShellThread(Isolate* isolate, char* files)
: Thread("d8:ShellThread"),
- isolate_(isolate), no_(no), files_(files) { }
+ isolate_(isolate), files_(files) { }
~ShellThread() {
delete[] files_;
@@ -1522,7 +1522,6 @@ class ShellThread : public i::Thread {
virtual void Run();
private:
Isolate* isolate_;
- int no_;
char* files_;
};
@@ -1829,7 +1828,7 @@ int Shell::RunMain(Isolate* isolate, int argc, char*
argv[]) {
printf("File list '%s' not found\n", options.parallel_files[i]);
Exit(1);
}
- ShellThread* thread = new ShellThread(isolate, threads.length(),
files);
+ ShellThread* thread = new ShellThread(isolate, files);
thread->Start();
threads.Add(thread);
}
Index: src/deoptimizer.h
diff --git a/src/deoptimizer.h b/src/deoptimizer.h
index
4aa38cefee08263bf926186d89617e223964a0a2..89955b38bde84d67790ef01e5d3c87d7ad9b260a
100644
--- a/src/deoptimizer.h
+++ b/src/deoptimizer.h
@@ -537,9 +537,6 @@ class FrameDescription {
intptr_t context_;
StackFrame::Type type_;
Smi* state_;
-#ifdef DEBUG
- Code::Kind kind_;
-#endif
// Continuation is the PC where the execution continues after
// deoptimizing.
Index: src/incremental-marking.cc
diff --git a/src/incremental-marking.cc b/src/incremental-marking.cc
index
8cdcdb5e5e4364102baee95166d7424fa7a503dc..3030bdf8cacdccf8e66e6e54f9d00bbe95fa2302
100644
--- a/src/incremental-marking.cc
+++ b/src/incremental-marking.cc
@@ -338,10 +338,9 @@ class IncrementalMarkingMarkingVisitor
class IncrementalMarkingRootMarkingVisitor : public ObjectVisitor {
public:
- IncrementalMarkingRootMarkingVisitor(Heap* heap,
- IncrementalMarking*
incremental_marking)
- : heap_(heap),
- incremental_marking_(incremental_marking) {
+ explicit IncrementalMarkingRootMarkingVisitor(
+ IncrementalMarking* incremental_marking)
+ : incremental_marking_(incremental_marking) {
}
void VisitPointer(Object** p) {
@@ -368,7 +367,6 @@ class IncrementalMarkingRootMarkingVisitor : public
ObjectVisitor {
}
}
- Heap* heap_;
IncrementalMarking* incremental_marking_;
};
@@ -628,7 +626,7 @@ void IncrementalMarking::StartMarking(CompactionFlag
flag) {
}
// Mark strong roots grey.
- IncrementalMarkingRootMarkingVisitor visitor(heap_, this);
+ IncrementalMarkingRootMarkingVisitor visitor(this);
heap_->IterateStrongRoots(&visitor, VISIT_ONLY_STRONG);
// Ready to start incremental marking.
Index: src/objects.cc
diff --git a/src/objects.cc b/src/objects.cc
index
0c451b878233d4c7d0328ea16a71ff60ab087624..1aa90055c87e3ca4b0b906d11bd2fadf6beafe2d
100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -11596,9 +11596,8 @@ class SubStringAsciiSymbolKey : public HashTableKey
{
public:
explicit SubStringAsciiSymbolKey(Handle<SeqOneByteString> string,
int from,
- int length,
- uint32_t seed)
- : string_(string), from_(from), length_(length), seed_(seed) { }
+ int length)
+ : string_(string), from_(from), length_(length) { }
uint32_t Hash() {
ASSERT(length_ >= 0);
@@ -11655,7 +11654,6 @@ class SubStringAsciiSymbolKey : public HashTableKey
{
int from_;
int length_;
uint32_t hash_field_;
- uint32_t seed_;
};
@@ -12581,7 +12579,7 @@ MaybeObject*
SymbolTable::LookupSubStringAsciiSymbol(
int from,
int length,
Object** s) {
- SubStringAsciiSymbolKey key(str, from, length, GetHeap()->HashSeed());
+ SubStringAsciiSymbolKey key(str, from, length);
return LookupKey(&key, s);
}
Index: src/parser.h
diff --git a/src/parser.h b/src/parser.h
index
93fd1b8aa95f326141e548c1967054341113388b..0f85f91583b161ceab4d80d6cd81b570f144f6d9
100644
--- a/src/parser.h
+++ b/src/parser.h
@@ -96,7 +96,6 @@ class FunctionEntry BASE_EMBEDDED {
private:
Vector<unsigned> backing_;
- bool owns_data_;
};
Index: src/spaces.h
diff --git a/src/spaces.h b/src/spaces.h
index
2e5367aa0ec992eee765a8b4516260c5b8fe7acc..56f629e02f5836ecb7a707ede42d0ae45abfda6e
100644
--- a/src/spaces.h
+++ b/src/spaces.h
@@ -2440,11 +2440,9 @@ class FixedSpace : public PagedSpace {
FixedSpace(Heap* heap,
intptr_t max_capacity,
AllocationSpace id,
- int object_size_in_bytes,
- const char* name)
+ int object_size_in_bytes)
: PagedSpace(heap, max_capacity, id, NOT_EXECUTABLE),
- object_size_in_bytes_(object_size_in_bytes),
- name_(name) {
+ object_size_in_bytes_(object_size_in_bytes) {
page_extra_ = Page::kNonCodeObjectAreaSize % object_size_in_bytes;
}
@@ -2461,9 +2459,6 @@ class FixedSpace : public PagedSpace {
private:
// The size of objects in this space.
int object_size_in_bytes_;
-
- // The name of this space.
- const char* name_;
};
@@ -2474,7 +2469,7 @@ class MapSpace : public FixedSpace {
public:
// Creates a map space object with a maximum capacity.
MapSpace(Heap* heap, intptr_t max_capacity, AllocationSpace id)
- : FixedSpace(heap, max_capacity, id, Map::kSize, "map"),
+ : FixedSpace(heap, max_capacity, id, Map::kSize),
max_map_space_pages_(kMaxMapPageIndex - 1) {
}
@@ -2515,7 +2510,7 @@ class CellSpace : public FixedSpace {
public:
// Creates a property cell space object with a maximum capacity.
CellSpace(Heap* heap, intptr_t max_capacity, AllocationSpace id)
- : FixedSpace(heap, max_capacity, id,
JSGlobalPropertyCell::kSize, "cell")
+ : FixedSpace(heap, max_capacity, id, JSGlobalPropertyCell::kSize)
{}
virtual int RoundSizeDownToObjectAlignment(int size) {
Index: src/store-buffer.h
diff --git a/src/store-buffer.h b/src/store-buffer.h
index
0ade8cee17ee77e27698f3a2681e594310194890..79046d1540f83f30dcded12e1b3098e571f238b7
100644
--- a/src/store-buffer.h
+++ b/src/store-buffer.h
@@ -210,8 +210,7 @@ class StoreBufferRebuildScope {
explicit StoreBufferRebuildScope(Heap* heap,
StoreBuffer* store_buffer,
StoreBufferCallback callback)
- : heap_(heap),
- store_buffer_(store_buffer),
+ : store_buffer_(store_buffer),
stored_state_(store_buffer->store_buffer_rebuilding_enabled_),
stored_callback_(store_buffer->callback_) {
store_buffer_->store_buffer_rebuilding_enabled_ = true;
@@ -226,7 +225,6 @@ class StoreBufferRebuildScope {
}
private:
- Heap* heap_;
StoreBuffer* store_buffer_;
bool stored_state_;
StoreBufferCallback stored_callback_;
Index: test/cctest/test-api.cc
diff --git a/test/cctest/test-api.cc b/test/cctest/test-api.cc
index
957f131342f0e020443447e5a52298db2e2c5faa..aa85e2a899e35f6bd0d2e201816f48d1af7956db
100644
--- a/test/cctest/test-api.cc
+++ b/test/cctest/test-api.cc
@@ -17993,7 +17993,6 @@ class ThreadInterruptTest {
private:
ThreadInterruptTest* test_;
- struct sigaction sa_;
};
i::Semaphore* sem_;
Index: test/cctest/test-heap-profiler.cc
diff --git a/test/cctest/test-heap-profiler.cc
b/test/cctest/test-heap-profiler.cc
index
52359711d16900de07c8e4bc07894b7518dc1869..eeb5a9d23ee48895011e027e3d49a8a9697c739f
100644
--- a/test/cctest/test-heap-profiler.cc
+++ b/test/cctest/test-heap-profiler.cc
@@ -1015,7 +1015,6 @@ class TestRetainedObjectInfo : public
v8::RetainedObjectInfo {
private:
bool disposed_;
- int category_;
int hash_;
const char* group_label_;
const char* label_;
Index: test/cctest/test-lockers.cc
diff --git a/test/cctest/test-lockers.cc b/test/cctest/test-lockers.cc
index
5035f876429921666473f8c6f3b161ce44b863d1..57f717849300ff781230e542b4fc8ced60dcb00b
100644
--- a/test/cctest/test-lockers.cc
+++ b/test/cctest/test-lockers.cc
@@ -59,9 +59,9 @@ using ::v8::V8;
class KangarooThread : public v8::internal::Thread {
public:
KangarooThread(v8::Isolate* isolate,
- v8::Handle<v8::Context> context, int value)
+ v8::Handle<v8::Context> context)
: Thread("KangarooThread"),
- isolate_(isolate), context_(context), value_(value) {
+ isolate_(isolate), context_(context) {
}
void Run() {
@@ -90,7 +90,6 @@ class KangarooThread : public v8::internal::Thread {
private:
v8::Isolate* isolate_;
Persistent<v8::Context> context_;
- int value_;
};
// Migrates an isolate from one thread to another
@@ -106,7 +105,7 @@ TEST(KangarooIsolates) {
CHECK_EQ(isolate, v8::internal::Isolate::Current());
CompileRun("function getValue() { return 30; }");
}
- KangarooThread thread1(isolate, context, 1);
+ KangarooThread thread1(isolate, context);
thread1.Start();
thread1.Join();
}
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev