Fix warnings when building with clang.
Fix warnings when building with clang.
1.1 --- a/src/API.cpp Sun Jan 27 17:34:30 2013 -0800
1.2 +++ b/src/API.cpp Mon Jun 10 00:46:29 2013 +0100
1.3 @@ -103,7 +103,7 @@
1.4 {
1.5 PoolScope poolScope(ZONE()->pool());
1.6 RootScope roots(ZONE());
1.7 - CompileContext cc(ZONE(), name);
1.8 + CompileContext cc(ZONE());
1.9
1.10 if (!cc.initialize(package, name))
1.11 return false;
2.1 --- a/src/GlobalRoots.cpp Sun Jan 27 17:34:30 2013 -0800
2.2 +++ b/src/GlobalRoots.cpp Mon Jun 10 00:46:29 2013 +0100
2.3 @@ -24,7 +24,6 @@
2.4 using namespace ke;
2.5
2.6 GlobalRoots::GlobalRoots(Zone *zone)
2.7 - : zone_(zone)
2.8 {
2.9 }
2.10
3.1 --- a/src/GlobalRoots.h Sun Jan 27 17:34:30 2013 -0800
3.2 +++ b/src/GlobalRoots.h Mon Jun 10 00:46:29 2013 +0100
3.3 @@ -37,8 +37,6 @@
3.4
3.5 class GlobalRoots
3.6 {
3.7 - Zone *zone_;
3.8 -
3.9 public:
3.10 GlobalRoots(Zone *zone);
3.11 ~GlobalRoots();
4.1 --- a/src/Spaces.h Sun Jan 27 17:34:30 2013 -0800
4.2 +++ b/src/Spaces.h Mon Jun 10 00:46:29 2013 +0100
4.3 @@ -278,6 +278,7 @@
4.4
4.5 class FreedObject
4.6 {
4.7 + protected:
4.8 Map *map_;
4.9 size_t bytes_;
4.10 FreedObject *next_;
5.1 --- a/src/compiler/BytecodeEmitter.cpp Sun Jan 27 17:34:30 2013 -0800
5.2 +++ b/src/compiler/BytecodeEmitter.cpp Mon Jun 10 00:46:29 2013 +0100
5.3 @@ -83,9 +83,8 @@
5.4 visitor->visit(reinterpret_cast<Object **>(&strings_[i].string));
5.5 }
5.6
5.7 -BytecodeEmitter::BytecodeEmitter(PoolAllocator &pool)
5.8 +BytecodeEmitter::BytecodeEmitter()
5.9 : AutoRooted(ZONE()),
5.10 - pool_(pool),
5.11 buffer_(inline_buffer_),
5.12 buffer_pos_(buffer_),
5.13 buffer_end_(buffer_pos_ + ARRAY_LENGTH(inline_buffer_)),
6.1 --- a/src/compiler/BytecodeEmitter.h Sun Jan 27 17:34:30 2013 -0800
6.2 +++ b/src/compiler/BytecodeEmitter.h Mon Jun 10 00:46:29 2013 +0100
6.3 @@ -121,8 +121,6 @@
6.4 class BytecodeEmitter : public AutoRooted
6.5 {
6.6 private:
6.7 - PoolAllocator &pool_;
6.8 -
6.9 bytecode *buffer_;
6.10 bytecode *buffer_pos_;
6.11 bytecode *buffer_end_;
6.12 @@ -201,7 +199,7 @@
6.13 }
6.14
6.15 public:
6.16 - BytecodeEmitter(PoolAllocator &pool);
6.17 + BytecodeEmitter();
6.18 ~BytecodeEmitter();
6.19
6.20 void accept(VirtualObjectVisitor *visitor);
7.1 --- a/src/compiler/CompileContext.cpp Sun Jan 27 17:34:30 2013 -0800
7.2 +++ b/src/compiler/CompileContext.cpp Mon Jun 10 00:46:29 2013 +0100
7.3 @@ -33,9 +33,8 @@
7.4
7.5 using namespace ke;
7.6
7.7 -CompileContext::CompileContext(Zone *zone, const char *file)
7.8 +CompileContext::CompileContext(Zone *zone)
7.9 : zone_(zone),
7.10 - file_(file),
7.11 active_(NULL)
7.12 {
7.13 }
8.1 --- a/src/compiler/CompileContext.h Sun Jan 27 17:34:30 2013 -0800
8.2 +++ b/src/compiler/CompileContext.h Mon Jun 10 00:46:29 2013 +0100
8.3 @@ -126,7 +126,6 @@
8.4 class CompileContext
8.5 {
8.6 Zone *zone_;
8.7 - const char *file_;
8.8 Vector<TranslationUnit *> units_;
8.9 Vector<TranslationUnit *> unparsed_;
8.10 TranslationUnit *active_;
8.11 @@ -139,7 +138,7 @@
8.12 bool add(Handle<Module> module);
8.13
8.14 public:
8.15 - CompileContext(Zone *zone, const char *file);
8.16 + CompileContext(Zone *zone);
8.17 ~CompileContext();
8.18
8.19 bool initialize(Handle<Package> package, const char *name);
9.1 --- a/src/compiler/SemanticAnalysis.cpp Sun Jan 27 17:34:30 2013 -0800
9.2 +++ b/src/compiler/SemanticAnalysis.cpp Mon Jun 10 00:46:29 2013 +0100
9.3 @@ -63,7 +63,6 @@
9.4 cc_(cc),
9.5 unit_(unit),
9.6 hir_(NULL),
9.7 - emitter_(pool_),
9.8 loop_(NULL)
9.9 {
9.10 }
9.11 @@ -75,7 +74,6 @@
9.12 unit_(parent->unit_),
9.13 hir_(NULL),
9.14 scope_(parent->scope_),
9.15 - emitter_(pool_),
9.16 fun_(fun),
9.17 loop_(NULL),
9.18 control_(NULL)