[cleanup] Mark compiler methods in subclasses with override.
Fixing clang-tidy warning. Bug: v8:8015 Change-Id: I5164899da0994a855182ed203572c5984ab87449 Reviewed-on: https://chromium-review.googlesource.com/1227070 Reviewed-by: Michael Starzinger <mstarzinger@chromium.org> Commit-Queue: Florian Sattler <sattlerf@google.com> Cr-Commit-Position: refs/heads/master@{#55938}
This commit is contained in:
parent
0c296cb229
commit
0c789aa57f
@ -50,7 +50,7 @@ class OptimizingCompileDispatcher::CompileTask : public CancelableTask {
|
||||
++dispatcher_->ref_count_;
|
||||
}
|
||||
|
||||
virtual ~CompileTask() = default;
|
||||
~CompileTask() override = default;
|
||||
|
||||
private:
|
||||
// v8::Task overrides.
|
||||
|
@ -1431,7 +1431,8 @@ const Operator* CommonOperatorBuilder::Call(
|
||||
Operator::ZeroIfNoThrow(call_descriptor->properties()),
|
||||
call_descriptor) {}
|
||||
|
||||
void PrintParameter(std::ostream& os, PrintVerbosity verbose) const {
|
||||
void PrintParameter(std::ostream& os,
|
||||
PrintVerbosity verbose) const override {
|
||||
os << "[" << *parameter() << "]";
|
||||
}
|
||||
};
|
||||
@ -1455,7 +1456,8 @@ const Operator* CommonOperatorBuilder::CallWithCallerSavedRegisters(
|
||||
Operator::ZeroIfNoThrow(call_descriptor->properties()),
|
||||
call_descriptor) {}
|
||||
|
||||
void PrintParameter(std::ostream& os, PrintVerbosity verbose) const {
|
||||
void PrintParameter(std::ostream& os,
|
||||
PrintVerbosity verbose) const override {
|
||||
os << "[" << *parameter() << "]";
|
||||
}
|
||||
};
|
||||
@ -1474,7 +1476,8 @@ const Operator* CommonOperatorBuilder::TailCall(
|
||||
call_descriptor->FrameStateCount(),
|
||||
1, 1, 0, 0, 1, call_descriptor) {}
|
||||
|
||||
void PrintParameter(std::ostream& os, PrintVerbosity verbose) const {
|
||||
void PrintParameter(std::ostream& os,
|
||||
PrintVerbosity verbose) const override {
|
||||
os << "[" << *parameter() << "]";
|
||||
}
|
||||
};
|
||||
|
@ -130,7 +130,7 @@ class V8_EXPORT_PRIVATE GraphReducer
|
||||
: public NON_EXPORTED_BASE(AdvancedReducer::Editor) {
|
||||
public:
|
||||
GraphReducer(Zone* zone, Graph* graph, Node* dead = nullptr);
|
||||
~GraphReducer();
|
||||
~GraphReducer() override;
|
||||
|
||||
Graph* graph() const { return graph_; }
|
||||
|
||||
|
@ -31,7 +31,7 @@ class SourcePositionTable;
|
||||
|
||||
struct TurboJsonFile : public std::ofstream {
|
||||
TurboJsonFile(OptimizedCompilationInfo* info, std::ios_base::openmode mode);
|
||||
~TurboJsonFile();
|
||||
~TurboJsonFile() override;
|
||||
};
|
||||
|
||||
struct SourcePositionAsJSON {
|
||||
|
@ -25,7 +25,7 @@ class V8_EXPORT_PRIVATE MachineOperatorReducer final
|
||||
public:
|
||||
explicit MachineOperatorReducer(MachineGraph* mcgraph,
|
||||
bool allow_signalling_nan = true);
|
||||
~MachineOperatorReducer();
|
||||
~MachineOperatorReducer() override;
|
||||
|
||||
const char* reducer_name() const override { return "MachineOperatorReducer"; }
|
||||
|
||||
|
@ -197,7 +197,7 @@ class Operator1 : public Operator {
|
||||
os << "[" << parameter() << "]";
|
||||
}
|
||||
|
||||
virtual void PrintToImpl(std::ostream& os, PrintVerbosity verbose) const {
|
||||
void PrintToImpl(std::ostream& os, PrintVerbosity verbose) const override {
|
||||
os << mnemonic();
|
||||
PrintParameter(os, verbose);
|
||||
}
|
||||
|
@ -20,7 +20,7 @@ class Graph;
|
||||
class SelectLowering final : public Reducer {
|
||||
public:
|
||||
SelectLowering(Graph* graph, CommonOperatorBuilder* common);
|
||||
~SelectLowering();
|
||||
~SelectLowering() override;
|
||||
|
||||
const char* reducer_name() const override { return "SelectLowering"; }
|
||||
|
||||
|
@ -29,7 +29,7 @@ class V8_EXPORT_PRIVATE TypedOptimization final
|
||||
public:
|
||||
TypedOptimization(Editor* editor, CompilationDependencies* dependencies,
|
||||
JSGraph* jsgraph, JSHeapBroker* js_heap_broker);
|
||||
~TypedOptimization();
|
||||
~TypedOptimization() override;
|
||||
|
||||
const char* reducer_name() const override { return "TypedOptimization"; }
|
||||
|
||||
|
@ -17,7 +17,7 @@ class V8_EXPORT_PRIVATE ValueNumberingReducer final
|
||||
: public NON_EXPORTED_BASE(Reducer) {
|
||||
public:
|
||||
explicit ValueNumberingReducer(Zone* temp_zone, Zone* graph_zone);
|
||||
~ValueNumberingReducer();
|
||||
~ValueNumberingReducer() override;
|
||||
|
||||
const char* reducer_name() const override { return "ValueNumberingReducer"; }
|
||||
|
||||
|
@ -46,7 +46,7 @@ class CodeRunner : public CallHelper<T> {
|
||||
public:
|
||||
CodeRunner(Isolate* isolate, Handle<Code> code, MachineSignature* csig)
|
||||
: CallHelper<T>(isolate, csig), code_(code) {}
|
||||
virtual ~CodeRunner() {}
|
||||
~CodeRunner() override {}
|
||||
|
||||
Address Generate() override { return code_->entry(); }
|
||||
|
||||
|
@ -39,7 +39,7 @@ class RawMachineAssemblerTester : public HandleAndZoneScope,
|
||||
InstructionSelector::SupportedMachineOperatorFlags(),
|
||||
InstructionSelector::AlignmentRequirements()) {}
|
||||
|
||||
virtual ~RawMachineAssemblerTester() {}
|
||||
~RawMachineAssemblerTester() override {}
|
||||
|
||||
void CheckNumber(double expected, Object* number) {
|
||||
CHECK(this->isolate()->factory()->NewNumber(expected)->SameValue(number));
|
||||
@ -59,7 +59,7 @@ class RawMachineAssemblerTester : public HandleAndZoneScope,
|
||||
}
|
||||
|
||||
protected:
|
||||
virtual Address Generate() {
|
||||
Address Generate() override {
|
||||
if (code_.is_null()) {
|
||||
Schedule* schedule = this->Export();
|
||||
auto call_descriptor = this->call_descriptor();
|
||||
|
@ -62,7 +62,7 @@ class GraphBuilderTester : public HandleAndZoneScope,
|
||||
Begin(static_cast<int>(parameter_count()));
|
||||
InitParameters();
|
||||
}
|
||||
virtual ~GraphBuilderTester() {}
|
||||
~GraphBuilderTester() override {}
|
||||
|
||||
void GenerateCode() { Generate(); }
|
||||
Node* Parameter(size_t index) {
|
||||
|
@ -309,12 +309,12 @@ class CmpMaterializeBoolGen : public BinopGen<int32_t> {
|
||||
CmpMaterializeBoolGen(IrOpcode::Value opcode, bool i)
|
||||
: w(opcode), invert(i) {}
|
||||
|
||||
virtual void gen(RawMachineAssemblerTester<int32_t>* m, Node* a, Node* b) {
|
||||
void gen(RawMachineAssemblerTester<int32_t>* m, Node* a, Node* b) override {
|
||||
Node* cond = w.MakeNode(m, a, b);
|
||||
if (invert) cond = m->Word32Equal(cond, m->Int32Constant(0));
|
||||
m->Return(cond);
|
||||
}
|
||||
virtual int32_t expected(int32_t a, int32_t b) {
|
||||
int32_t expected(int32_t a, int32_t b) override {
|
||||
if (invert) return !w.Int32Compare(a, b) ? 1 : 0;
|
||||
return w.Int32Compare(a, b) ? 1 : 0;
|
||||
}
|
||||
@ -333,7 +333,7 @@ class CmpBranchGen : public BinopGen<int32_t> {
|
||||
CmpBranchGen(IrOpcode::Value opcode, bool i, bool t, int32_t eq, int32_t ne)
|
||||
: w(opcode), invert(i), true_first(t), eq_constant(eq), ne_constant(ne) {}
|
||||
|
||||
virtual void gen(RawMachineAssemblerTester<int32_t>* m, Node* a, Node* b) {
|
||||
void gen(RawMachineAssemblerTester<int32_t>* m, Node* a, Node* b) override {
|
||||
RawMachineLabel blocka, blockb;
|
||||
Node* cond = w.MakeNode(m, a, b);
|
||||
if (invert) cond = m->Word32Equal(cond, m->Int32Constant(0));
|
||||
@ -350,7 +350,7 @@ class CmpBranchGen : public BinopGen<int32_t> {
|
||||
m->Return(m->Int32Constant(eq_constant));
|
||||
}
|
||||
}
|
||||
virtual int32_t expected(int32_t a, int32_t b) {
|
||||
int32_t expected(int32_t a, int32_t b) override {
|
||||
if (invert) return !w.Int32Compare(a, b) ? eq_constant : ne_constant;
|
||||
return w.Int32Compare(a, b) ? eq_constant : ne_constant;
|
||||
}
|
||||
|
@ -238,7 +238,7 @@ class MockPlatform : public v8::Platform {
|
||||
TaskWrapper(MockPlatform* platform,
|
||||
std::vector<std::unique_ptr<Task>> tasks, bool signal)
|
||||
: platform_(platform), tasks_(std::move(tasks)), signal_(signal) {}
|
||||
~TaskWrapper() = default;
|
||||
~TaskWrapper() override = default;
|
||||
|
||||
void Run() override {
|
||||
for (auto& task : tasks_) {
|
||||
|
@ -39,7 +39,7 @@ bool Contains(const ZoneVector<MoveOperands*>* moves,
|
||||
class InstructionTest : public TestWithZone {
|
||||
public:
|
||||
InstructionTest() {}
|
||||
virtual ~InstructionTest() {}
|
||||
~InstructionTest() override {}
|
||||
|
||||
ParallelMove* CreateParallelMove(
|
||||
const std::vector<InstructionOperand>& operand_pairs) {
|
||||
|
Loading…
Reference in New Issue
Block a user