Fix newly discovered presubmit errors.
authormstarzinger@chromium.org <mstarzinger@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Tue, 12 Aug 2014 13:33:35 +0000 (13:33 +0000)
committermstarzinger@chromium.org <mstarzinger@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Tue, 12 Aug 2014 13:33:35 +0000 (13:33 +0000)
R=jochen@chromium.org

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23081 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

36 files changed:
src/api.cc
src/arm/assembler-arm.h
src/arm/lithium-arm.h
src/arm64/assembler-arm64.h
src/arm64/instrument-arm64.h
src/arm64/lithium-arm64.h
src/arm64/macro-assembler-arm64.h
src/base/platform/platform.h
src/code-stubs.h
src/effects.h
src/hydrogen-instructions.h
src/hydrogen.cc
src/ia32/lithium-ia32.h
src/interpreter-irregexp.cc
src/libplatform/worker-thread.cc
src/log.cc
src/macro-assembler.h
src/mips/lithium-mips.h
src/mips64/lithium-mips64.h
src/optimizing-compiler-thread.h
src/splay-tree.h
src/x64/lithium-x64.h
src/x87/lithium-x87.h
test/base-unittests/platform/condition-variable-unittest.cc
test/base-unittests/platform/platform-unittest.cc
test/cctest/cctest.h
test/cctest/compiler/test-instruction.cc
test/cctest/test-api.cc
test/cctest/test-circular-queue.cc
test/cctest/test-debug.cc
test/cctest/test-declarative-accessors.cc
test/cctest/test-libplatform.h
test/cctest/test-lockers.cc
test/cctest/test-semaphore.cc
test/cctest/test-thread-termination.cc
test/cctest/test-threads.cc

