From: mstarzinger Date: Mon, 28 Sep 2015 08:18:29 +0000 (-0700) Subject: [presubmit] Fix whitespace/semicolon linter violations. X-Git-Tag: upstream/4.7.83~77 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6a20034d24f39ae3209b1603cfe1cebf95f163fd;p=platform%2Fupstream%2Fv8.git [presubmit] Fix whitespace/semicolon linter violations. R=bmeurer@chromium.org Review URL: https://codereview.chromium.org/1365803004 Cr-Commit-Position: refs/heads/master@{#30963} --- diff --git a/src/arm64/lithium-codegen-arm64.cc b/src/arm64/lithium-codegen-arm64.cc index 488e14f..11e99b0 100644 --- a/src/arm64/lithium-codegen-arm64.cc +++ b/src/arm64/lithium-codegen-arm64.cc @@ -4195,7 +4195,7 @@ void LCodeGen::DoMulConstIS(LMulConstIS* instr) { Register result = is_smi ? ToRegister(instr->result()) : ToRegister32(instr->result()); Register left = - is_smi ? ToRegister(instr->left()) : ToRegister32(instr->left()) ; + is_smi ? ToRegister(instr->left()) : ToRegister32(instr->left()); int32_t right = ToInteger32(instr->right()); DCHECK((right > -kMaxInt) && (right < kMaxInt)); diff --git a/src/base/bits.h b/src/base/bits.h index abcfd9a..f5710df 100644 --- a/src/base/bits.h +++ b/src/base/bits.h @@ -105,8 +105,8 @@ inline unsigned CountTrailingZeros32(uint32_t value) { #else if (value == 0) return 32; unsigned count = 0; - for (value ^= value - 1; value >>= 1; ++count) - ; + for (value ^= value - 1; value >>= 1; ++count) { + } return count; #endif } @@ -121,8 +121,8 @@ inline unsigned CountTrailingZeros64(uint64_t value) { #else if (value == 0) return 64; unsigned count = 0; - for (value ^= value - 1; value >>= 1; ++count) - ; + for (value ^= value - 1; value >>= 1; ++count) { + } return count; #endif } diff --git a/src/base/platform/condition-variable.cc b/src/base/platform/condition-variable.cc index 982497f..e5b9bd0 100644 --- a/src/base/platform/condition-variable.cc +++ b/src/base/platform/condition-variable.cc @@ -264,8 +264,8 @@ void ConditionVariable::Wait(Mutex* mutex) { mutex->Unlock(); // Wait on the wait event. - while (!event->WaitFor(INFINITE)) - ; + while (!event->WaitFor(INFINITE)) { + } // Reaquire the user mutex. mutex->Lock(); diff --git a/src/debug/debug.h b/src/debug/debug.h index b499eb0..640355a 100644 --- a/src/debug/debug.h +++ b/src/debug/debug.h @@ -474,7 +474,7 @@ class Debug { void set_live_edit_enabled(bool v) { live_edit_enabled_ = v; } bool live_edit_enabled() const { - return FLAG_enable_liveedit && live_edit_enabled_ ; + return FLAG_enable_liveedit && live_edit_enabled_; } inline bool is_active() const { return is_active_; } diff --git a/src/mips64/code-stubs-mips64.cc b/src/mips64/code-stubs-mips64.cc index 0311526..c447a79 100644 --- a/src/mips64/code-stubs-mips64.cc +++ b/src/mips64/code-stubs-mips64.cc @@ -2526,7 +2526,7 @@ static void EmitContinueIfStrictOrNative(MacroAssembler* masm, Label* cont) { // Do not transform the receiver for strict mode functions. int32_t strict_mode_function_mask = - 1 << SharedFunctionInfo::kStrictModeBitWithinByte ; + 1 << SharedFunctionInfo::kStrictModeBitWithinByte; // Do not transform the receiver for native (Compilerhints already in a3). int32_t native_mask = 1 << SharedFunctionInfo::kNativeBitWithinByte; diff --git a/src/mips64/macro-assembler-mips64.cc b/src/mips64/macro-assembler-mips64.cc index 892db42..05f4bb2 100644 --- a/src/mips64/macro-assembler-mips64.cc +++ b/src/mips64/macro-assembler-mips64.cc @@ -5034,7 +5034,7 @@ void MacroAssembler::EnterExitFrame(bool save_doubles, if (save_doubles) { // The stack is already aligned to 0 modulo 8 for stores with sdc1. int kNumOfSavedRegisters = FPURegister::kMaxNumRegisters / 2; - int space = kNumOfSavedRegisters * kDoubleSize ; + int space = kNumOfSavedRegisters * kDoubleSize; Dsubu(sp, sp, Operand(space)); // Remember: we only need to save every 2nd double FPU value. for (int i = 0; i < kNumOfSavedRegisters; i++) { diff --git a/src/objects.cc b/src/objects.cc index af37cb1..53c5fec 100644 --- a/src/objects.cc +++ b/src/objects.cc @@ -14696,7 +14696,7 @@ Handle JSObject::PrepareElementsForSort(Handle object, Handle elements_base(object->elements()); uint32_t elements_length = static_cast(elements_base->length()); if (limit > elements_length) { - limit = elements_length ; + limit = elements_length; } if (limit == 0) { return handle(Smi::FromInt(0), isolate); diff --git a/src/preparser.cc b/src/preparser.cc index 04757b3..1bdcb85 100644 --- a/src/preparser.cc +++ b/src/preparser.cc @@ -122,7 +122,7 @@ PreParser::PreParseResult PreParser::PreParseLazyFunction( int start_position = peek_position(); ParseLazyFunctionLiteralBody(&ok, bookmark); if (bookmark && bookmark->HasBeenReset()) { - ; // Do nothing, as we've just aborted scanning this function. + // Do nothing, as we've just aborted scanning this function. } else if (stack_overflow()) { return kPreParseStackOverflow; } else if (!ok) { diff --git a/src/runtime/runtime-date.cc b/src/runtime/runtime-date.cc index b4ed6bd..614b4a9 100644 --- a/src/runtime/runtime-date.cc +++ b/src/runtime/runtime-date.cc @@ -39,7 +39,6 @@ RUNTIME_FUNCTION(Runtime_DateSetValue) { DateCache* date_cache = isolate->date_cache(); Handle value; - ; bool is_value_nan = false; if (std::isnan(time)) { value = isolate->factory()->nan_value(); diff --git a/src/scanner.cc b/src/scanner.cc index 9446130..de79903 100644 --- a/src/scanner.cc +++ b/src/scanner.cc @@ -1579,7 +1579,7 @@ uint32_t DuplicateFinder::Hash(Vector key, bool is_one_byte) { // Primitive hash function, almost identical to the one used // for strings (except that it's seeded by the length and representation). int length = key.length(); - uint32_t hash = (length << 1) | (is_one_byte ? 1 : 0) ; + uint32_t hash = (length << 1) | (is_one_byte ? 1 : 0); for (int i = 0; i < length; i++) { uint32_t c = key[i]; hash = (hash + c) * 1025; diff --git a/test/cctest/cctest.h b/test/cctest/cctest.h index aaa52c8..b609036 100644 --- a/test/cctest/cctest.h +++ b/test/cctest/cctest.h @@ -621,8 +621,8 @@ static inline void DisableDebugger() { v8::Debug::SetDebugEventListener(NULL); } static inline void EmptyMessageQueues(v8::Isolate* isolate) { while (v8::platform::PumpMessageLoop(v8::internal::V8::GetCurrentPlatform(), - isolate)) - ; + isolate)) { + } } diff --git a/test/cctest/test-api.cc b/test/cctest/test-api.cc index d55ad69..ab44af7 100644 --- a/test/cctest/test-api.cc +++ b/test/cctest/test-api.cc @@ -16040,8 +16040,7 @@ THREADED_TEST(FunctionGetDisplayName) { "}};" "var g = function() {" " arguments.callee.displayName = 'set_in_runtime';" - "}; g();" - ; + "}; g();"; v8::ScriptOrigin origin = v8::ScriptOrigin(v8::String::NewFromUtf8(env->GetIsolate(), "test")); v8::Script::Compile(v8::String::NewFromUtf8(env->GetIsolate(), code), &origin) @@ -17857,7 +17856,7 @@ TEST(SetErrorMessageForCodeGenFromStrings) { v8::HandleScope scope(context->GetIsolate()); TryCatch try_catch(context->GetIsolate()); - Handle message = v8_str("Message") ; + Handle message = v8_str("Message"); Handle expected_message = v8_str("Uncaught EvalError: Message"); V8::SetAllowCodeGenerationFromStringsCallback(&CodeGenerationDisallowed); context->AllowCodeGenerationFromStrings(false); diff --git a/test/cctest/test-code-stubs-arm.cc b/test/cctest/test-code-stubs-arm.cc index 3314544..a9856f5 100644 --- a/test/cctest/test-code-stubs-arm.cc +++ b/test/cctest/test-code-stubs-arm.cc @@ -76,7 +76,7 @@ ConvertDToIFunc MakeConvertDToIFuncTrampoline(Isolate* isolate, // Save registers make sure they don't get clobbered. int source_reg_offset = kDoubleSize; int reg_num = 0; - for (;reg_num < Register::NumAllocatableRegisters(); ++reg_num) { + for (; reg_num < Register::NumAllocatableRegisters(); ++reg_num) { Register reg = Register::from_code(reg_num); if (!reg.is(destination_reg)) { __ push(reg); diff --git a/test/cctest/test-code-stubs-arm64.cc b/test/cctest/test-code-stubs-arm64.cc index ecb8819..8f40c90 100644 --- a/test/cctest/test-code-stubs-arm64.cc +++ b/test/cctest/test-code-stubs-arm64.cc @@ -72,7 +72,7 @@ ConvertDToIFunc MakeConvertDToIFuncTrampoline(Isolate* isolate, // Save registers make sure they don't get clobbered. int source_reg_offset = kDoubleSize; int reg_num = 0; - for (;reg_num < Register::NumAllocatableRegisters(); ++reg_num) { + for (; reg_num < Register::NumAllocatableRegisters(); ++reg_num) { Register reg = Register::from_code(reg_num); if (!reg.is(destination_reg)) { queue.Queue(reg); diff --git a/test/cctest/test-code-stubs-ia32.cc b/test/cctest/test-code-stubs-ia32.cc index 0b4a8d4..ef44f54 100644 --- a/test/cctest/test-code-stubs-ia32.cc +++ b/test/cctest/test-code-stubs-ia32.cc @@ -70,7 +70,7 @@ ConvertDToIFunc MakeConvertDToIFuncTrampoline(Isolate* isolate, int param_offset = 7 * kPointerSize; // Save registers make sure they don't get clobbered. int reg_num = 0; - for (;reg_num < Register::NumAllocatableRegisters(); ++reg_num) { + for (; reg_num < Register::NumAllocatableRegisters(); ++reg_num) { Register reg = Register::FromAllocationIndex(reg_num); if (!reg.is(esp) && !reg.is(ebp) && !reg.is(destination_reg)) { __ push(reg); diff --git a/test/cctest/test-code-stubs-mips.cc b/test/cctest/test-code-stubs-mips.cc index eb3ba02..10704ef 100644 --- a/test/cctest/test-code-stubs-mips.cc +++ b/test/cctest/test-code-stubs-mips.cc @@ -79,7 +79,7 @@ ConvertDToIFunc MakeConvertDToIFuncTrampoline(Isolate* isolate, // Save registers make sure they don't get clobbered. int source_reg_offset = kDoubleSize; int reg_num = 2; - for (;reg_num < Register::NumAllocatableRegisters(); ++reg_num) { + for (; reg_num < Register::NumAllocatableRegisters(); ++reg_num) { Register reg = Register::from_code(reg_num); if (!reg.is(destination_reg)) { __ push(reg); diff --git a/test/cctest/test-code-stubs-mips64.cc b/test/cctest/test-code-stubs-mips64.cc index 1415cec..a8dd13c 100644 --- a/test/cctest/test-code-stubs-mips64.cc +++ b/test/cctest/test-code-stubs-mips64.cc @@ -79,7 +79,7 @@ ConvertDToIFunc MakeConvertDToIFuncTrampoline(Isolate* isolate, // Save registers make sure they don't get clobbered. int source_reg_offset = kDoubleSize; int reg_num = 2; - for (;reg_num < Register::NumAllocatableRegisters(); ++reg_num) { + for (; reg_num < Register::NumAllocatableRegisters(); ++reg_num) { Register reg = Register::from_code(reg_num); if (!reg.is(destination_reg)) { __ push(reg); diff --git a/test/cctest/test-code-stubs-x64.cc b/test/cctest/test-code-stubs-x64.cc index b58b073..9eb153f 100644 --- a/test/cctest/test-code-stubs-x64.cc +++ b/test/cctest/test-code-stubs-x64.cc @@ -74,7 +74,7 @@ ConvertDToIFunc MakeConvertDToIFuncTrampoline(Isolate* isolate, // Save registers make sure they don't get clobbered. int reg_num = 0; - for (;reg_num < Register::NumAllocatableRegisters(); ++reg_num) { + for (; reg_num < Register::NumAllocatableRegisters(); ++reg_num) { Register reg = Register::FromAllocationIndex(reg_num); if (!reg.is(rsp) && !reg.is(rbp) && !reg.is(destination_reg)) { __ pushq(reg); diff --git a/test/cctest/test-code-stubs-x87.cc b/test/cctest/test-code-stubs-x87.cc index 0b4a8d4..ef44f54 100644 --- a/test/cctest/test-code-stubs-x87.cc +++ b/test/cctest/test-code-stubs-x87.cc @@ -70,7 +70,7 @@ ConvertDToIFunc MakeConvertDToIFuncTrampoline(Isolate* isolate, int param_offset = 7 * kPointerSize; // Save registers make sure they don't get clobbered. int reg_num = 0; - for (;reg_num < Register::NumAllocatableRegisters(); ++reg_num) { + for (; reg_num < Register::NumAllocatableRegisters(); ++reg_num) { Register reg = Register::FromAllocationIndex(reg_num); if (!reg.is(esp) && !reg.is(ebp) && !reg.is(destination_reg)) { __ push(reg); diff --git a/test/cctest/test-thread-termination.cc b/test/cctest/test-thread-termination.cc index 03de451..131209c 100644 --- a/test/cctest/test-thread-termination.cc +++ b/test/cctest/test-thread-termination.cc @@ -455,7 +455,7 @@ TEST(PostponeTerminateException) { { // Postpone terminate execution interrupts. i::PostponeInterruptsScope p1(CcTest::i_isolate(), - i::StackGuard::TERMINATE_EXECUTION) ; + i::StackGuard::TERMINATE_EXECUTION); // API interrupts should still be triggered. CcTest::isolate()->RequestInterrupt(&CounterCallback, NULL); diff --git a/test/cctest/types-fuzz.h b/test/cctest/types-fuzz.h index 98280a9..7aa8d85 100644 --- a/test/cctest/types-fuzz.h +++ b/test/cctest/types-fuzz.h @@ -307,9 +307,8 @@ class Types { case 8: { // simd static const int num_simd_types = #define COUNT_SIMD_TYPE(NAME, Name, name, lane_count, lane_type) +1 - SIMD128_TYPES(COUNT_SIMD_TYPE) + SIMD128_TYPES(COUNT_SIMD_TYPE); #undef COUNT_SIMD_TYPE - ; TypeHandle (*simd_constructors[num_simd_types])(Isolate*, Region*) = { #define COUNT_SIMD_TYPE(NAME, Name, name, lane_count, lane_type) \ &Type::Name, diff --git a/test/unittests/compiler/typer-unittest.cc b/test/unittests/compiler/typer-unittest.cc index d04f44e..7113bf2 100644 --- a/test/unittests/compiler/typer-unittest.cc +++ b/test/unittests/compiler/typer-unittest.cc @@ -212,9 +212,7 @@ class TyperTest : public TypedGraphTest { Type* type2 = types_.Fuzz(); Type* type = TypeBinaryOp(op, type1, type2); Type* subtype1 = RandomSubtype(type1); - ; Type* subtype2 = RandomSubtype(type2); - ; Type* subtype = TypeBinaryOp(op, subtype1, subtype2); EXPECT_TRUE(subtype->Is(type)); } diff --git a/tools/presubmit.py b/tools/presubmit.py index 604e65b..338c708 100755 --- a/tools/presubmit.py +++ b/tools/presubmit.py @@ -63,7 +63,6 @@ LINT_RULES = """ -readability/nolint +readability/streams -runtime/references --whitespace/semicolon """.split() LINT_OUTPUT_PATTERN = re.compile(r'^.+[:(]\d+[:)]|^Done processing')