diff --git a/include/v8.h b/include/v8.h index 64c428036a..50642b37b6 100644 --- a/include/v8.h +++ b/include/v8.h @@ -3364,7 +3364,8 @@ class V8_EXPORT Object : public Value { // // Returns true on success. V8_WARN_UNUSED_RESULT Maybe DefineProperty( - Local context, Local key, PropertyDescriptor& descriptor); + Local context, Local key, + PropertyDescriptor& descriptor); // NOLINT(runtime/references) V8_WARN_UNUSED_RESULT MaybeLocal Get(Local context, Local key); diff --git a/src/asmjs/asm-parser.h b/src/asmjs/asm-parser.h index 8740cdad11..c01b3f2f60 100644 --- a/src/asmjs/asm-parser.h +++ b/src/asmjs/asm-parser.h @@ -154,7 +154,8 @@ class AsmJsParser { template class CachedVector final : public ZoneVector { public: - explicit CachedVector(CachedVectors& cache) + explicit CachedVector( + CachedVectors& cache) // NOLINT(runtime/references) : ZoneVector(cache.zone()), cache_(&cache) { cache.fill(this); } diff --git a/src/base/adapters.h b/src/base/adapters.h index 92c500085d..077738eae0 100644 --- a/src/base/adapters.h +++ b/src/base/adapters.h @@ -45,7 +45,7 @@ class ReversedAdapter { // // iterates through v from back to front // } template -ReversedAdapter Reversed(T& t) { +ReversedAdapter Reversed(T& t) { // NOLINT(runtime/references) return ReversedAdapter(t); } diff --git a/src/builtins/builtins-console.cc b/src/builtins/builtins-console.cc index 973f1785d1..9ab3566cec 100644 --- a/src/builtins/builtins-console.cc +++ b/src/builtins/builtins-console.cc @@ -39,7 +39,8 @@ namespace internal { namespace { void ConsoleCall( - Isolate* isolate, internal::BuiltinArguments& args, + Isolate* isolate, + internal::BuiltinArguments& args, // NOLINT(runtime/references) void (debug::ConsoleDelegate::*func)(const v8::debug::ConsoleCallArguments&, const v8::debug::ConsoleContext&)) { CHECK(!isolate->has_pending_exception()); diff --git a/src/builtins/builtins-proxy-gen.h b/src/builtins/builtins-proxy-gen.h index 4e224ebfaf..2b84986fa0 100644 --- a/src/builtins/builtins-proxy-gen.h +++ b/src/builtins/builtins-proxy-gen.h @@ -36,9 +36,10 @@ class ProxiesCodeStubAssembler : public CodeStubAssembler { kProxyContextLength, }; - Node* AllocateJSArrayForCodeStubArguments(Node* context, - CodeStubArguments& args, Node* argc, - ParameterMode mode); + Node* AllocateJSArrayForCodeStubArguments( + Node* context, + CodeStubArguments& args, // NOLINT(runtime/references) + Node* argc, ParameterMode mode); private: Node* CreateProxyRevokeFunctionContext(Node* proxy, Node* native_context); diff --git a/src/codegen/code-stub-assembler.h b/src/codegen/code-stub-assembler.h index 1525c465fe..80a4fa1b09 100644 --- a/src/codegen/code-stub-assembler.h +++ b/src/codegen/code-stub-assembler.h @@ -2135,9 +2135,11 @@ class V8_EXPORT_PRIVATE CodeStubAssembler TNode TruncateHeapNumberValueToWord32(TNode object); // Conversions. - void TryHeapNumberToSmi(TNode number, TVariable& output, + void TryHeapNumberToSmi(TNode number, + TVariable& output, // NOLINT(runtime/references) Label* if_smi); - void TryFloat64ToSmi(TNode number, TVariable& output, + void TryFloat64ToSmi(TNode number, + TVariable& output, // NOLINT(runtime/references) Label* if_smi); TNode ChangeFloat64ToTagged(SloppyTNode value); TNode ChangeInt32ToTagged(SloppyTNode value); diff --git a/src/codegen/constant-pool.h b/src/codegen/constant-pool.h index 75dc58ac34..d07452336b 100644 --- a/src/codegen/constant-pool.h +++ b/src/codegen/constant-pool.h @@ -138,8 +138,9 @@ class ConstantPoolBuilder { inline Label* EmittedPosition() { return &emitted_label_; } private: - ConstantPoolEntry::Access AddEntry(ConstantPoolEntry& entry, - ConstantPoolEntry::Type type); + ConstantPoolEntry::Access AddEntry( + ConstantPoolEntry& entry, // NOLINT(runtime/references) + ConstantPoolEntry::Type type); void EmitSharedEntries(Assembler* assm, ConstantPoolEntry::Type type); void EmitGroup(Assembler* assm, ConstantPoolEntry::Access access, ConstantPoolEntry::Type type); diff --git a/src/codegen/mips/assembler-mips.h b/src/codegen/mips/assembler-mips.h index 640e11cf1a..c6dab5cb61 100644 --- a/src/codegen/mips/assembler-mips.h +++ b/src/codegen/mips/assembler-mips.h @@ -1478,11 +1478,13 @@ class V8_EXPORT_PRIVATE Assembler : public AssemblerBase { static bool IsAddImmediate(Instr instr); static Instr SetAddImmediateOffset(Instr instr, int16_t offset); static uint32_t CreateTargetAddress(Instr instr_lui, Instr instr_jic); - static void UnpackTargetAddress(uint32_t address, int16_t& lui_offset, - int16_t& jic_offset); - static void UnpackTargetAddressUnsigned(uint32_t address, - uint32_t& lui_offset, - uint32_t& jic_offset); + static void UnpackTargetAddress( + uint32_t address, int16_t& lui_offset, // NOLINT(runtime/references) + int16_t& jic_offset); // NOLINT(runtime/references) + static void UnpackTargetAddressUnsigned( + uint32_t address, + uint32_t& lui_offset, // NOLINT(runtime/references) + uint32_t& jic_offset); // NOLINT(runtime/references) static bool IsAndImmediate(Instr instr); static bool IsEmittedConstant(Instr instr); @@ -1513,7 +1515,7 @@ class V8_EXPORT_PRIVATE Assembler : public AssemblerBase { // Helper function for memory load/store using base register and offset. void AdjustBaseAndOffset( - MemOperand& src, + MemOperand& src, // NOLINT(runtime/references) OffsetAccessType access_type = OffsetAccessType::SINGLE_ACCESS, int second_access_add_to_offset = 4); diff --git a/src/codegen/mips/macro-assembler-mips.h b/src/codegen/mips/macro-assembler-mips.h index 8fc4af873a..3dfc7bfbad 100644 --- a/src/codegen/mips/macro-assembler-mips.h +++ b/src/codegen/mips/macro-assembler-mips.h @@ -845,9 +845,12 @@ class V8_EXPORT_PRIVATE TurboAssembler : public TurboAssemblerBase { void BranchShortMSA(MSABranchDF df, Label* target, MSABranchCondition cond, MSARegister wt, BranchDelaySlot bd = PROTECT); - bool CalculateOffset(Label* L, int32_t& offset, OffsetSize bits); - bool CalculateOffset(Label* L, int32_t& offset, OffsetSize bits, - Register& scratch, const Operand& rt); + bool CalculateOffset(Label* L, int32_t& offset, // NOLINT(runtime/references) + OffsetSize bits); + bool CalculateOffset(Label* L, int32_t& offset, // NOLINT(runtime/references) + OffsetSize bits, + Register& scratch, // NOLINT(runtime/references) + const Operand& rt); void BranchShortHelperR6(int32_t offset, Label* L); void BranchShortHelper(int16_t offset, Label* L, BranchDelaySlot bdslot); diff --git a/src/codegen/mips64/assembler-mips64.h b/src/codegen/mips64/assembler-mips64.h index c7c027eef7..4b14ae2e5d 100644 --- a/src/codegen/mips64/assembler-mips64.h +++ b/src/codegen/mips64/assembler-mips64.h @@ -1560,7 +1560,7 @@ class V8_EXPORT_PRIVATE Assembler : public AssemblerBase { // Helper function for memory load/store using base register and offset. void AdjustBaseAndOffset( - MemOperand& src, + MemOperand& src, // NOLINT(runtime/references) OffsetAccessType access_type = OffsetAccessType::SINGLE_ACCESS, int second_access_add_to_offset = 4); diff --git a/src/codegen/mips64/macro-assembler-mips64.h b/src/codegen/mips64/macro-assembler-mips64.h index 1bda07ef7e..eb62bec0e8 100644 --- a/src/codegen/mips64/macro-assembler-mips64.h +++ b/src/codegen/mips64/macro-assembler-mips64.h @@ -849,9 +849,12 @@ class V8_EXPORT_PRIVATE TurboAssembler : public TurboAssemblerBase { void CallCFunctionHelper(Register function, int num_reg_arguments, int num_double_arguments); - bool CalculateOffset(Label* L, int32_t& offset, OffsetSize bits); - bool CalculateOffset(Label* L, int32_t& offset, OffsetSize bits, - Register& scratch, const Operand& rt); + bool CalculateOffset(Label* L, int32_t& offset, // NOLINT(runtime/references) + OffsetSize bits); + bool CalculateOffset(Label* L, int32_t& offset, // NOLINT(runtime/references) + OffsetSize bits, + Register& scratch, // NOLINT(runtime/references) + const Operand& rt); void BranchShortHelperR6(int32_t offset, Label* L); void BranchShortHelper(int16_t offset, Label* L, BranchDelaySlot bdslot); diff --git a/src/codegen/source-position-table.cc b/src/codegen/source-position-table.cc index 6c0aa36b27..e10cc07571 100644 --- a/src/codegen/source-position-table.cc +++ b/src/codegen/source-position-table.cc @@ -31,7 +31,7 @@ class MoreBit : public BitField8 {}; class ValueBits : public BitField8 {}; // Helper: Add the offsets from 'other' to 'value'. Also set is_statement. -void AddAndSetEntry(PositionTableEntry& value, +void AddAndSetEntry(PositionTableEntry& value, // NOLINT(runtime/references) const PositionTableEntry& other) { value.code_offset += other.code_offset; value.source_position += other.source_position; @@ -39,7 +39,7 @@ void AddAndSetEntry(PositionTableEntry& value, } // Helper: Subtract the offsets from 'other' from 'value'. -void SubtractFromEntry(PositionTableEntry& value, +void SubtractFromEntry(PositionTableEntry& value, // NOLINT(runtime/references) const PositionTableEntry& other) { value.code_offset -= other.code_offset; value.source_position -= other.source_position; @@ -47,7 +47,8 @@ void SubtractFromEntry(PositionTableEntry& value, // Helper: Encode an integer. template -void EncodeInt(std::vector& bytes, T value) { +void EncodeInt(std::vector& bytes, // NOLINT(runtime/references) + T value) { using unsigned_type = typename std::make_unsigned::type; // Zig-zag encoding. static const int kShift = sizeof(T) * kBitsPerByte - 1; @@ -65,7 +66,8 @@ void EncodeInt(std::vector& bytes, T value) { } // Encode a PositionTableEntry. -void EncodeEntry(std::vector& bytes, const PositionTableEntry& entry) { +void EncodeEntry(std::vector& bytes, // NOLINT(runtime/references) + const PositionTableEntry& entry) { // We only accept ascending code offsets. DCHECK_GE(entry.code_offset, 0); // Since code_offset is not negative, we use sign to encode is_statement. @@ -113,8 +115,9 @@ Vector VectorFromByteArray(ByteArray byte_array) { } #ifdef ENABLE_SLOW_DCHECKS -void CheckTableEquals(std::vector& raw_entries, - SourcePositionTableIterator& encoded) { +void CheckTableEquals( + std::vector& raw_entries, // NOLINT(runtime/references) + SourcePositionTableIterator& encoded) { // NOLINT(runtime/references) // Brute force testing: Record all positions and decode // the entire table to verify they are identical. auto raw = raw_entries.begin(); diff --git a/src/compiler/backend/arm/code-generator-arm.cc b/src/compiler/backend/arm/code-generator-arm.cc index 989aefded5..f78db55885 100644 --- a/src/compiler/backend/arm/code-generator-arm.cc +++ b/src/compiler/backend/arm/code-generator-arm.cc @@ -309,9 +309,9 @@ Condition FlagsConditionToCondition(FlagsCondition condition) { UNREACHABLE(); } -void EmitWordLoadPoisoningIfNeeded(CodeGenerator* codegen, - InstructionCode opcode, - ArmOperandConverter& i) { +void EmitWordLoadPoisoningIfNeeded( + CodeGenerator* codegen, InstructionCode opcode, + ArmOperandConverter& i) { // NOLINT(runtime/references) const MemoryAccessMode access_mode = static_cast(MiscField::decode(opcode)); if (access_mode == kMemoryAccessPoisoned) { @@ -320,9 +320,10 @@ void EmitWordLoadPoisoningIfNeeded(CodeGenerator* codegen, } } -void ComputePoisonedAddressForLoad(CodeGenerator* codegen, - InstructionCode opcode, - ArmOperandConverter& i, Register address) { +void ComputePoisonedAddressForLoad( + CodeGenerator* codegen, InstructionCode opcode, + ArmOperandConverter& i, // NOLINT(runtime/references) + Register address) { DCHECK_EQ(kMemoryAccessPoisoned, static_cast(MiscField::decode(opcode))); switch (AddressingModeField::decode(opcode)) { diff --git a/src/compiler/backend/arm64/code-generator-arm64.cc b/src/compiler/backend/arm64/code-generator-arm64.cc index 61a3999270..f8d032e7cd 100644 --- a/src/compiler/backend/arm64/code-generator-arm64.cc +++ b/src/compiler/backend/arm64/code-generator-arm64.cc @@ -376,9 +376,9 @@ Condition FlagsConditionToCondition(FlagsCondition condition) { UNREACHABLE(); } -void EmitWordLoadPoisoningIfNeeded(CodeGenerator* codegen, - InstructionCode opcode, Instruction* instr, - Arm64OperandConverter& i) { +void EmitWordLoadPoisoningIfNeeded( + CodeGenerator* codegen, InstructionCode opcode, Instruction* instr, + Arm64OperandConverter& i) { // NOLINT(runtime/references) const MemoryAccessMode access_mode = static_cast(MiscField::decode(opcode)); if (access_mode == kMemoryAccessPoisoned) { diff --git a/src/compiler/backend/instruction-selector-impl.h b/src/compiler/backend/instruction-selector-impl.h index 955861ef5d..e07d7aab94 100644 --- a/src/compiler/backend/instruction-selector-impl.h +++ b/src/compiler/backend/instruction-selector-impl.h @@ -29,8 +29,8 @@ inline bool operator<(const CaseInfo& l, const CaseInfo& r) { // Helper struct containing data about a table or lookup switch. class SwitchInfo { public: - SwitchInfo(ZoneVector& cases, int32_t min_value, int32_t max_value, - BasicBlock* default_branch) + SwitchInfo(ZoneVector& cases, // NOLINT(runtime/references) + int32_t min_value, int32_t max_value, BasicBlock* default_branch) : cases_(cases), min_value_(min_value), max_value_(max_value), diff --git a/src/compiler/backend/instruction-selector.h b/src/compiler/backend/instruction-selector.h index 4f6b1c5971..7f5c2cc434 100644 --- a/src/compiler/backend/instruction-selector.h +++ b/src/compiler/backend/instruction-selector.h @@ -496,11 +496,15 @@ class V8_EXPORT_PRIVATE InstructionSelector final { VectorSlotPair const& feedback, Node* frame_state); - void EmitTableSwitch(const SwitchInfo& sw, InstructionOperand& index_operand); - void EmitLookupSwitch(const SwitchInfo& sw, - InstructionOperand& value_operand); - void EmitBinarySearchSwitch(const SwitchInfo& sw, - InstructionOperand& value_operand); + void EmitTableSwitch( + const SwitchInfo& sw, + InstructionOperand& index_operand); // NOLINT(runtime/references) + void EmitLookupSwitch( + const SwitchInfo& sw, + InstructionOperand& value_operand); // NOLINT(runtime/references) + void EmitBinarySearchSwitch( + const SwitchInfo& sw, + InstructionOperand& value_operand); // NOLINT(runtime/references) void TryRename(InstructionOperand* op); int GetRename(int virtual_register); diff --git a/src/compiler/backend/jump-threading.h b/src/compiler/backend/jump-threading.h index e23dd45359..ce60ebcb2e 100644 --- a/src/compiler/backend/jump-threading.h +++ b/src/compiler/backend/jump-threading.h @@ -17,14 +17,17 @@ class V8_EXPORT_PRIVATE JumpThreading { public: // Compute the forwarding map of basic blocks to their ultimate destination. // Returns {true} if there is at least one block that is forwarded. - static bool ComputeForwarding(Zone* local_zone, ZoneVector& result, - InstructionSequence* code, bool frame_at_start); + static bool ComputeForwarding( + Zone* local_zone, + ZoneVector& result, // NOLINT(runtime/references) + InstructionSequence* code, bool frame_at_start); // Rewrite the instructions to forward jumps and branches. // May also negate some branches. - static void ApplyForwarding(Zone* local_zone, - ZoneVector& forwarding, - InstructionSequence* code); + static void ApplyForwarding( + Zone* local_zone, + ZoneVector& forwarding, // NOLINT(runtime/references) + InstructionSequence* code); }; } // namespace compiler diff --git a/src/compiler/backend/mips/code-generator-mips.cc b/src/compiler/backend/mips/code-generator-mips.cc index 67ec2787bd..17d2b540b5 100644 --- a/src/compiler/backend/mips/code-generator-mips.cc +++ b/src/compiler/backend/mips/code-generator-mips.cc @@ -265,8 +265,9 @@ Condition FlagsConditionToConditionTst(FlagsCondition condition) { UNREACHABLE(); } -FPUCondition FlagsConditionToConditionCmpFPU(bool& predicate, - FlagsCondition condition) { +FPUCondition FlagsConditionToConditionCmpFPU( + bool& predicate, // NOLINT(runtime/references) + FlagsCondition condition) { switch (condition) { case kEqual: predicate = true; @@ -302,9 +303,9 @@ FPUCondition FlagsConditionToConditionCmpFPU(bool& predicate, << "\""; \ UNIMPLEMENTED(); -void EmitWordLoadPoisoningIfNeeded(CodeGenerator* codegen, - InstructionCode opcode, Instruction* instr, - MipsOperandConverter& i) { +void EmitWordLoadPoisoningIfNeeded( + CodeGenerator* codegen, InstructionCode opcode, Instruction* instr, + MipsOperandConverter& i) { // NOLINT(runtime/references) const MemoryAccessMode access_mode = static_cast(MiscField::decode(opcode)); if (access_mode == kMemoryAccessPoisoned) { diff --git a/src/compiler/backend/mips64/code-generator-mips64.cc b/src/compiler/backend/mips64/code-generator-mips64.cc index 9ce8c64715..92b40dd29a 100644 --- a/src/compiler/backend/mips64/code-generator-mips64.cc +++ b/src/compiler/backend/mips64/code-generator-mips64.cc @@ -278,8 +278,9 @@ Condition FlagsConditionToConditionOvf(FlagsCondition condition) { UNREACHABLE(); } -FPUCondition FlagsConditionToConditionCmpFPU(bool& predicate, - FlagsCondition condition) { +FPUCondition FlagsConditionToConditionCmpFPU( + bool& predicate, // NOLINT(runtime/references) + FlagsCondition condition) { switch (condition) { case kEqual: predicate = true; @@ -310,9 +311,9 @@ FPUCondition FlagsConditionToConditionCmpFPU(bool& predicate, UNREACHABLE(); } -void EmitWordLoadPoisoningIfNeeded(CodeGenerator* codegen, - InstructionCode opcode, Instruction* instr, - MipsOperandConverter& i) { +void EmitWordLoadPoisoningIfNeeded( + CodeGenerator* codegen, InstructionCode opcode, Instruction* instr, + MipsOperandConverter& i) { // NOLINT(runtime/references) const MemoryAccessMode access_mode = static_cast(MiscField::decode(opcode)); if (access_mode == kMemoryAccessPoisoned) { diff --git a/src/compiler/backend/ppc/code-generator-ppc.cc b/src/compiler/backend/ppc/code-generator-ppc.cc index 67a00111d2..700896a8ba 100644 --- a/src/compiler/backend/ppc/code-generator-ppc.cc +++ b/src/compiler/backend/ppc/code-generator-ppc.cc @@ -263,8 +263,9 @@ Condition FlagsConditionToCondition(FlagsCondition condition, ArchOpcode op) { UNREACHABLE(); } -void EmitWordLoadPoisoningIfNeeded(CodeGenerator* codegen, Instruction* instr, - PPCOperandConverter& i) { +void EmitWordLoadPoisoningIfNeeded( + CodeGenerator* codegen, Instruction* instr, + PPCOperandConverter& i) { // NOLINT(runtime/references) const MemoryAccessMode access_mode = static_cast(MiscField::decode(instr->opcode())); if (access_mode == kMemoryAccessPoisoned) { diff --git a/src/compiler/backend/register-allocator.h b/src/compiler/backend/register-allocator.h index aeb81a6827..0834bc3d34 100644 --- a/src/compiler/backend/register-allocator.h +++ b/src/compiler/backend/register-allocator.h @@ -1286,11 +1286,13 @@ class LinearScanAllocator final : public RegisterAllocator { RangeWithRegister::Equals>; void MaybeUndoPreviousSplit(LiveRange* range); - void SpillNotLiveRanges(RangeWithRegisterSet& to_be_live, - LifetimePosition position, SpillMode spill_mode); + void SpillNotLiveRanges( + RangeWithRegisterSet& to_be_live, // NOLINT(runtime/references) + LifetimePosition position, SpillMode spill_mode); LiveRange* AssignRegisterOnReload(LiveRange* range, int reg); - void ReloadLiveRanges(RangeWithRegisterSet& to_be_live, - LifetimePosition position); + void ReloadLiveRanges( + RangeWithRegisterSet& to_be_live, // NOLINT(runtime/references) + LifetimePosition position); void UpdateDeferredFixedRanges(SpillMode spill_mode, InstructionBlock* block); bool BlockIsDeferredOrImmediatePredecessorIsNotDeferred( diff --git a/src/compiler/backend/s390/code-generator-s390.cc b/src/compiler/backend/s390/code-generator-s390.cc index c5ee63e4c9..34c3c1b07c 100644 --- a/src/compiler/backend/s390/code-generator-s390.cc +++ b/src/compiler/backend/s390/code-generator-s390.cc @@ -1246,8 +1246,9 @@ void AdjustStackPointerForTailCall( } } -void EmitWordLoadPoisoningIfNeeded(CodeGenerator* codegen, Instruction* instr, - S390OperandConverter& i) { +void EmitWordLoadPoisoningIfNeeded( + CodeGenerator* codegen, Instruction* instr, + S390OperandConverter& i) { // NOLINT(runtime/references) const MemoryAccessMode access_mode = static_cast(MiscField::decode(instr->opcode())); if (access_mode == kMemoryAccessPoisoned) { diff --git a/src/compiler/backend/s390/instruction-selector-s390.cc b/src/compiler/backend/s390/instruction-selector-s390.cc index d982605efc..582bc374b3 100644 --- a/src/compiler/backend/s390/instruction-selector-s390.cc +++ b/src/compiler/backend/s390/instruction-selector-s390.cc @@ -447,11 +447,13 @@ void VisitTryTruncateDouble(InstructionSelector* selector, ArchOpcode opcode, #endif template -void GenerateRightOperands(InstructionSelector* selector, Node* node, - Node* right, InstructionCode& opcode, - OperandModes& operand_mode, - InstructionOperand* inputs, size_t& input_count, - CanCombineWithLoad canCombineWithLoad) { +void GenerateRightOperands( + InstructionSelector* selector, Node* node, Node* right, + InstructionCode& opcode, // NOLINT(runtime/references) + OperandModes& operand_mode, // NOLINT(runtime/references) + InstructionOperand* inputs, + size_t& input_count, // NOLINT(runtime/references) + CanCombineWithLoad canCombineWithLoad) { S390OperandGenerator g(selector); if ((operand_mode & OperandMode::kAllowImmediate) && @@ -491,11 +493,13 @@ void GenerateRightOperands(InstructionSelector* selector, Node* node, } template -void GenerateBinOpOperands(InstructionSelector* selector, Node* node, - Node* left, Node* right, InstructionCode& opcode, - OperandModes& operand_mode, - InstructionOperand* inputs, size_t& input_count, - CanCombineWithLoad canCombineWithLoad) { +void GenerateBinOpOperands( + InstructionSelector* selector, Node* node, Node* left, Node* right, + InstructionCode& opcode, // NOLINT(runtime/references) + OperandModes& operand_mode, // NOLINT(runtime/references) + InstructionOperand* inputs, + size_t& input_count, // NOLINT(runtime/references) + CanCombineWithLoad canCombineWithLoad) { S390OperandGenerator g(selector); // left is always register InstructionOperand const left_input = g.UseRegister(left); diff --git a/src/compiler/backend/x64/code-generator-x64.cc b/src/compiler/backend/x64/code-generator-x64.cc index b39c548ef9..61c3a45a16 100644 --- a/src/compiler/backend/x64/code-generator-x64.cc +++ b/src/compiler/backend/x64/code-generator-x64.cc @@ -349,7 +349,8 @@ class WasmProtectedInstructionTrap final : public WasmOutOfLineTrap { void EmitOOLTrapIfNeeded(Zone* zone, CodeGenerator* codegen, InstructionCode opcode, Instruction* instr, - X64OperandConverter& i, int pc) { + X64OperandConverter& i, // NOLINT(runtime/references) + int pc) { const MemoryAccessMode access_mode = static_cast(MiscField::decode(opcode)); if (access_mode == kMemoryAccessProtected) { @@ -357,9 +358,9 @@ void EmitOOLTrapIfNeeded(Zone* zone, CodeGenerator* codegen, } } -void EmitWordLoadPoisoningIfNeeded(CodeGenerator* codegen, - InstructionCode opcode, Instruction* instr, - X64OperandConverter& i) { +void EmitWordLoadPoisoningIfNeeded( + CodeGenerator* codegen, InstructionCode opcode, Instruction* instr, + X64OperandConverter& i) { // NOLINT(runtime/references) const MemoryAccessMode access_mode = static_cast(MiscField::decode(opcode)); if (access_mode == kMemoryAccessPoisoned) { diff --git a/src/compiler/bytecode-analysis.cc b/src/compiler/bytecode-analysis.cc index e52bcac211..fe11f5fa0a 100644 --- a/src/compiler/bytecode-analysis.cc +++ b/src/compiler/bytecode-analysis.cc @@ -93,8 +93,10 @@ BytecodeAnalysis::BytecodeAnalysis(Handle bytecode_array, namespace { -void UpdateInLiveness(Bytecode bytecode, BytecodeLivenessState& in_liveness, - const interpreter::BytecodeArrayAccessor& accessor) { +void UpdateInLiveness( + Bytecode bytecode, + BytecodeLivenessState& in_liveness, // NOLINT(runtime/references) + const interpreter::BytecodeArrayAccessor& accessor) { int num_operands = Bytecodes::NumberOfOperands(bytecode); const OperandType* operand_types = Bytecodes::GetOperandTypes(bytecode); @@ -201,11 +203,13 @@ void UpdateInLiveness(Bytecode bytecode, BytecodeLivenessState& in_liveness, } } -void UpdateOutLiveness(Bytecode bytecode, BytecodeLivenessState& out_liveness, - BytecodeLivenessState* next_bytecode_in_liveness, - const interpreter::BytecodeArrayAccessor& accessor, - Handle bytecode_array, - const BytecodeLivenessMap& liveness_map) { +void UpdateOutLiveness( + Bytecode bytecode, + BytecodeLivenessState& out_liveness, // NOLINT(runtime/references) + BytecodeLivenessState* next_bytecode_in_liveness, + const interpreter::BytecodeArrayAccessor& accessor, + Handle bytecode_array, + const BytecodeLivenessMap& liveness_map) { int current_offset = accessor.current_offset(); // Special case Suspend and Resume to just pass through liveness. @@ -261,7 +265,8 @@ void UpdateOutLiveness(Bytecode bytecode, BytecodeLivenessState& out_liveness, } } -void UpdateLiveness(Bytecode bytecode, BytecodeLiveness& liveness, +void UpdateLiveness(Bytecode bytecode, + BytecodeLiveness& liveness, // NOLINT(runtime/references) BytecodeLivenessState** next_bytecode_in_liveness, const interpreter::BytecodeArrayAccessor& accessor, Handle bytecode_array, @@ -274,8 +279,10 @@ void UpdateLiveness(Bytecode bytecode, BytecodeLiveness& liveness, *next_bytecode_in_liveness = liveness.in; } -void UpdateAssignments(Bytecode bytecode, BytecodeLoopAssignments& assignments, - const interpreter::BytecodeArrayAccessor& accessor) { +void UpdateAssignments( + Bytecode bytecode, + BytecodeLoopAssignments& assignments, // NOLINT(runtime/references) + const interpreter::BytecodeArrayAccessor& accessor) { int num_operands = Bytecodes::NumberOfOperands(bytecode); const OperandType* operand_types = Bytecodes::GetOperandTypes(bytecode); diff --git a/src/compiler/code-assembler.h b/src/compiler/code-assembler.h index ed6137c675..6aea9e5c57 100644 --- a/src/compiler/code-assembler.h +++ b/src/compiler/code-assembler.h @@ -858,10 +858,13 @@ class V8_EXPORT_PRIVATE CodeAssembler { // TODO(jkummerow): The style guide wants pointers for output parameters. // https://google.github.io/styleguide/cppguide.html#Output_Parameters - bool ToInt32Constant(Node* node, int32_t& out_value); - bool ToInt64Constant(Node* node, int64_t& out_value); + bool ToInt32Constant(Node* node, + int32_t& out_value); // NOLINT(runtime/references) + bool ToInt64Constant(Node* node, + int64_t& out_value); // NOLINT(runtime/references) bool ToSmiConstant(Node* node, Smi* out_value); - bool ToIntPtrConstant(Node* node, intptr_t& out_value); + bool ToIntPtrConstant(Node* node, + intptr_t& out_value); // NOLINT(runtime/references) bool IsUndefinedConstant(TNode node); bool IsNullConstant(TNode node); diff --git a/src/compiler/diamond.h b/src/compiler/diamond.h index cc6ca954f3..68191df247 100644 --- a/src/compiler/diamond.h +++ b/src/compiler/diamond.h @@ -33,13 +33,16 @@ struct Diamond { } // Place {this} after {that} in control flow order. - void Chain(Diamond& that) { branch->ReplaceInput(1, that.merge); } + void Chain(Diamond& that) { // NOLINT(runtime/references) + branch->ReplaceInput(1, that.merge); + } // Place {this} after {that} in control flow order. void Chain(Node* that) { branch->ReplaceInput(1, that); } // Nest {this} into either the if_true or if_false branch of {that}. - void Nest(Diamond& that, bool if_true) { + void Nest(Diamond& that, // NOLINT(runtime/references) + bool if_true) { if (if_true) { branch->ReplaceInput(1, that.if_true); that.merge->ReplaceInput(0, merge); diff --git a/src/compiler/int64-lowering.h b/src/compiler/int64-lowering.h index b083805771..37e9ee02cc 100644 --- a/src/compiler/int64-lowering.h +++ b/src/compiler/int64-lowering.h @@ -59,7 +59,9 @@ class V8_EXPORT_PRIVATE Int64Lowering { bool HasReplacementHigh(Node* node); Node* GetReplacementHigh(Node* node); void PreparePhiReplacement(Node* phi); - void GetIndexNodes(Node* index, Node*& index_low, Node*& index_high); + void GetIndexNodes(Node* index, + Node*& index_low, // NOLINT(runtime/references) + Node*& index_high); // NOLINT(runtime/references) void ReplaceNodeWithProjections(Node* node); void LowerMemoryBaseAndIndex(Node* node); diff --git a/src/compiler/js-call-reducer.cc b/src/compiler/js-call-reducer.cc index 55c1352c9b..6d9576ce99 100644 --- a/src/compiler/js-call-reducer.cc +++ b/src/compiler/js-call-reducer.cc @@ -1095,10 +1095,10 @@ bool CanInlineArrayIteratingBuiltin(JSHeapBroker* broker, return true; } -bool CanInlineArrayResizingBuiltin(JSHeapBroker* broker, - MapHandles const& receiver_maps, - std::vector& kinds, - bool builtin_is_push = false) { +bool CanInlineArrayResizingBuiltin( + JSHeapBroker* broker, MapHandles const& receiver_maps, + std::vector& kinds, // NOLINT(runtime/references) + bool builtin_is_push = false) { DCHECK_NE(0, receiver_maps.size()); for (auto receiver_map : receiver_maps) { MapRef map(broker, receiver_map); diff --git a/src/compiler/js-inlining.h b/src/compiler/js-inlining.h index 94a9e71b2e..f50f7b591d 100644 --- a/src/compiler/js-inlining.h +++ b/src/compiler/js-inlining.h @@ -59,7 +59,8 @@ class JSInliner final : public AdvancedReducer { SourcePositionTable* const source_positions_; base::Optional DetermineCallTarget(Node* node); - FeedbackVectorRef DetermineCallContext(Node* node, Node*& context_out); + FeedbackVectorRef DetermineCallContext( + Node* node, Node*& context_out); // NOLINT(runtime/references) Node* CreateArtificialFrameState(Node* node, Node* outer_frame_state, int parameter_count, BailoutId bailout_id, diff --git a/src/compiler/js-type-hint-lowering.h b/src/compiler/js-type-hint-lowering.h index 7164a0b708..a74c019355 100644 --- a/src/compiler/js-type-hint-lowering.h +++ b/src/compiler/js-type-hint-lowering.h @@ -153,7 +153,8 @@ class JSTypeHintLowering { private: friend class JSSpeculativeBinopBuilder; - Node* TryBuildSoftDeopt(FeedbackNexus& nexus, Node* effect, Node* control, + Node* TryBuildSoftDeopt(FeedbackNexus& nexus, // NOLINT(runtime/references) + Node* effect, Node* control, DeoptimizeReason reson) const; JSGraph* jsgraph() const { return jsgraph_; } diff --git a/src/compiler/load-elimination.h b/src/compiler/load-elimination.h index 7658d01365..c2dc8f2f06 100644 --- a/src/compiler/load-elimination.h +++ b/src/compiler/load-elimination.h @@ -233,7 +233,7 @@ class V8_EXPORT_PRIVATE LoadElimination final bool FieldsEquals(AbstractFields const& this_fields, AbstractFields const& that_fields) const; - void FieldsMerge(AbstractFields& this_fields, + void FieldsMerge(AbstractFields& this_fields, // NOLINT(runtime/references) AbstractFields const& that_fields, Zone* zone); AbstractElements const* elements_ = nullptr; diff --git a/src/compiler/scheduler.cc b/src/compiler/scheduler.cc index b57162f7f5..cc28921807 100644 --- a/src/compiler/scheduler.cc +++ b/src/compiler/scheduler.cc @@ -728,8 +728,9 @@ class SpecialRPONumberer : public ZoneObject { } }; - int Push(ZoneVector& stack, int depth, - BasicBlock* child, int unvisited) { + int Push( + ZoneVector& stack, // NOLINT(runtime/references) + int depth, BasicBlock* child, int unvisited) { if (child->rpo_number() == unvisited) { stack[depth].block = child; stack[depth].index = 0; @@ -958,8 +959,9 @@ class SpecialRPONumberer : public ZoneObject { } // Computes loop membership from the backedges of the control flow graph. - void ComputeLoopInfo(ZoneVector& queue, - size_t num_loops, ZoneVector* backedges) { + void ComputeLoopInfo( + ZoneVector& queue, // NOLINT(runtime/references) + size_t num_loops, ZoneVector* backedges) { // Extend existing loop membership vectors. for (LoopInfo& loop : loops_) { loop.members->Resize(static_cast(schedule_->BasicBlockCount()), diff --git a/src/compiler/serializer-for-background-compilation.cc b/src/compiler/serializer-for-background-compilation.cc index 52894b2fa6..7f4ce7f0d2 100644 --- a/src/compiler/serializer-for-background-compilation.cc +++ b/src/compiler/serializer-for-background-compilation.cc @@ -200,7 +200,7 @@ class SerializerForBackgroundCompilation::Environment : public ZoneObject { // Appends the hints for the given register range to {dst} (in order). void ExportRegisterHints(interpreter::Register first, size_t count, - HintsVector& dst); + HintsVector& dst); // NOLINT(runtime/references) private: friend std::ostream& operator<<(std::ostream& out, const Environment& env); diff --git a/src/compiler/serializer-for-background-compilation.h b/src/compiler/serializer-for-background-compilation.h index dee1092f0f..bfca854035 100644 --- a/src/compiler/serializer-for-background-compilation.h +++ b/src/compiler/serializer-for-background-compilation.h @@ -370,8 +370,9 @@ class SerializerForBackgroundCompilation { bool with_spread = false); void ProcessApiCall(Handle target, const HintsVector& arguments); - void ProcessReceiverMapForApiCall(FunctionTemplateInfoRef& target, - Handle receiver); + void ProcessReceiverMapForApiCall( + FunctionTemplateInfoRef& target, // NOLINT(runtime/references) + Handle receiver); void ProcessBuiltinCall(Handle target, const HintsVector& arguments); @@ -405,8 +406,8 @@ class SerializerForBackgroundCompilation { void ProcessContextAccess(const Hints& context_hints, int slot, int depth, ContextProcessingMode mode); - void ProcessImmutableLoad(ContextRef& context, int slot, - ContextProcessingMode mode); + void ProcessImmutableLoad(ContextRef& context, // NOLINT(runtime/references) + int slot, ContextProcessingMode mode); void ProcessLdaLookupGlobalSlot(interpreter::BytecodeArrayIterator* iterator); void ProcessLdaLookupContextSlot( interpreter::BytecodeArrayIterator* iterator); diff --git a/src/compiler/state-values-utils.cc b/src/compiler/state-values-utils.cc index c00613c232..56d81034ef 100644 --- a/src/compiler/state-values-utils.cc +++ b/src/compiler/state-values-utils.cc @@ -392,14 +392,13 @@ MachineType StateValuesAccess::iterator::type() { } } - -bool StateValuesAccess::iterator::operator!=(iterator& other) { +bool StateValuesAccess::iterator::operator!=( + iterator& other) { // NOLINT(runtime/references) // We only allow comparison with end(). CHECK(other.done()); return !done(); } - StateValuesAccess::iterator& StateValuesAccess::iterator::operator++() { Advance(); return *this; diff --git a/src/compiler/state-values-utils.h b/src/compiler/state-values-utils.h index 00ec3bb351..bd2d11708a 100644 --- a/src/compiler/state-values-utils.h +++ b/src/compiler/state-values-utils.h @@ -92,7 +92,7 @@ class V8_EXPORT_PRIVATE StateValuesAccess { class V8_EXPORT_PRIVATE iterator { public: // Bare minimum of operators needed for range iteration. - bool operator!=(iterator& other); + bool operator!=(iterator& other); // NOLINT(runtime/references) iterator& operator++(); TypedNode operator*(); diff --git a/src/d8/d8.cc b/src/d8/d8.cc index a0be2c195a..c0168d4498 100644 --- a/src/d8/d8.cc +++ b/src/d8/d8.cc @@ -2001,8 +2001,9 @@ int LineFromOffset(Local script, int offset) { return location.GetLineNumber(); } -void WriteLcovDataForRange(std::vector& lines, int start_line, - int end_line, uint32_t count) { +void WriteLcovDataForRange( + std::vector& lines, // NOLINT(runtime/references) + int start_line, int end_line, uint32_t count) { // Ensure space in the array. lines.resize(std::max(static_cast(end_line + 1), lines.size()), 0); // Boundary lines could be shared between two functions with different @@ -2013,10 +2014,10 @@ void WriteLcovDataForRange(std::vector& lines, int start_line, for (int k = start_line + 1; k < end_line; k++) lines[k] = count; } -void WriteLcovDataForNamedRange(std::ostream& sink, - std::vector& lines, - const std::string& name, int start_line, - int end_line, uint32_t count) { +void WriteLcovDataForNamedRange( + std::ostream& sink, + std::vector& lines, // NOLINT(runtime/references) + const std::string& name, int start_line, int end_line, uint32_t count) { WriteLcovDataForRange(lines, start_line, end_line, count); sink << "FN:" << start_line + 1 << "," << name << std::endl; sink << "FNDA:" << count << "," << name << std::endl; diff --git a/src/debug/debug-coverage.cc b/src/debug/debug-coverage.cc index e27c734bea..5337f98db9 100644 --- a/src/debug/debug-coverage.cc +++ b/src/debug/debug-coverage.cc @@ -68,7 +68,8 @@ bool CompareCoverageBlock(const CoverageBlock& a, const CoverageBlock& b) { return a.start < b.start; } -void SortBlockData(std::vector& v) { +void SortBlockData( + std::vector& v) { // NOLINT(runtime/references) // Sort according to the block nesting structure. std::sort(v.begin(), v.end(), CompareCoverageBlock); } diff --git a/src/debug/debug-interface.h b/src/debug/debug-interface.h index 79222371f9..59bc6d0863 100644 --- a/src/debug/debug-interface.h +++ b/src/debug/debug-interface.h @@ -164,8 +164,9 @@ class WasmScript : public Script { uint32_t GetFunctionHash(int function_index); }; -V8_EXPORT_PRIVATE void GetLoadedScripts(Isolate* isolate, - PersistentValueVector