index 538071af1924a2dd24b627a6bcfb813a9bcfc2fc..4a6345910f978176c56c6476f232dd0e58e496c8 100644 (file)
@@ -4290,9 +4290,7 @@ class Utf8LengthHelper : public i::AllStatic {
 
   class Visitor {
    public:
-    inline explicit Visitor()
-        : utf8_length_(0),
-          state_(kInitialState) {}
+    Visitor() : utf8_length_(0), state_(kInitialState) {}
 
     void VisitOneByteString(const uint8_t* chars, int length) {
       int utf8_length = 0;
index 2950264f097036e9c62dcb56c66c2f438edbfe19..e33f48a05b89e0354a529ff42011ba0a28176f8e 100644 (file)
@@ -649,7 +649,7 @@ class NeonListOperand BASE_EMBEDDED {
 // Class used to build a constant pool.
 class ConstantPoolBuilder BASE_EMBEDDED {
  public:
-  explicit ConstantPoolBuilder();
+  ConstantPoolBuilder();
   ConstantPoolArray::LayoutSection AddEntry(Assembler* assm,
                                             const RelocInfo& rinfo);
   void Relocate(int pc_delta);
index 0e24bda0d0e514246fecf70c033d38aac6ec2296..16f522e5b6a0334cbd647e99379a2584583f7974 100644 (file)
@@ -414,7 +414,7 @@ class LLazyBailout V8_FINAL : public LTemplateInstruction<0, 0, 0> {
 
 class LDummy V8_FINAL : public LTemplateInstruction<1, 0, 0> {
  public:
-  explicit LDummy() { }
+  LDummy() {}
   DECLARE_CONCRETE_INSTRUCTION(Dummy, "dummy")
 };
 
index d0effa79a0fa6651307bc46e2f937bc608daabea..1bafce845483049704619b88cb43617d1c07a4cd 100644 (file)
@@ -697,7 +697,7 @@ class Operand {
 // MemOperand represents a memory operand in a load or store instruction.
 class MemOperand {
  public:
-  inline explicit MemOperand();
+  inline MemOperand();
   inline explicit MemOperand(Register base,
                              ptrdiff_t offset = 0,
                              AddrMode addrmode = Offset);
index bbb7f8af7ce74f2e324337ca663ed7bf32301d4e..86ddfcbbc1ed378671fb33f6b7e0b0ebe0cd367b 100644 (file)
@@ -32,7 +32,7 @@ enum CounterType {
 
 class Counter {
  public:
-  Counter(const char* name, CounterType type = Gauge);
+  explicit Counter(const char* name, CounterType type = Gauge);
 
   void Increment();
   void Enable();
index 32c1161ee1842ac249b6c3cd568ba6ad94aae89f..21a5f741417790d1630108cb26b52afcfeacff6f 100644 (file)
@@ -452,7 +452,7 @@ class LDrop V8_FINAL : public LTemplateInstruction<0, 0, 0> {
 
 class LDummy V8_FINAL : public LTemplateInstruction<1, 0, 0> {
  public:
-  explicit LDummy() { }
+  LDummy() {}
   DECLARE_CONCRETE_INSTRUCTION(Dummy, "dummy")
 };
 
@@ -943,7 +943,7 @@ class LCheckInstanceType V8_FINAL : public LTemplateInstruction<0, 1, 1> {
 
 class LCheckMaps V8_FINAL : public LTemplateInstruction<0, 1, 1> {
  public:
-  LCheckMaps(LOperand* value = NULL, LOperand* temp = NULL) {
+  explicit LCheckMaps(LOperand* value = NULL, LOperand* temp = NULL) {
     inputs_[0] = value;
     temps_[0] = temp;
   }
index 47ffff178cd4cbd7f5b87f917395ed3bba3b2c47..aa83c7040fb130f1f5115e7d58fd36f145d010c1 100644 (file)
@@ -2201,7 +2201,7 @@ class MacroAssembler : public Assembler {
 // emitted is what you specified when creating the scope.
 class InstructionAccurateScope BASE_EMBEDDED {
  public:
-  InstructionAccurateScope(MacroAssembler* masm, size_t count = 0)
+  explicit InstructionAccurateScope(MacroAssembler* masm, size_t count = 0)
       : masm_(masm)
 #ifdef DEBUG
         ,
index 1645a4de08d761d9fb7a23710eebb77b6a74e1ff..8a5412626857af462184c0d916819ddfe4c3b9dd 100644 (file)
@@ -428,7 +428,7 @@ class Thread {
   class Options {
    public:
     Options() : name_("v8:<unknown>"), stack_size_(0) {}
-    Options(const char* name, int stack_size = 0)
+    explicit Options(const char* name, int stack_size = 0)
         : name_(name), stack_size_(stack_size) {}
 
     const char* name() const { return name_; }
index e9b4573b54f7a5f5a145eb7836836879626628e3..c1d051b3d74e94f94deaf218c2831c20823896a0 100644 (file)
@@ -437,7 +437,8 @@ class HydrogenCodeStub : public CodeStub {
     INITIALIZED
   };
 
-  HydrogenCodeStub(Isolate* isolate, InitializationState state = INITIALIZED)
+  explicit HydrogenCodeStub(Isolate* isolate,
+                            InitializationState state = INITIALIZED)
       : CodeStub(isolate) {
     is_uninitialized_ = (state == UNINITIALIZED);
   }
index 70c9a97a9c6bddb2d50df81c15b55bb3d117358c..9481bb8875e6383c7980c9c06f36cbd9c5a567ec 100644 (file)
@@ -33,7 +33,7 @@ struct Effect {
   Bounds bounds;
 
   Effect() : modality(DEFINITE) {}
-  Effect(Bounds b, Modality m = DEFINITE) : modality(m), bounds(b) {}
+  explicit Effect(Bounds b, Modality m = DEFINITE) : modality(m), bounds(b) {}
 
   // The unknown effect.
   static Effect Unknown(Zone* zone) {
index 961c15c61d25fc4609c6af14927cbeb13e3dd366..ed1243507c8b125199157216c169bbc342789303 100644 (file)
@@ -551,7 +551,7 @@ class HValue : public ZoneObject {
     return IsShl() || IsShr() || IsSar();
   }
 
-  HValue(HType type = HType::Tagged())
+  explicit HValue(HType type = HType::Tagged())
       : block_(NULL),
         id_(kNoNumber),
         type_(type),
@@ -1205,7 +1205,7 @@ class HInstruction : public HValue {
   DECLARE_ABSTRACT_INSTRUCTION(Instruction)
 
  protected:
-  HInstruction(HType type = HType::Tagged())
+  explicit HInstruction(HType type = HType::Tagged())
       : HValue(type),
         next_(NULL),
         previous_(NULL),
@@ -1238,7 +1238,8 @@ class HTemplateInstruction : public HInstruction {
   }
 
  protected:
-  HTemplateInstruction(HType type = HType::Tagged()) : HInstruction(type) {}
+  explicit HTemplateInstruction(HType type = HType::Tagged())
+      : HInstruction(type) {}
 
   virtual void InternalSetOperandAt(int i, HValue* value) V8_FINAL V8_OVERRIDE {
     inputs_[i] = value;
@@ -1598,7 +1599,7 @@ class HAbnormalExit V8_FINAL : public HTemplateControlInstruction<0, 0> {
 
 class HUnaryOperation : public HTemplateInstruction<1> {
  public:
-  HUnaryOperation(HValue* value, HType type = HType::Tagged())
+  explicit HUnaryOperation(HValue* value, HType type = HType::Tagged())
       : HTemplateInstruction<1>(type) {
     SetOperandAt(0, value);
   }
@@ -2716,7 +2717,7 @@ class HLoadRoot V8_FINAL : public HTemplateInstruction<0> {
   }
 
  private:
-  HLoadRoot(Heap::RootListIndex index, HType type = HType::Tagged())
+  explicit HLoadRoot(Heap::RootListIndex index, HType type = HType::Tagged())
       : HTemplateInstruction<0>(type), index_(index) {
     SetFlag(kUseGVN);
     // TODO(bmeurer): We'll need kDependsOnRoots once we add the
@@ -3706,7 +3707,8 @@ class HConstant V8_FINAL : public HTemplateInstruction<0> {
 
  private:
   friend class HGraph;
-  HConstant(Handle<Object> handle, Representation r = Representation::None());
+  explicit HConstant(Handle<Object> handle,
+                     Representation r = Representation::None());
   HConstant(int32_t value,
             Representation r = Representation::None(),
             bool is_not_in_new_space = true,
index fb127ec4faee25ce8a4df62d7460f796e70fec0f..3ddd7cce83d1fb7464cf2c476324731ae0dff23f 100644 (file)
@@ -7439,8 +7439,8 @@ HInstruction* HOptimizedGraphBuilder::BuildCallConstantFunction(
 
 class FunctionSorter {
  public:
-  FunctionSorter(int index = 0, int ticks = 0, int size = 0)
-      : index_(index), ticks_(ticks), size_(size) { }
+  explicit FunctionSorter(int index = 0, int ticks = 0, int size = 0)
+      : index_(index), ticks_(ticks), size_(size) {}
 
   int index() const { return index_; }
   int ticks() const { return ticks_; }
index e514290d8f532c7049207fc37959fabb1ffa6a21..4206482de75c5c73a365a9eef31f02c2aad6ccd3 100644 (file)
@@ -409,7 +409,7 @@ class LLazyBailout V8_FINAL : public LTemplateInstruction<0, 0, 0> {
 
 class LDummy V8_FINAL : public LTemplateInstruction<1, 0, 0> {
  public:
-  explicit LDummy() { }
+  LDummy() {}
   DECLARE_CONCRETE_INSTRUCTION(Dummy, "dummy")
 };
 
index 626090e455785affb7db5ba4b02ffd6fe0b401b6..7f51d5e410a7822563aaa4c1e449183b6fb6b181 100644 (file)
@@ -136,9 +136,7 @@ static int32_t Load16Aligned(const byte* pc) {
 // matching terminates.
 class BacktrackStack {
  public:
-  explicit BacktrackStack() {
-    data_ = NewArray<int>(kBacktrackStackSize);
-  }
+  BacktrackStack() { data_ = NewArray<int>(kBacktrackStackSize); }
 
   ~BacktrackStack() {
     DeleteArray(data_);
index 239403b097769d8e75777951f320d84be1937b58..99637151e2fbaed7dccd3487e6d6e39c190204b2 100644 (file)
@@ -11,7 +11,7 @@ namespace v8 {
 namespace platform {
 
 WorkerThread::WorkerThread(TaskQueue* queue)
-    : Thread("V8 WorkerThread"), queue_(queue) {
+    : Thread(Options("V8 WorkerThread")), queue_(queue) {
   Start();
 }
 
index 1ce22f8482cd471a02604658d35f48a83508ded5..0c6c4355aad9cff1577b8d262c119c1f593cdeeb 100644 (file)
@@ -693,7 +693,7 @@ class Ticker: public Sampler {
 // Profiler implementation.
 //
 Profiler::Profiler(Isolate* isolate)
-    : base::Thread("v8:Profiler"),
+    : base::Thread(Options("v8:Profiler")),
       isolate_(isolate),
       head_(0),
       tail_(0),
@@ -701,8 +701,7 @@ Profiler::Profiler(Isolate* isolate)
       buffer_semaphore_(0),
       engaged_(false),
       running_(false),
-      paused_(false) {
-}
+      paused_(false) {}
 
 
 void Profiler::Engage() {
index 2b7d9428a8f0eb72ea3bb7d086ece8285c1409dc..54cebca90f879fed0bb4e74aa737014704b6bbd4 100644 (file)
@@ -47,42 +47,42 @@ const int kInvalidProtoDepth = -1;
 #include "src/assembler.h"
 #include "src/x64/assembler-x64.h"
 #include "src/x64/assembler-x64-inl.h"
-#include "src/code.h"  // must be after assembler_*.h
+#include "src/code.h"  // NOLINT, must be after assembler_*.h
 #include "src/x64/macro-assembler-x64.h"
 #elif V8_TARGET_ARCH_ARM64
 #include "src/arm64/constants-arm64.h"
 #include "src/assembler.h"
 #include "src/arm64/assembler-arm64.h"  // NOLINT
 #include "src/arm64/assembler-arm64-inl.h"
-#include "src/code.h"  // must be after assembler_*.h
-#include "src/arm64/macro-assembler-arm64.h"
+#include "src/code.h"  // NOLINT, must be after assembler_*.h
+#include "src/arm64/macro-assembler-arm64.h"  // NOLINT
 #include "src/arm64/macro-assembler-arm64-inl.h"
 #elif V8_TARGET_ARCH_ARM
 #include "src/arm/constants-arm.h"
 #include "src/assembler.h"
 #include "src/arm/assembler-arm.h"  // NOLINT
 #include "src/arm/assembler-arm-inl.h"
-#include "src/code.h"  // must be after assembler_*.h
-#include "src/arm/macro-assembler-arm.h"
+#include "src/code.h"                     // NOLINT, must be after assembler_*.h
+#include "src/arm/macro-assembler-arm.h"  // NOLINT
 #elif V8_TARGET_ARCH_MIPS
 #include "src/mips/constants-mips.h"
-#include "src/assembler.h"
+#include "src/assembler.h"            // NOLINT
 #include "src/mips/assembler-mips.h"  // NOLINT
 #include "src/mips/assembler-mips-inl.h"
-#include "src/code.h"  // must be after assembler_*.h
+#include "src/code.h"  // NOLINT, must be after assembler_*.h
 #include "src/mips/macro-assembler-mips.h"
 #elif V8_TARGET_ARCH_MIPS64
 #include "src/mips64/constants-mips64.h"
-#include "src/assembler.h"
+#include "src/assembler.h"                // NOLINT
 #include "src/mips64/assembler-mips64.h"  // NOLINT
 #include "src/mips64/assembler-mips64-inl.h"
-#include "src/code.h"  // must be after assembler_*.h
+#include "src/code.h"  // NOLINT, must be after assembler_*.h
 #include "src/mips64/macro-assembler-mips64.h"
 #elif V8_TARGET_ARCH_X87
 #include "src/assembler.h"
 #include "src/x87/assembler-x87.h"
 #include "src/x87/assembler-x87-inl.h"
-#include "src/code.h"  // must be after assembler_*.h
+#include "src/code.h"  // NOLINT, must be after assembler_*.h
 #include "src/x87/macro-assembler-x87.h"
 #else
 #error Unsupported target architecture.
index 4f24392062b6e04941c423e87c4328e59ef0fb46..9578955600d34b5447fdd032c9b2b760824b6263 100644 (file)
@@ -411,7 +411,7 @@ class LLazyBailout V8_FINAL : public LTemplateInstruction<0, 0, 0> {
 
 class LDummy V8_FINAL : public LTemplateInstruction<1, 0, 0> {
  public:
-  explicit LDummy() { }
+  LDummy() {}
   DECLARE_CONCRETE_INSTRUCTION(Dummy, "dummy")
 };
 
index 7902513d4f3926c72418887a22dbec92c17817b6..77e5b9c38dc66b772e3ac5eca98488a52dd25a93 100644 (file)
@@ -410,7 +410,7 @@ class LLazyBailout V8_FINAL : public LTemplateInstruction<0, 0, 0> {
 
 class LDummy V8_FINAL : public LTemplateInstruction<1, 0, 0> {
  public:
-  explicit LDummy() { }
+  LDummy() {}
   DECLARE_CONCRETE_INSTRUCTION(Dummy, "dummy")
 };
 
index 7307f05fe6ef5bcbec8aab912e5579cd1b050a0c..6ff4f2a61ab33adc74f228f24df5b8a49b40dae0 100644 (file)
@@ -22,22 +22,22 @@ class SharedFunctionInfo;
 
 class OptimizingCompilerThread : public base::Thread {
  public:
-  explicit OptimizingCompilerThread(Isolate *isolate) :
-      Thread("OptimizingCompilerThread"),
+  explicit OptimizingCompilerThread(Isolate* isolate)
+      : Thread(Options("OptimizingCompilerThread")),
 #ifdef DEBUG
-      thread_id_(0),
+        thread_id_(0),
 #endif
-      isolate_(isolate),
-      stop_semaphore_(0),
-      input_queue_semaphore_(0),
-      input_queue_capacity_(FLAG_concurrent_recompilation_queue_length),
-      input_queue_length_(0),
-      input_queue_shift_(0),
-      osr_buffer_capacity_(FLAG_concurrent_recompilation_queue_length + 4),
-      osr_buffer_cursor_(0),
-      osr_hits_(0),
-      osr_attempts_(0),
-      blocked_jobs_(0) {
+        isolate_(isolate),
+        stop_semaphore_(0),
+        input_queue_semaphore_(0),
+        input_queue_capacity_(FLAG_concurrent_recompilation_queue_length),
+        input_queue_length_(0),
+        input_queue_shift_(0),
+        osr_buffer_capacity_(FLAG_concurrent_recompilation_queue_length + 4),
+        osr_buffer_cursor_(0),
+        osr_hits_(0),
+        osr_attempts_(0),
+        blocked_jobs_(0) {
     base::NoBarrier_Store(&stop_thread_,
                           static_cast<base::AtomicWord>(CONTINUE));
     input_queue_ = NewArray<OptimizedCompileJob*>(input_queue_capacity_);
index 5448fcd042a44daca7cdbb568c55a832ca0850cf..30e5d6787f3ee62ea014f8c28f60bcc6281f3f3f 100644 (file)
@@ -35,8 +35,8 @@ class SplayTree {
 
   class Locator;
 
-  SplayTree(AllocationPolicy allocator = AllocationPolicy())
-      : root_(NULL), allocator_(allocator) { }
+  explicit SplayTree(AllocationPolicy allocator = AllocationPolicy())
+      : root_(NULL), allocator_(allocator) {}
   ~SplayTree();
 
   INLINE(void* operator new(size_t size,
index 4782bc932410f13ada1e241b2b994ab4e68b73df..a1c563f8825adeb1eb6ad80614ef7b5a16f24696 100644 (file)
@@ -419,7 +419,7 @@ class LLazyBailout V8_FINAL : public LTemplateInstruction<0, 0, 0> {
 
 class LDummy V8_FINAL : public LTemplateInstruction<1, 0, 0> {
  public:
-  explicit LDummy() { }
+  LDummy() {}
   DECLARE_CONCRETE_INSTRUCTION(Dummy, "dummy")
 };
 
index 7a373fece16aa02c4f58d859721f88c5df239e88..56d7c640ffcd42fdbf0db927b7a2c7e9f8f35d70 100644 (file)
@@ -426,7 +426,7 @@ class LLazyBailout V8_FINAL : public LTemplateInstruction<0, 0, 0> {
 
 class LDummy V8_FINAL : public LTemplateInstruction<1, 0, 0> {
  public:
-  explicit LDummy() { }
+  LDummy() {}
   DECLARE_CONCRETE_INSTRUCTION(Dummy, "dummy")
 };
 
index 61001d986b8720d86bbafb032b8529be80805cae..ea1efd0d5b926f2145512cd288c78ffb511200ac 100644 (file)
@@ -32,8 +32,9 @@ namespace {
 class ThreadWithMutexAndConditionVariable V8_FINAL : public Thread {
  public:
   ThreadWithMutexAndConditionVariable()
-      : Thread("ThreadWithMutexAndConditionVariable"),
-        running_(false), finished_(false) {}
+      : Thread(Options("ThreadWithMutexAndConditionVariable")),
+        running_(false),
+        finished_(false) {}
   virtual ~ThreadWithMutexAndConditionVariable() {}
 
   virtual void Run() V8_OVERRIDE {
@@ -110,8 +111,11 @@ namespace {
 class ThreadWithSharedMutexAndConditionVariable V8_FINAL : public Thread {
  public:
   ThreadWithSharedMutexAndConditionVariable()
-      : Thread("ThreadWithSharedMutexAndConditionVariable"),
-        running_(false), finished_(false), cv_(NULL), mutex_(NULL) {}
+      : Thread(Options("ThreadWithSharedMutexAndConditionVariable")),
+        running_(false),
+        finished_(false),
+        cv_(NULL),
+        mutex_(NULL) {}
   virtual ~ThreadWithSharedMutexAndConditionVariable() {}
 
   virtual void Run() V8_OVERRIDE {
@@ -216,14 +220,15 @@ namespace {
 
 class LoopIncrementThread V8_FINAL : public Thread {
  public:
-  LoopIncrementThread(int rem,
-                      int* counter,
-                      int limit,
-                      int thread_count,
-                      ConditionVariable* cv,
-                      Mutex* mutex)
-      : Thread("LoopIncrementThread"), rem_(rem), counter_(counter),
-        limit_(limit), thread_count_(thread_count), cv_(cv), mutex_(mutex) {
+  LoopIncrementThread(int rem, int* counter, int limit, int thread_count,
+                      ConditionVariable* cv, Mutex* mutex)
+      : Thread(Options("LoopIncrementThread")),
+        rem_(rem),
+        counter_(counter),
+        limit_(limit),
+        thread_count_(thread_count),
+        cv_(cv),
+        mutex_(mutex) {
     EXPECT_LT(rem, thread_count);
     EXPECT_EQ(0, limit % thread_count);
   }
index 8a99af043242c072ea8c8bdbdf3b7cf25d704aaa..3530ff8073a386c72ed8ebcb2de350c33227569e 100644 (file)
@@ -37,7 +37,7 @@ namespace {
 
 class SelfJoinThread V8_FINAL : public Thread {
  public:
-  SelfJoinThread() : Thread("SelfJoinThread") {}
+  SelfJoinThread() : Thread(Options("SelfJoinThread")) {}
   virtual void Run() V8_OVERRIDE { Join(); }
 };
 
@@ -55,7 +55,7 @@ namespace {
 
 class ThreadLocalStorageTest : public Thread, public ::testing::Test {
  public:
-  ThreadLocalStorageTest() : Thread("ThreadLocalStorageTest") {
+  ThreadLocalStorageTest() : Thread(Options("ThreadLocalStorageTest")) {
     for (size_t i = 0; i < ARRAY_SIZE(keys_); ++i) {
       keys_[i] = Thread::CreateThreadLocalKey();
     }
index 1a9abf8a2ec2c442103ddd477c926ed974539fc8..2ab973c52dd7cc6874fb9ebc7ec4d90c85a029d3 100644 (file)
@@ -209,11 +209,10 @@ class ApiTestFuzzer: public v8::base::Thread {
 
  private:
   explicit ApiTestFuzzer(int num)
-      : Thread("ApiTestFuzzer"),
+      : Thread(Options("ApiTestFuzzer")),
         test_number_(num),
         gate_(0),
-        active_(true) {
-  }
+        active_(true) {}
   ~ApiTestFuzzer() {}
 
   static bool fuzzing_;
index ef44b310098862592f3a6170e8646ef50e057ed4..bc9f4c7723e70a0976e9ba2e6c3ee52d6ec364a0 100644 (file)
@@ -25,7 +25,7 @@ typedef v8::internal::compiler::InstructionSequence TestInstrSeq;
 // A testing helper for the register code abstraction.
 class InstructionTester : public HandleAndZoneScope {
  public:  // We're all friends here.
-  explicit InstructionTester()
+  InstructionTester()
       : isolate(main_isolate()),
         graph(zone()),
         schedule(zone()),
index 45c5d467d3143420408f858c91e6baa7e0d304ea..9ddc9db71df6475affa0beae4f2d4ab9a7cb6da4 100644 (file)
@@ -409,7 +409,8 @@ THREADED_TEST(Script) {
 
 class TestResource: public String::ExternalStringResource {
  public:
-  TestResource(uint16_t* data, int* counter = NULL, bool owning_data = true)
+  explicit TestResource(uint16_t* data, int* counter = NULL,
+                        bool owning_data = true)
       : data_(data), length_(0), counter_(counter), owning_data_(owning_data) {
     while (data[length_]) ++length_;
   }
@@ -437,11 +438,12 @@ class TestResource: public String::ExternalStringResource {
 
 class TestAsciiResource: public String::ExternalAsciiStringResource {
  public:
-  TestAsciiResource(const char* data, int* counter = NULL, size_t offset = 0)
+  explicit TestAsciiResource(const char* data, int* counter = NULL,
+                             size_t offset = 0)
       : orig_data_(data),
         data_(data + offset),
         length_(strlen(data) - offset),
-        counter_(counter) { }
+        counter_(counter) {}
 
   ~TestAsciiResource() {
     i::DeleteArray(orig_data_);
@@ -15158,7 +15160,7 @@ struct RegExpInterruptionData {
 class RegExpInterruptionThread : public v8::base::Thread {
  public:
   explicit RegExpInterruptionThread(v8::Isolate* isolate)
-      : Thread("TimeoutThread"), isolate_(isolate) {}
+      : Thread(Options("TimeoutThread")), isolate_(isolate) {}
 
   virtual void Run() {
     for (regexp_interruption_data.loop_count = 0;
@@ -19366,10 +19368,10 @@ static int CalcFibonacci(v8::Isolate* isolate, int limit) {
 class IsolateThread : public v8::base::Thread {
  public:
   IsolateThread(v8::Isolate* isolate, int fib_limit)
-      : Thread("IsolateThread"),
+      : Thread(Options("IsolateThread")),
         isolate_(isolate),
         fib_limit_(fib_limit),
-        result_(0) { }
+        result_(0) {}
 
   void Run() {
     result_ = CalcFibonacci(isolate_, fib_limit_);
@@ -19448,9 +19450,9 @@ class InitDefaultIsolateThread : public v8::base::Thread {
   };
 
   explicit InitDefaultIsolateThread(TestCase testCase)
-      : Thread("InitDefaultIsolateThread"),
+      : Thread(Options("InitDefaultIsolateThread")),
         testCase_(testCase),
-        result_(false) { }
+        result_(false) {}
 
   void Run() {
     v8::Isolate* isolate = v8::Isolate::New();
@@ -21508,7 +21510,7 @@ class ThreadInterruptTest {
   class InterruptThread : public v8::base::Thread {
    public:
     explicit InterruptThread(ThreadInterruptTest* test)
-        : Thread("InterruptThread"), test_(test) {}
+        : Thread(Options("InterruptThread")), test_(test) {}
 
     virtual void Run() {
       struct sigaction action;
@@ -21916,7 +21918,7 @@ class RequestInterruptTestBaseWithSimpleInterrupt
   class InterruptThread : public v8::base::Thread {
    public:
     explicit InterruptThread(RequestInterruptTestBase* test)
-        : Thread("RequestInterruptTest"), test_(test) {}
+        : Thread(Options("RequestInterruptTest")), test_(test) {}
 
     virtual void Run() {
       test_->sem_.Wait();
@@ -22136,7 +22138,7 @@ class ClearInterruptFromAnotherThread
   class InterruptThread : public v8::base::Thread {
    public:
     explicit InterruptThread(ClearInterruptFromAnotherThread* test)
-        : Thread("RequestInterruptTest"), test_(test) {}
+        : Thread(Options("RequestInterruptTest")), test_(test) {}
 
     virtual void Run() {
       test_->sem_.Wait();
index 83b85c316161abb476b27b4dc10ded2d4950c3b4..736a9b7c88553ebe18b5911d366f8d62026af580 100644 (file)
@@ -105,15 +105,13 @@ typedef SamplingCircularQueue<Record, 12> TestSampleQueue;
 
 class ProducerThread: public v8::base::Thread {
  public:
-  ProducerThread(TestSampleQueue* scq,
-                 int records_per_chunk,
-                 Record value,
+  ProducerThread(TestSampleQueue* scq, int records_per_chunk, Record value,
                  v8::base::Semaphore* finished)
-      : Thread("producer"),
+      : Thread(Options("producer")),
         scq_(scq),
         records_per_chunk_(records_per_chunk),
         value_(value),
-        finished_(finished) { }
+        finished_(finished) {}
 
   virtual void Run() {
     for (Record i = value_; i < value_ + records_per_chunk_; ++i) {
index 6623a3ed95e7d242841615860fe5360e9242a92b..5c0b0f392d55435d57effdd6ba082af0c5f85b3d 100644 (file)
@@ -4848,7 +4848,7 @@ Barriers message_queue_barriers;
 class MessageQueueDebuggerThread : public v8::base::Thread {
  public:
   MessageQueueDebuggerThread()
-      : Thread("MessageQueueDebuggerThread") { }
+      : Thread(Options("MessageQueueDebuggerThread")) {}
   void Run();
 };
 
@@ -5104,13 +5104,13 @@ Barriers threaded_debugging_barriers;
 
 class V8Thread : public v8::base::Thread {
  public:
-  V8Thread() : Thread("V8Thread") { }
+  V8Thread() : Thread(Options("V8Thread")) {}
   void Run();
 };
 
 class DebuggerThread : public v8::base::Thread {
  public:
-  DebuggerThread() : Thread("DebuggerThread") { }
+  DebuggerThread() : Thread(Options("DebuggerThread")) {}
   void Run();
 };
 
@@ -5216,14 +5216,14 @@ TEST(ThreadedDebugging) {
 
 class BreakpointsV8Thread : public v8::base::Thread {
  public:
-  BreakpointsV8Thread() : Thread("BreakpointsV8Thread") { }
+  BreakpointsV8Thread() : Thread(Options("BreakpointsV8Thread")) {}
   void Run();
 };
 
 class BreakpointsDebuggerThread : public v8::base::Thread {
  public:
   explicit BreakpointsDebuggerThread(bool global_evaluate)
-      : Thread("BreakpointsDebuggerThread"),
+      : Thread(Options("BreakpointsDebuggerThread")),
         global_evaluate_(global_evaluate) {}
   void Run();
 
@@ -6525,9 +6525,9 @@ TEST(ProcessDebugMessages) {
 class SendCommandThread : public v8::base::Thread {
  public:
   explicit SendCommandThread(v8::Isolate* isolate)
-      : Thread("SendCommandThread"),
+      : Thread(Options("SendCommandThread")),
         semaphore_(0),
-        isolate_(isolate) { }
+        isolate_(isolate) {}
 
   static void ProcessDebugMessages(v8::Isolate* isolate, void* data) {
     v8::Debug::ProcessDebugMessages();
@@ -7379,8 +7379,8 @@ static void DebugBreakTriggerTerminate(
 
 class TerminationThread : public v8::base::Thread {
  public:
-  explicit TerminationThread(v8::Isolate* isolate) : Thread("terminator"),
-                                                     isolate_(isolate) { }
+  explicit TerminationThread(v8::Isolate* isolate)
+      : Thread(Options("terminator")), isolate_(isolate) {}
 
   virtual void Run() {
     terminate_requested_semaphore.Wait();
index 7b2170db63badf56c85810ff33804287e328af93..8d93245eb6204d3c06458814917b58229e25ed8b 100644 (file)
@@ -37,7 +37,7 @@ using namespace v8::internal;
 class HandleArray : public Malloced {
  public:
   static const unsigned kArraySize = 200;
-  explicit HandleArray() {}
+  HandleArray() {}
   ~HandleArray() { Reset(); }
   void Reset() {
     for (unsigned i = 0; i < kArraySize; i++) {
index 7d0e352b9f174c6a768c2ab2eb0f71e3cdd58be2..67147f33e6659e927006de243c13ea0622a57729 100644 (file)
@@ -97,7 +97,9 @@ class TestTask : public v8::Task {
 class TestWorkerThread : public v8::base::Thread {
  public:
   explicit TestWorkerThread(v8::Task* task)
-      : Thread("libplatform TestWorkerThread"), semaphore_(0), task_(task) {}
+      : Thread(Options("libplatform TestWorkerThread")),
+        semaphore_(0),
+        task_(task) {}
   virtual ~TestWorkerThread() {}
 
   void Signal() { semaphore_.Signal(); }
index b3cf679a4ac1ccf762b39246d44c809f6442204d..ed315cea3dc6a399857fcfb9cce1636fef7f7f7b 100644 (file)
@@ -59,7 +59,7 @@ using ::v8::V8;
 class KangarooThread : public v8::base::Thread {
  public:
   KangarooThread(v8::Isolate* isolate, v8::Handle<v8::Context> context)
-      : Thread("KangarooThread"),
+      : Thread(Options("KangarooThread")),
         isolate_(isolate),
         context_(isolate, context) {}
 
@@ -149,9 +149,8 @@ class JoinableThread {
   class ThreadWithSemaphore : public v8::base::Thread {
    public:
     explicit ThreadWithSemaphore(JoinableThread* joinable_thread)
-      : Thread(joinable_thread->name_),
-        joinable_thread_(joinable_thread) {
-    }
+        : Thread(Options(joinable_thread->name_)),
+          joinable_thread_(joinable_thread) {}
 
     virtual void Run() {
       joinable_thread_->Run();
@@ -223,9 +222,7 @@ TEST(IsolateLockingStress) {
 
 class IsolateNonlockingThread : public JoinableThread {
  public:
-  explicit IsolateNonlockingThread()
-    : JoinableThread("IsolateNonlockingThread") {
-  }
+  IsolateNonlockingThread() : JoinableThread("IsolateNonlockingThread") {}
 
   virtual void Run() {
     v8::Isolate* isolate = v8::Isolate::New();
index 3a8a3a1b8711306a66acb9621677646b0e086e12..c7fca519dcfdd8432e1fcb77b1a56501b1b4c310 100644 (file)
@@ -39,7 +39,7 @@ using namespace ::v8::internal;
 class WaitAndSignalThread V8_FINAL : public v8::base::Thread {
  public:
   explicit WaitAndSignalThread(v8::base::Semaphore* semaphore)
-      : Thread("WaitAndSignalThread"), semaphore_(semaphore) {}
+      : Thread(Options("WaitAndSignalThread")), semaphore_(semaphore) {}
   virtual ~WaitAndSignalThread() {}
 
   virtual void Run() V8_OVERRIDE {
@@ -117,7 +117,7 @@ static v8::base::Semaphore used_space(0);
 
 class ProducerThread V8_FINAL : public v8::base::Thread {
  public:
-  ProducerThread() : Thread("ProducerThread") {}
+  ProducerThread() : Thread(Options("ProducerThread")) {}
   virtual ~ProducerThread() {}
 
   virtual void Run() V8_OVERRIDE {
@@ -132,7 +132,7 @@ class ProducerThread V8_FINAL : public v8::base::Thread {
 
 class ConsumerThread V8_FINAL : public v8::base::Thread {
  public:
-  ConsumerThread() : Thread("ConsumerThread") {}
+  ConsumerThread() : Thread(Options("ConsumerThread")) {}
   virtual ~ConsumerThread() {}
 
   virtual void Run() V8_OVERRIDE {
index 06b077d4bcd8d4456e4cb279446a1e3f8af9dd57..a5ed7ab9bfe9231a689958ddde46b55af170375f 100644 (file)
@@ -162,8 +162,8 @@ TEST(TerminateOnlyV8ThreadFromThreadItselfNoLoop) {
 class TerminatorThread : public v8::base::Thread {
  public:
   explicit TerminatorThread(i::Isolate* isolate)
-      : Thread("TerminatorThread"),
-        isolate_(reinterpret_cast<v8::Isolate*>(isolate)) { }
+      : Thread(Options("TerminatorThread")),
+        isolate_(reinterpret_cast<v8::Isolate*>(isolate)) {}
   void Run() {
     semaphore->Wait();
     CHECK(!v8::V8::IsExecutionTerminating(isolate_));
index f1f7443e3a2364b322e3e25e313a8346fc2889be..12042261f408d3ecffa5b7dfb5577de6aa998c99 100644 (file)
@@ -44,7 +44,7 @@ static Turn turn = FILL_CACHE;
 
 class ThreadA : public v8::base::Thread {
  public:
-  ThreadA() : Thread("ThreadA") { }
+  ThreadA() : Thread(Options("ThreadA")) {}
   void Run() {
     v8::Isolate* isolate = CcTest::isolate();
     v8::Locker locker(isolate);
@@ -84,7 +84,7 @@ class ThreadA : public v8::base::Thread {
 
 class ThreadB : public v8::base::Thread {
  public:
-  ThreadB() : Thread("ThreadB") { }
+  ThreadB() : Thread(Options("ThreadB")) {}
   void Run() {
     do {
       {
@@ -125,13 +125,13 @@ TEST(JSFunctionResultCachesInTwoThreads) {
 class ThreadIdValidationThread : public v8::base::Thread {
  public:
   ThreadIdValidationThread(v8::base::Thread* thread_to_start,
-                           i::List<i::ThreadId>* refs,
-                           unsigned int thread_no,
+                           i::List<i::ThreadId>* refs, unsigned int thread_no,
                            v8::base::Semaphore* semaphore)
-    : Thread("ThreadRefValidationThread"),
-      refs_(refs), thread_no_(thread_no), thread_to_start_(thread_to_start),
-      semaphore_(semaphore) {
-  }
+      : Thread(Options("ThreadRefValidationThread")),
+        refs_(refs),
+        thread_no_(thread_no),
+        thread_to_start_(thread_to_start),
+        semaphore_(semaphore) {}
 
   void Run() {
     i::ThreadId thread_id = i::ThreadId::Current();