# HG changeset patch # User Asher Baker # Date 1370821589 -3600 # Node ID c4b1341297e5654475e9318f2f7ed0ba5288b3ee # Parent 219b49bf4a03fb50e6e8a743c4bd1bfc4768caec Fix warnings when building with clang. diff -r 219b49bf4a03 -r c4b1341297e5 src/API.cpp --- a/src/API.cpp Sun Jan 27 17:34:30 2013 -0800 +++ b/src/API.cpp Mon Jun 10 00:46:29 2013 +0100 @@ -103,7 +103,7 @@ { PoolScope poolScope(ZONE()->pool()); RootScope roots(ZONE()); - CompileContext cc(ZONE(), name); + CompileContext cc(ZONE()); if (!cc.initialize(package, name)) return false; diff -r 219b49bf4a03 -r c4b1341297e5 src/GlobalRoots.cpp --- a/src/GlobalRoots.cpp Sun Jan 27 17:34:30 2013 -0800 +++ b/src/GlobalRoots.cpp Mon Jun 10 00:46:29 2013 +0100 @@ -24,7 +24,6 @@ using namespace ke; GlobalRoots::GlobalRoots(Zone *zone) - : zone_(zone) { } diff -r 219b49bf4a03 -r c4b1341297e5 src/GlobalRoots.h --- a/src/GlobalRoots.h Sun Jan 27 17:34:30 2013 -0800 +++ b/src/GlobalRoots.h Mon Jun 10 00:46:29 2013 +0100 @@ -37,8 +37,6 @@ class GlobalRoots { - Zone *zone_; - public: GlobalRoots(Zone *zone); ~GlobalRoots(); diff -r 219b49bf4a03 -r c4b1341297e5 src/Spaces.h --- a/src/Spaces.h Sun Jan 27 17:34:30 2013 -0800 +++ b/src/Spaces.h Mon Jun 10 00:46:29 2013 +0100 @@ -278,6 +278,7 @@ class FreedObject { + protected: Map *map_; size_t bytes_; FreedObject *next_; diff -r 219b49bf4a03 -r c4b1341297e5 src/compiler/BytecodeEmitter.cpp --- a/src/compiler/BytecodeEmitter.cpp Sun Jan 27 17:34:30 2013 -0800 +++ b/src/compiler/BytecodeEmitter.cpp Mon Jun 10 00:46:29 2013 +0100 @@ -83,9 +83,8 @@ visitor->visit(reinterpret_cast(&strings_[i].string)); } -BytecodeEmitter::BytecodeEmitter(PoolAllocator &pool) +BytecodeEmitter::BytecodeEmitter() : AutoRooted(ZONE()), - pool_(pool), buffer_(inline_buffer_), buffer_pos_(buffer_), buffer_end_(buffer_pos_ + ARRAY_LENGTH(inline_buffer_)), diff -r 219b49bf4a03 -r c4b1341297e5 src/compiler/BytecodeEmitter.h --- a/src/compiler/BytecodeEmitter.h Sun Jan 27 17:34:30 2013 -0800 +++ b/src/compiler/BytecodeEmitter.h Mon Jun 10 00:46:29 2013 +0100 @@ -121,8 +121,6 @@ class BytecodeEmitter : public AutoRooted { private: - PoolAllocator &pool_; - bytecode *buffer_; bytecode *buffer_pos_; bytecode *buffer_end_; @@ -201,7 +199,7 @@ } public: - BytecodeEmitter(PoolAllocator &pool); + BytecodeEmitter(); ~BytecodeEmitter(); void accept(VirtualObjectVisitor *visitor); diff -r 219b49bf4a03 -r c4b1341297e5 src/compiler/CompileContext.cpp --- a/src/compiler/CompileContext.cpp Sun Jan 27 17:34:30 2013 -0800 +++ b/src/compiler/CompileContext.cpp Mon Jun 10 00:46:29 2013 +0100 @@ -33,9 +33,8 @@ using namespace ke; -CompileContext::CompileContext(Zone *zone, const char *file) +CompileContext::CompileContext(Zone *zone) : zone_(zone), - file_(file), active_(NULL) { } diff -r 219b49bf4a03 -r c4b1341297e5 src/compiler/CompileContext.h --- a/src/compiler/CompileContext.h Sun Jan 27 17:34:30 2013 -0800 +++ b/src/compiler/CompileContext.h Mon Jun 10 00:46:29 2013 +0100 @@ -126,7 +126,6 @@ class CompileContext { Zone *zone_; - const char *file_; Vector units_; Vector unparsed_; TranslationUnit *active_; @@ -139,7 +138,7 @@ bool add(Handle module); public: - CompileContext(Zone *zone, const char *file); + CompileContext(Zone *zone); ~CompileContext(); bool initialize(Handle package, const char *name); diff -r 219b49bf4a03 -r c4b1341297e5 src/compiler/SemanticAnalysis.cpp --- a/src/compiler/SemanticAnalysis.cpp Sun Jan 27 17:34:30 2013 -0800 +++ b/src/compiler/SemanticAnalysis.cpp Mon Jun 10 00:46:29 2013 +0100 @@ -63,7 +63,6 @@ cc_(cc), unit_(unit), hir_(NULL), - emitter_(pool_), loop_(NULL) { } @@ -75,7 +74,6 @@ unit_(parent->unit_), hir_(NULL), scope_(parent->scope_), - emitter_(pool_), fun_(fun), loop_(NULL), control_(NULL)