Commit bdfd5e22 authored by Clemens Backes's avatar Clemens Backes Committed by V8 LUCI CQ

[cleanup][objects] Remove redundant NOLINT annotations

cpplint rules change over time, and we change the exact rules we enable
for v8. This CL removes NOLINT annotations which are not needed
according to the currently enabled rules.

R=jkummerow@chromium.org

Bug: v8:11717
Change-Id: Iaaab7cc1ba8af297cf6f3aafa349bf29b34cd60d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2859949
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: 's avatarJakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74299}
parent b5a63668
......@@ -414,7 +414,7 @@ void print_pc(std::ostream& os, int pc) {
}
} // anonymous namespace
void DeoptimizationData::DeoptimizationDataPrint(std::ostream& os) { // NOLINT
void DeoptimizationData::DeoptimizationDataPrint(std::ostream& os) {
if (length() == 0) {
os << "Deoptimization Input Data invalidated by lazy deoptimization\n";
return;
......
......@@ -981,7 +981,7 @@ class DeoptimizationData : public FixedArray {
DECL_CAST(DeoptimizationData)
#ifdef ENABLE_DISASSEMBLER
void DeoptimizationDataPrint(std::ostream& os); // NOLINT
void DeoptimizationDataPrint(std::ostream& os);
#endif
private:
......
......@@ -311,7 +311,7 @@ class FeedbackVector
DECL_PRINTER(FeedbackVector)
void FeedbackSlotPrint(std::ostream& os, FeedbackSlot slot); // NOLINT
void FeedbackSlotPrint(std::ostream& os, FeedbackSlot slot);
// Clears the vector slots. Return true if feedback has changed.
bool ClearSlots(Isolate* isolate);
......@@ -591,7 +591,6 @@ class FeedbackMetadata : public HeapObject {
// Verify that an empty hash field looks like a tagged object, but can't
// possibly be confused with a pointer.
// NOLINTNEXTLINE(runtime/references) (false positive)
STATIC_ASSERT((Name::kEmptyHashField & kHeapObjectTag) == kHeapObjectTag);
STATIC_ASSERT(Name::kEmptyHashField == 0x3);
// Verify that a set hash field will not look like a tagged object.
......@@ -731,7 +730,7 @@ class V8_EXPORT_PRIVATE FeedbackNexus final {
bool IsMegamorphic() const { return ic_state() == MEGAMORPHIC; }
bool IsGeneric() const { return ic_state() == GENERIC; }
void Print(std::ostream& os); // NOLINT
void Print(std::ostream& os);
// For map-based ICs (load, keyed-load, store, keyed-store).
Map GetFirstMap() const;
......
......@@ -163,9 +163,9 @@ class HeapObject : public Object {
const DisallowGarbageCollection& promise);
// Dispatched behavior.
void HeapObjectShortPrint(std::ostream& os); // NOLINT
void HeapObjectShortPrint(std::ostream& os);
#ifdef OBJECT_PRINT
void PrintHeader(std::ostream& os, const char* id); // NOLINT
void PrintHeader(std::ostream& os, const char* id);
#endif
DECL_PRINTER(HeapObject)
EXPORT_DECL_VERIFIER(HeapObject)
......
......@@ -33,16 +33,11 @@ enum StringRepresentationTag {
};
const uint32_t kIsIndirectStringMask = 1 << 0;
const uint32_t kIsIndirectStringTag = 1 << 0;
// NOLINTNEXTLINE(runtime/references) (false positive)
STATIC_ASSERT((kSeqStringTag & kIsIndirectStringMask) == 0);
// NOLINTNEXTLINE(runtime/references) (false positive)
STATIC_ASSERT((kExternalStringTag & kIsIndirectStringMask) == 0);
// NOLINTNEXTLINE(runtime/references) (false positive)
STATIC_ASSERT((kConsStringTag & kIsIndirectStringMask) == kIsIndirectStringTag);
// NOLINTNEXTLINE(runtime/references) (false positive)
STATIC_ASSERT((kSlicedStringTag & kIsIndirectStringMask) ==
kIsIndirectStringTag);
// NOLINTNEXTLINE(runtime/references) (false positive)
STATIC_ASSERT((kThinStringTag & kIsIndirectStringMask) == kIsIndirectStringTag);
// For strings, bit 3 indicates whether the string consists of two-byte
......@@ -152,7 +147,6 @@ enum InstanceType : uint16_t {
constexpr InstanceType LAST_STRING_TYPE =
static_cast<InstanceType>(FIRST_NONSTRING_TYPE - 1);
// NOLINTNEXTLINE(runtime/references) (false positive)
STATIC_ASSERT((FIRST_NONSTRING_TYPE & kIsNotStringMask) != kStringTag);
STATIC_ASSERT(JS_OBJECT_TYPE == Internals::kJSObjectType);
STATIC_ASSERT(JS_API_OBJECT_TYPE == Internals::kJSApiObjectType);
......
......@@ -703,11 +703,11 @@ class JSObject : public TorqueGeneratedJSObject<JSObject, JSReceiver> {
DECL_PRINTER(JSObject)
DECL_VERIFIER(JSObject)
#ifdef OBJECT_PRINT
bool PrintProperties(std::ostream& os); // NOLINT
void PrintElements(std::ostream& os); // NOLINT
bool PrintProperties(std::ostream& os);
void PrintElements(std::ostream& os);
#endif
#if defined(DEBUG) || defined(OBJECT_PRINT)
void PrintTransitions(std::ostream& os); // NOLINT
void PrintTransitions(std::ostream& os);
#endif
static void PrintElementsTransition(FILE* file, Handle<JSObject> object,
......
......@@ -604,7 +604,7 @@ static_assert(sizeof(unsigned) == sizeof(uint32_t),
static_cast<base::Atomic8>(value));
#ifdef OBJECT_PRINT
#define DECL_PRINTER(Name) void Name##Print(std::ostream& os); // NOLINT
#define DECL_PRINTER(Name) void Name##Print(std::ostream& os);
#else
#define DECL_PRINTER(Name)
#endif
......
......@@ -1907,11 +1907,9 @@ std::ostream& operator<<(std::ostream& os, const Brief& v) {
return os;
}
void Smi::SmiPrint(std::ostream& os) const { // NOLINT
os << value();
}
void Smi::SmiPrint(std::ostream& os) const { os << value(); }
void HeapObject::HeapObjectShortPrint(std::ostream& os) { // NOLINT
void HeapObject::HeapObjectShortPrint(std::ostream& os) {
os << AsHex::Address(this->ptr()) << " ";
if (IsString()) {
......@@ -4542,9 +4540,7 @@ void Relocatable::PostGarbageCollectionProcessing(Isolate* isolate) {
}
// Reserve space for statics needing saving and restoring.
int Relocatable::ArchiveSpacePerThread() {
return sizeof(Relocatable*); // NOLINT
}
int Relocatable::ArchiveSpacePerThread() { return sizeof(Relocatable*); }
// Archive statics that are thread-local.
char* Relocatable::ArchiveState(Isolate* isolate, char* to) {
......
......@@ -602,7 +602,7 @@ class Object : public TaggedImpl<HeapObjectReferenceType::STRONG, Address> {
// Prints this object without details to a message accumulator.
V8_EXPORT_PRIVATE void ShortPrint(StringStream* accumulator) const;
V8_EXPORT_PRIVATE void ShortPrint(std::ostream& os) const; // NOLINT
V8_EXPORT_PRIVATE void ShortPrint(std::ostream& os) const;
inline static Object cast(Object object) { return object; }
inline static Object unchecked_cast(Object object) { return object; }
......@@ -615,10 +615,10 @@ class Object : public TaggedImpl<HeapObjectReferenceType::STRONG, Address> {
V8_EXPORT_PRIVATE void Print() const;
// Prints this object with details.
V8_EXPORT_PRIVATE void Print(std::ostream& os) const; // NOLINT
V8_EXPORT_PRIVATE void Print(std::ostream& os) const;
#else
void Print() const { ShortPrint(); }
void Print(std::ostream& os) const { ShortPrint(os); } // NOLINT
void Print(std::ostream& os) const { ShortPrint(os); }
#endif
// For use with std::unordered_set.
......
......@@ -87,7 +87,7 @@ class Smi : public Object {
DECL_CAST(Smi)
// Dispatched behavior.
V8_EXPORT_PRIVATE void SmiPrint(std::ostream& os) const; // NOLINT
V8_EXPORT_PRIVATE void SmiPrint(std::ostream& os) const;
DECL_VERIFIER(Smi)
// Since this is a constexpr, "calling" it is just as efficient
......
......@@ -374,7 +374,7 @@ void String::StringShortPrint(StringStream* accumulator) {
accumulator->Put('>');
}
void String::PrintUC16(std::ostream& os, int start, int end) { // NOLINT
void String::PrintUC16(std::ostream& os, int start, int end) {
if (end < 0) end = length();
StringCharacterStream stream(*this, start);
for (int i = start; i < end && stream.HasMore(); i++) {
......
......@@ -409,7 +409,7 @@ class String : public TorqueGeneratedString<String, Name> {
const char* PrefixForDebugPrint() const;
const char* SuffixForDebugPrint() const;
void StringShortPrint(StringStream* accumulator);
void PrintUC16(std::ostream& os, int start = 0, int end = -1); // NOLINT
void PrintUC16(std::ostream& os, int start = 0, int end = -1);
void PrintUC16(StringStream* accumulator, int start, int end);
// Dispatched behavior.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment