Reviewers: Mads Ager, Description: Change a few style issues (dead code, unitialized members) flagged by Coverity Prevent. All are benign.
Please review this at http://codereview.chromium.org/159264 SVN Base: http://v8.googlecode.com/svn/branches/bleeding_edge/ Affected files: M src/bootstrapper.cc M src/rewriter.cc M src/spaces.cc Index: src/bootstrapper.cc =================================================================== --- src/bootstrapper.cc (revision 2523) +++ src/bootstrapper.cc (working copy) @@ -47,14 +47,10 @@ // generate an index for each native JS file. class SourceCodeCache BASE_EMBEDDED { public: - explicit SourceCodeCache(Script::Type type): type_(type) { } + explicit SourceCodeCache(Script::Type type): type_(type), cache_(NULL) { } void Initialize(bool create_heap_objects) { - if (create_heap_objects) { - cache_ = Heap::empty_fixed_array(); - } else { - cache_ = NULL; - } + cache_ = create_heap_objects ? Heap::empty_fixed_array() : NULL; } void Iterate(ObjectVisitor* v) { Index: src/spaces.cc =================================================================== --- src/spaces.cc (revision 2523) +++ src/spaces.cc (working copy) @@ -133,8 +133,6 @@ #endif stop_page_ = space->last_page_; break; - default: - UNREACHABLE(); } } Index: src/rewriter.cc =================================================================== --- src/rewriter.cc (revision 2523) +++ src/rewriter.cc (working copy) @@ -38,8 +38,9 @@ class AstOptimizer: public AstVisitor { public: - explicit AstOptimizer() {} - explicit AstOptimizer(Handle<String> enclosing_name) { + explicit AstOptimizer() : has_function_literal_(false) {} + explicit AstOptimizer(Handle<String> enclosing_name) + : has_function_literal_(false) { func_name_inferrer_.PushEnclosingName(enclosing_name); } --~--~---------~--~----~------------~-------~--~----~ v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev -~----------~----~----~----~------~----~------~--~---
