Commit 7d7eee51 authored by ishell's avatar ishell Committed by Commit bot

[presubmit] Enabling readability/inheritance linter checking.

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

Cr-Commit-Position: refs/heads/master@{#31785}
parent f89286f5
......@@ -35,7 +35,7 @@ class AstExpressionVisitor : public AstVisitor {
DEFINE_AST_VISITOR_SUBCLASS_MEMBERS();
#define DECLARE_VISIT(type) virtual void Visit##type(type* node) override;
#define DECLARE_VISIT(type) void Visit##type(type* node) override;
AST_NODE_LIST(DECLARE_VISIT)
#undef DECLARE_VISIT
......
......@@ -20,7 +20,7 @@ class AstLiteralReindexer final : public AstVisitor {
int NextIndex() { return next_index_++; }
private:
#define DEFINE_VISIT(type) virtual void Visit##type(type* node) override;
#define DEFINE_VISIT(type) void Visit##type(type* node) override;
AST_NODE_LIST(DEFINE_VISIT)
#undef DEFINE_VISIT
......
......@@ -27,7 +27,7 @@ class AstNumberingVisitor final : public AstVisitor {
private:
// AST node visitor interface.
#define DEFINE_VISIT(type) virtual void Visit##type(type* node) override;
#define DEFINE_VISIT(type) void Visit##type(type* node) override;
AST_NODE_LIST(DEFINE_VISIT)
#undef DEFINE_VISIT
......
......@@ -942,8 +942,7 @@ class RegExpUnparser final : public RegExpVisitor {
public:
RegExpUnparser(std::ostream& os, Zone* zone) : os_(os), zone_(zone) {}
void VisitCharacterRange(CharacterRange that);
#define MAKE_CASE(Name) \
virtual void* Visit##Name(RegExp##Name*, void* data) override;
#define MAKE_CASE(Name) void* Visit##Name(RegExp##Name*, void* data) override;
FOR_EACH_REG_EXP_TREE_TYPE(MAKE_CASE)
#undef MAKE_CASE
private:
......
......@@ -1324,7 +1324,7 @@ class AstLiteralReindexer;
// Base class for literals that needs space in the corresponding JSFunction.
class MaterializedLiteral : public Expression {
public:
virtual MaterializedLiteral* AsMaterializedLiteral() { return this; }
MaterializedLiteral* AsMaterializedLiteral() final { return this; }
int literal_index() { return literal_index_; }
......@@ -2081,7 +2081,7 @@ class UnaryOperation final : public Expression {
BailoutId MaterializeTrueId() const { return BailoutId(local_id(0)); }
BailoutId MaterializeFalseId() const { return BailoutId(local_id(1)); }
virtual void RecordToBooleanTypeFeedback(TypeFeedbackOracle* oracle) override;
void RecordToBooleanTypeFeedback(TypeFeedbackOracle* oracle) override;
protected:
UnaryOperation(Zone* zone, Token::Value op, Expression* expression, int pos)
......@@ -2126,7 +2126,7 @@ class BinaryOperation final : public Expression {
if (arg.IsJust()) fixed_right_arg_value_ = arg.FromJust();
}
virtual void RecordToBooleanTypeFeedback(TypeFeedbackOracle* oracle) override;
void RecordToBooleanTypeFeedback(TypeFeedbackOracle* oracle) override;
protected:
BinaryOperation(Zone* zone, Token::Value op, Expression* left,
......@@ -2859,8 +2859,7 @@ class RegExpDisjunction final : public RegExpTree {
public:
explicit RegExpDisjunction(ZoneList<RegExpTree*>* alternatives);
void* Accept(RegExpVisitor* visitor, void* data) override;
virtual RegExpNode* ToNode(RegExpCompiler* compiler,
RegExpNode* on_success) override;
RegExpNode* ToNode(RegExpCompiler* compiler, RegExpNode* on_success) override;
RegExpDisjunction* AsDisjunction() override;
Interval CaptureRegisters() override;
bool IsDisjunction() override;
......@@ -2883,8 +2882,7 @@ class RegExpAlternative final : public RegExpTree {
public:
explicit RegExpAlternative(ZoneList<RegExpTree*>* nodes);
void* Accept(RegExpVisitor* visitor, void* data) override;
virtual RegExpNode* ToNode(RegExpCompiler* compiler,
RegExpNode* on_success) override;
RegExpNode* ToNode(RegExpCompiler* compiler, RegExpNode* on_success) override;
RegExpAlternative* AsAlternative() override;
Interval CaptureRegisters() override;
bool IsAlternative() override;
......@@ -2912,8 +2910,7 @@ class RegExpAssertion final : public RegExpTree {
};
explicit RegExpAssertion(AssertionType type) : assertion_type_(type) { }
void* Accept(RegExpVisitor* visitor, void* data) override;
virtual RegExpNode* ToNode(RegExpCompiler* compiler,
RegExpNode* on_success) override;
RegExpNode* ToNode(RegExpCompiler* compiler, RegExpNode* on_success) override;
RegExpAssertion* AsAssertion() override;
bool IsAssertion() override;
bool IsAnchoredAtStart() override;
......@@ -2958,8 +2955,7 @@ class RegExpCharacterClass final : public RegExpTree {
: set_(type),
is_negated_(false) { }
void* Accept(RegExpVisitor* visitor, void* data) override;
virtual RegExpNode* ToNode(RegExpCompiler* compiler,
RegExpNode* on_success) override;
RegExpNode* ToNode(RegExpCompiler* compiler, RegExpNode* on_success) override;
RegExpCharacterClass* AsCharacterClass() override;
bool IsCharacterClass() override;
bool IsTextElement() override { return true; }
......@@ -2995,8 +2991,7 @@ class RegExpAtom final : public RegExpTree {
public:
explicit RegExpAtom(Vector<const uc16> data) : data_(data) { }
void* Accept(RegExpVisitor* visitor, void* data) override;
virtual RegExpNode* ToNode(RegExpCompiler* compiler,
RegExpNode* on_success) override;
RegExpNode* ToNode(RegExpCompiler* compiler, RegExpNode* on_success) override;
RegExpAtom* AsAtom() override;
bool IsAtom() override;
bool IsTextElement() override { return true; }
......@@ -3014,8 +3009,7 @@ class RegExpText final : public RegExpTree {
public:
explicit RegExpText(Zone* zone) : elements_(2, zone), length_(0) {}
void* Accept(RegExpVisitor* visitor, void* data) override;
virtual RegExpNode* ToNode(RegExpCompiler* compiler,
RegExpNode* on_success) override;
RegExpNode* ToNode(RegExpCompiler* compiler, RegExpNode* on_success) override;
RegExpText* AsText() override;
bool IsText() override;
bool IsTextElement() override { return true; }
......@@ -3049,8 +3043,7 @@ class RegExpQuantifier final : public RegExpTree {
}
}
void* Accept(RegExpVisitor* visitor, void* data) override;
virtual RegExpNode* ToNode(RegExpCompiler* compiler,
RegExpNode* on_success) override;
RegExpNode* ToNode(RegExpCompiler* compiler, RegExpNode* on_success) override;
static RegExpNode* ToNode(int min,
int max,
bool is_greedy,
......@@ -3085,8 +3078,7 @@ class RegExpCapture final : public RegExpTree {
explicit RegExpCapture(RegExpTree* body, int index)
: body_(body), index_(index) { }
void* Accept(RegExpVisitor* visitor, void* data) override;
virtual RegExpNode* ToNode(RegExpCompiler* compiler,
RegExpNode* on_success) override;
RegExpNode* ToNode(RegExpCompiler* compiler, RegExpNode* on_success) override;
static RegExpNode* ToNode(RegExpTree* body,
int index,
RegExpCompiler* compiler,
......@@ -3121,8 +3113,7 @@ class RegExpLookahead final : public RegExpTree {
capture_from_(capture_from) { }
void* Accept(RegExpVisitor* visitor, void* data) override;
virtual RegExpNode* ToNode(RegExpCompiler* compiler,
RegExpNode* on_success) override;
RegExpNode* ToNode(RegExpCompiler* compiler, RegExpNode* on_success) override;
RegExpLookahead* AsLookahead() override;
Interval CaptureRegisters() override;
bool IsLookahead() override;
......@@ -3147,8 +3138,7 @@ class RegExpBackReference final : public RegExpTree {
explicit RegExpBackReference(RegExpCapture* capture)
: capture_(capture) { }
void* Accept(RegExpVisitor* visitor, void* data) override;
virtual RegExpNode* ToNode(RegExpCompiler* compiler,
RegExpNode* on_success) override;
RegExpNode* ToNode(RegExpCompiler* compiler, RegExpNode* on_success) override;
RegExpBackReference* AsBackReference() override;
bool IsBackReference() override;
int min_match() override { return 0; }
......@@ -3164,8 +3154,7 @@ class RegExpEmpty final : public RegExpTree {
public:
RegExpEmpty() { }
void* Accept(RegExpVisitor* visitor, void* data) override;
virtual RegExpNode* ToNode(RegExpCompiler* compiler,
RegExpNode* on_success) override;
RegExpNode* ToNode(RegExpCompiler* compiler, RegExpNode* on_success) override;
RegExpEmpty* AsEmpty() override;
bool IsEmpty() override;
int min_match() override { return 0; }
......
......@@ -542,7 +542,7 @@ class TurboFanCodeStub : public CodeStub {
// Retrieve the code for the stub. Generate the code if needed.
Handle<Code> GenerateCode() override;
virtual int GetStackParameterCount() const override {
int GetStackParameterCount() const override {
return GetCallInterfaceDescriptor().GetStackParameterCount();
}
......@@ -633,9 +633,9 @@ class StubRuntimeCallHelper : public RuntimeCallHelper {
public:
StubRuntimeCallHelper() {}
virtual void BeforeCall(MacroAssembler* masm) const;
void BeforeCall(MacroAssembler* masm) const override;
virtual void AfterCall(MacroAssembler* masm) const;
void AfterCall(MacroAssembler* masm) const override;
};
......@@ -644,9 +644,9 @@ class NopRuntimeCallHelper : public RuntimeCallHelper {
public:
NopRuntimeCallHelper() {}
virtual void BeforeCall(MacroAssembler* masm) const {}
void BeforeCall(MacroAssembler* masm) const override {}
virtual void AfterCall(MacroAssembler* masm) const {}
void AfterCall(MacroAssembler* masm) const override {}
};
......@@ -2429,7 +2429,7 @@ class VectorKeyedStoreICStub : public PlatformCodeStub {
Code::Kind GetCodeKind() const final { return Code::KEYED_STORE_IC; }
InlineCacheState GetICState() const final { return GENERIC; }
virtual ExtraICState GetExtraICState() const final {
ExtraICState GetExtraICState() const final {
return static_cast<ExtraICState>(minor_key_);
}
......
......@@ -277,7 +277,7 @@ class AstGraphBuilder::ControlScopeForBreakable : public ControlScope {
: ControlScope(owner), target_(target), control_(control) {}
protected:
virtual bool Execute(Command cmd, Statement* target, Node* value) override {
bool Execute(Command cmd, Statement* target, Node* value) override {
if (target != target_) return false; // We are not the command target.
switch (cmd) {
case CMD_BREAK:
......@@ -305,7 +305,7 @@ class AstGraphBuilder::ControlScopeForIteration : public ControlScope {
: ControlScope(owner), target_(target), control_(control) {}
protected:
virtual bool Execute(Command cmd, Statement* target, Node* value) override {
bool Execute(Command cmd, Statement* target, Node* value) override {
if (target != target_) return false; // We are not the command target.
switch (cmd) {
case CMD_BREAK:
......@@ -341,7 +341,7 @@ class AstGraphBuilder::ControlScopeForCatch : public ControlScope {
}
protected:
virtual bool Execute(Command cmd, Statement* target, Node* value) override {
bool Execute(Command cmd, Statement* target, Node* value) override {
switch (cmd) {
case CMD_THROW:
control_->Throw(value);
......@@ -372,7 +372,7 @@ class AstGraphBuilder::ControlScopeForFinally : public ControlScope {
}
protected:
virtual bool Execute(Command cmd, Statement* target, Node* value) override {
bool Execute(Command cmd, Statement* target, Node* value) override {
Node* token = commands_->RecordCommand(cmd, target, value);
control_->LeaveTry(token, value);
return true;
......
This diff is collapsed.
......@@ -788,15 +788,13 @@ class EffectContext final : public AstContext {
explicit EffectContext(HOptimizedGraphBuilder* owner)
: AstContext(owner, Expression::kEffect) {
}
virtual ~EffectContext();
~EffectContext() override;
void ReturnValue(HValue* value) override;
virtual void ReturnInstruction(HInstruction* instr,
BailoutId ast_id) override;
virtual void ReturnControl(HControlInstruction* instr,
BailoutId ast_id) override;
virtual void ReturnContinuation(HIfContinuation* continuation,
BailoutId ast_id) override;
void ReturnInstruction(HInstruction* instr, BailoutId ast_id) override;
void ReturnControl(HControlInstruction* instr, BailoutId ast_id) override;
void ReturnContinuation(HIfContinuation* continuation,
BailoutId ast_id) override;
};
......@@ -805,15 +803,13 @@ class ValueContext final : public AstContext {
ValueContext(HOptimizedGraphBuilder* owner, ArgumentsAllowedFlag flag)
: AstContext(owner, Expression::kValue), flag_(flag) {
}
virtual ~ValueContext();
~ValueContext() override;
void ReturnValue(HValue* value) override;
virtual void ReturnInstruction(HInstruction* instr,
BailoutId ast_id) override;
virtual void ReturnControl(HControlInstruction* instr,
BailoutId ast_id) override;
virtual void ReturnContinuation(HIfContinuation* continuation,
BailoutId ast_id) override;
void ReturnInstruction(HInstruction* instr, BailoutId ast_id) override;
void ReturnControl(HControlInstruction* instr, BailoutId ast_id) override;
void ReturnContinuation(HIfContinuation* continuation,
BailoutId ast_id) override;
bool arguments_allowed() { return flag_ == ARGUMENTS_ALLOWED; }
......@@ -835,12 +831,10 @@ class TestContext final : public AstContext {
}
void ReturnValue(HValue* value) override;
virtual void ReturnInstruction(HInstruction* instr,
BailoutId ast_id) override;
virtual void ReturnControl(HControlInstruction* instr,
BailoutId ast_id) override;
virtual void ReturnContinuation(HIfContinuation* continuation,
BailoutId ast_id) override;
void ReturnInstruction(HInstruction* instr, BailoutId ast_id) override;
void ReturnControl(HControlInstruction* instr, BailoutId ast_id) override;
void ReturnContinuation(HIfContinuation* continuation,
BailoutId ast_id) override;
static TestContext* cast(AstContext* context) {
DCHECK(context->IsTest());
......@@ -2392,7 +2386,7 @@ class HOptimizedGraphBuilder : public HGraphBuilder, public AstVisitor {
void SetUpScope(Scope* scope);
void VisitStatements(ZoneList<Statement*>* statements) override;
#define DECLARE_VISIT(type) virtual void Visit##type(type* node) override;
#define DECLARE_VISIT(type) void Visit##type(type* node) override;
AST_NODE_LIST(DECLARE_VISIT)
#undef DECLARE_VISIT
......
......@@ -72,7 +72,7 @@ class AstTyper: public AstVisitor {
void VisitDeclarations(ZoneList<Declaration*>* declarations) override;
void VisitStatements(ZoneList<Statement*>* statements) override;
#define DECLARE_VISIT(type) virtual void Visit##type(type* node) override;
#define DECLARE_VISIT(type) void Visit##type(type* node) override;
AST_NODE_LIST(DECLARE_VISIT)
#undef DECLARE_VISIT
......
This diff is collapsed.
This diff is collapsed.
......@@ -2932,11 +2932,10 @@ void PagedSpace::ReportStatistics() {
// -----------------------------------------------------------------------------
// MapSpace implementation
// TODO(mvstanton): this is weird...the compiler can't make a vtable unless
// there is at least one non-inlined virtual function. I would prefer to hide
// the VerifyObject definition behind VERIFY_HEAP.
#ifdef VERIFY_HEAP
void MapSpace::VerifyObject(HeapObject* object) { CHECK(object->IsMap()); }
#endif
// -----------------------------------------------------------------------------
......
......@@ -1422,7 +1422,7 @@ class HeapObjectIterator : public ObjectIterator {
// skipping the special garbage section of which there is one per space.
// Returns NULL when the iteration has ended.
inline HeapObject* Next();
virtual inline HeapObject* next_object();
inline HeapObject* next_object() override;
private:
enum PageMode { kOnePageOnly, kAllPagesInSpace };
......@@ -1877,7 +1877,7 @@ class PagedSpace : public Space {
// Creates a space with an id.
PagedSpace(Heap* heap, AllocationSpace id, Executability executable);
virtual ~PagedSpace() { TearDown(); }
~PagedSpace() override { TearDown(); }
// Set up the space using the given address range of virtual memory (from
// the memory allocator's initial chunk) if possible. If the block of
......@@ -2470,7 +2470,7 @@ class SemiSpaceIterator : public ObjectIterator {
inline HeapObject* Next();
// Implementation of the ObjectIterator functions.
virtual inline HeapObject* next_object();
inline HeapObject* next_object() override;
private:
void Initialize(Address start, Address end);
......@@ -2839,15 +2839,15 @@ class CompactionSpace : public PagedSpace {
Free(start, size_in_bytes);
}
virtual bool is_local() override { return true; }
bool is_local() override { return true; }
virtual void RefillFreeList() override;
void RefillFreeList() override;
protected:
// The space is temporary and not included in any snapshots.
virtual bool snapshotable() override { return false; }
bool snapshotable() override { return false; }
MUST_USE_RESULT virtual HeapObject* SweepAndRetryAllocation(
MUST_USE_RESULT HeapObject* SweepAndRetryAllocation(
int size_in_bytes) override;
};
......@@ -2926,7 +2926,7 @@ class MapSpace : public PagedSpace {
// TODO(1600): this limit is artifical just to keep code compilable
static const int kMaxMapPageIndex = 1 << 16;
virtual int RoundSizeDownToObjectAlignment(int size) {
int RoundSizeDownToObjectAlignment(int size) override {
if (base::bits::IsPowerOfTwo32(Map::kSize)) {
return RoundDown(size, Map::kSize);
} else {
......@@ -2934,8 +2934,9 @@ class MapSpace : public PagedSpace {
}
}
protected:
virtual void VerifyObject(HeapObject* obj);
#ifdef VERIFY_HEAP
void VerifyObject(HeapObject* obj) override;
#endif
private:
static const int kMapsPerPage = Page::kAllocatableMemory / Map::kSize;
......
......@@ -360,9 +360,8 @@ class LoadIC : public IC {
// lookup result.
void UpdateCaches(LookupIterator* lookup);
virtual Handle<Code> CompileHandler(LookupIterator* lookup,
Handle<Object> unused,
CacheHolderFlag cache_holder) override;
Handle<Code> CompileHandler(LookupIterator* lookup, Handle<Object> unused,
CacheHolderFlag cache_holder) override;
private:
Handle<Code> SimpleFieldLoad(FieldIndex index);
......@@ -496,9 +495,8 @@ class StoreIC : public IC {
// lookup result.
void UpdateCaches(LookupIterator* lookup, Handle<Object> value,
JSReceiver::StoreFromKeyed store_mode);
virtual Handle<Code> CompileHandler(LookupIterator* lookup,
Handle<Object> value,
CacheHolderFlag cache_holder) override;
Handle<Code> CompileHandler(LookupIterator* lookup, Handle<Object> value,
CacheHolderFlag cache_holder) override;
private:
inline void set_target(Code* code);
......
......@@ -224,12 +224,12 @@ class CallInterfaceDescriptor {
static inline CallDescriptors::Key key();
#define DECLARE_DESCRIPTOR_WITH_CUSTOM_FUNCTION_TYPE(name, base) \
DECLARE_DESCRIPTOR(name, base) \
protected: \
virtual Type::FunctionType* BuildCallInterfaceDescriptorFunctionType( \
Isolate* isolate, int register_param_count) override; \
\
#define DECLARE_DESCRIPTOR_WITH_CUSTOM_FUNCTION_TYPE(name, base) \
DECLARE_DESCRIPTOR(name, base) \
protected: \
Type::FunctionType* BuildCallInterfaceDescriptorFunctionType( \
Isolate* isolate, int register_param_count) override; \
\
public:
// LoadDescriptor is used by all stubs that implement Load/KeyedLoad ICs.
class LoadDescriptor : public CallInterfaceDescriptor {
......
......@@ -34,15 +34,13 @@ class DefaultPlatform : public Platform {
bool PumpMessageLoop(v8::Isolate* isolate);
// v8::Platform implementation.
virtual void CallOnBackgroundThread(
Task* task, ExpectedRuntime expected_runtime) override;
virtual void CallOnForegroundThread(v8::Isolate* isolate,
Task* task) override;
virtual void CallDelayedOnForegroundThread(Isolate* isolate, Task* task,
double delay_in_seconds) override;
virtual void CallIdleOnForegroundThread(Isolate* isolate,
IdleTask* task) override;
virtual bool IdleTasksEnabled(Isolate* isolate) override;
void CallOnBackgroundThread(Task* task,
ExpectedRuntime expected_runtime) override;
void CallOnForegroundThread(v8::Isolate* isolate, Task* task) override;
void CallDelayedOnForegroundThread(Isolate* isolate, Task* task,
double delay_in_seconds) override;
void CallIdleOnForegroundThread(Isolate* isolate, IdleTask* task) override;
bool IdleTasksEnabled(Isolate* isolate) override;
double MonotonicallyIncreasingTime() override;
private:
......
......@@ -1033,7 +1033,7 @@ class Parser : public ParserBase<ParserTraits> {
// Visiting functions for AST nodes make this an AstVisitor.
AST_NODE_LIST(DECLARE_VISIT)
#undef DECLARE_VISIT
virtual void Visit(AstNode* node) override;
void Visit(AstNode* node) override;
void RecurseIntoSubpattern(AstNode* pattern, Expression* value) {
Expression* old_value = current_value_;
......
......@@ -36,7 +36,7 @@ class Processor: public AstVisitor {
InitializeAstVisitor(parser->stack_limit());
}
virtual ~Processor() { }
~Processor() override {}
void Process(ZoneList<Statement*>* statements);
bool result_assigned() const { return result_assigned_; }
......@@ -80,7 +80,7 @@ class Processor: public AstVisitor {
AstNodeFactory factory_;
// Node visitors.
#define DEF_VISIT(type) virtual void Visit##type(type* node) override;
#define DEF_VISIT(type) void Visit##type(type* node) override;
AST_NODE_LIST(DEF_VISIT)
#undef DEF_VISIT
......
......@@ -21,16 +21,16 @@ class ExternalTwoByteString;
class BufferedUtf16CharacterStream: public Utf16CharacterStream {
public:
BufferedUtf16CharacterStream();
virtual ~BufferedUtf16CharacterStream();
~BufferedUtf16CharacterStream() override;
virtual void PushBack(uc32 character);
void PushBack(uc32 character) override;
protected:
static const size_t kBufferSize = 512;
static const size_t kPushBackStepSize = 16;
virtual size_t SlowSeekForward(size_t delta);
virtual bool ReadBlock();
size_t SlowSeekForward(size_t delta) override;
bool ReadBlock() override;
virtual void SlowPushBack(uc16 character);
virtual size_t BufferSeekForward(size_t delta) = 0;
......@@ -46,16 +46,16 @@ class GenericStringUtf16CharacterStream: public BufferedUtf16CharacterStream {
public:
GenericStringUtf16CharacterStream(Handle<String> data, size_t start_position,
size_t end_position);
virtual ~GenericStringUtf16CharacterStream();
~GenericStringUtf16CharacterStream() override;
virtual bool SetBookmark();
virtual void ResetToBookmark();
bool SetBookmark() override;
void ResetToBookmark() override;
protected:
static const size_t kNoBookmark = -1;
virtual size_t BufferSeekForward(size_t delta);
virtual size_t FillBuffer(size_t position);
size_t BufferSeekForward(size_t delta) override;
size_t FillBuffer(size_t position) override;
Handle<String> string_;
size_t length_;
......@@ -67,14 +67,14 @@ class GenericStringUtf16CharacterStream: public BufferedUtf16CharacterStream {
class Utf8ToUtf16CharacterStream: public BufferedUtf16CharacterStream {
public:
Utf8ToUtf16CharacterStream(const byte* data, size_t length);
virtual ~Utf8ToUtf16CharacterStream();
~Utf8ToUtf16CharacterStream() override;
static size_t CopyChars(uint16_t* dest, size_t length, const byte* src,
size_t* src_pos, size_t src_length);
protected:
virtual size_t BufferSeekForward(size_t delta);
virtual size_t FillBuffer(size_t char_position);
size_t BufferSeekForward(size_t delta) override;
size_t FillBuffer(size_t char_position) override;
void SetRawPosition(size_t char_position);
const byte* raw_data_;
......@@ -103,7 +103,7 @@ class ExternalStreamingStream : public BufferedUtf16CharacterStream {
bookmark_data_offset_(0),
bookmark_utf8_split_char_buffer_length_(0) {}
virtual ~ExternalStreamingStream() {
~ExternalStreamingStream() override {
delete[] current_data_;
bookmark_buffer_.Dispose();
bookmark_data_.Dispose();
......@@ -120,8 +120,8 @@ class ExternalStreamingStream : public BufferedUtf16CharacterStream {
size_t FillBuffer(size_t position) override;
virtual bool SetBookmark() override;
virtual void ResetToBookmark() override;
bool SetBookmark() override;
void ResetToBookmark() override;
private:
void HandleUtf8SplitCharacters(size_t* data_in_buffer);
......@@ -154,23 +154,23 @@ class ExternalTwoByteStringUtf16CharacterStream: public Utf16CharacterStream {
ExternalTwoByteStringUtf16CharacterStream(Handle<ExternalTwoByteString> data,
int start_position,
int end_position);
virtual ~ExternalTwoByteStringUtf16CharacterStream();
~ExternalTwoByteStringUtf16CharacterStream() override;
virtual void PushBack(uc32 character) {
void PushBack(uc32 character) override {
DCHECK(buffer_cursor_ > raw_data_);
buffer_cursor_--;
pos_--;
}
virtual bool SetBookmark();
virtual void ResetToBookmark();
bool SetBookmark() override;
void ResetToBookmark() override;
protected:
virtual size_t SlowSeekForward(size_t delta) {
size_t SlowSeekForward(size_t delta) override {
// Fast case always handles seeking.
return 0;
}
virtual bool ReadBlock() {
bool ReadBlock() override {
// Entire string is read at start.
return false;
}
......
......@@ -361,18 +361,17 @@ class CodeAddressMap: public CodeEventLogger {
isolate->logger()->addCodeEventListener(this);
}
virtual ~CodeAddressMap() {
~CodeAddressMap() override {
isolate_->logger()->removeCodeEventListener(this);
}
virtual void CodeMoveEvent(Address from, Address to) {
void CodeMoveEvent(Address from, Address to) override {
address_to_name_map_.Move(from, to);
}
virtual void CodeDisableOptEvent(Code* code, SharedFunctionInfo* shared) {
}
void CodeDisableOptEvent(Code* code, SharedFunctionInfo* shared) override {}
virtual void CodeDeleteEvent(Address from) {
void CodeDeleteEvent(Address from) override {
address_to_name_map_.Remove(from);
}
......@@ -452,10 +451,8 @@ class CodeAddressMap: public CodeEventLogger {
DISALLOW_COPY_AND_ASSIGN(NameMap);
};
virtual void LogRecordedBuffer(Code* code,
SharedFunctionInfo*,
const char* name,
int length) {
void LogRecordedBuffer(Code* code, SharedFunctionInfo*, const char* name,
int length) override {
address_to_name_map_.Insert(code->address(), name, length);
}
......@@ -677,7 +674,7 @@ class StringTableInsertionKey : public HashTableKey {
return String::cast(key)->Hash();
}
MUST_USE_RESULT virtual Handle<Object> AsHandle(Isolate* isolate) override {
MUST_USE_RESULT Handle<Object> AsHandle(Isolate* isolate) override {
return handle(string_, isolate);
}
......
......@@ -367,7 +367,7 @@ class Deserializer: public SerializerDeserializer {
DecodeReservation(data->Reservations());
}
virtual ~Deserializer();
~Deserializer() override;
// Deserialize the snapshot into an empty heap.
void Deserialize(Isolate* isolate);
......@@ -387,11 +387,9 @@ class Deserializer: public SerializerDeserializer {
}
private:
virtual void VisitPointers(Object** start, Object** end);
void VisitPointers(Object** start, Object** end) override;
virtual void VisitRuntimeEntry(RelocInfo* rinfo) {
UNREACHABLE();
}
void VisitRuntimeEntry(RelocInfo* rinfo) override { UNREACHABLE(); }
void Initialize(Isolate* isolate);
......@@ -470,7 +468,7 @@ class CodeAddressMap;
class Serializer : public SerializerDeserializer {
public:
Serializer(Isolate* isolate, SnapshotByteSink* sink);
~Serializer();
~Serializer() override;
void VisitPointers(Object** start, Object** end) override;
void EncodeReservations(List<SerializedData::Reservation>* out) const;
......@@ -617,12 +615,12 @@ class PartialSerializer : public Serializer {
InitializeCodeAddressMap();
}
~PartialSerializer() { OutputStatistics("PartialSerializer"); }
~PartialSerializer() override { OutputStatistics("PartialSerializer"); }
// Serialize the objects reachable from a single object pointer.
void Serialize(Object** o);
virtual void SerializeObject(HeapObject* o, HowToCode how_to_code,
WhereToPoint where_to_point, int skip) override;
void SerializeObject(HeapObject* o, HowToCode how_to_code,
WhereToPoint where_to_point, int skip) override;
private:
int PartialSnapshotCacheIndex(HeapObject* o);
......@@ -641,7 +639,7 @@ class PartialSerializer : public Serializer {
class StartupSerializer : public Serializer {
public:
StartupSerializer(Isolate* isolate, SnapshotByteSink* sink);
~StartupSerializer() { OutputStatistics("StartupSerializer"); }
~StartupSerializer() override { OutputStatistics("StartupSerializer"); }
// The StartupSerializer has to serialize the root array, which is slightly
// different.
......@@ -652,8 +650,8 @@ class StartupSerializer : public Serializer {
// 2) Partial snapshot cache.
// 3) Weak references (e.g. the string table).
virtual void SerializeStrongReferences();
virtual void SerializeObject(HeapObject* o, HowToCode how_to_code,
WhereToPoint where_to_point, int skip) override;
void SerializeObject(HeapObject* o, HowToCode how_to_code,
WhereToPoint where_to_point, int skip) override;
void SerializeWeakReferencesAndDeferred();
void Serialize() {
SerializeStrongReferences();
......@@ -693,10 +691,10 @@ class CodeSerializer : public Serializer {
back_reference_map_.AddSourceString(source);
}
~CodeSerializer() { OutputStatistics("CodeSerializer"); }
~CodeSerializer() override { OutputStatistics("CodeSerializer"); }
virtual void SerializeObject(HeapObject* o, HowToCode how_to_code,
WhereToPoint where_to_point, int skip) override;
void SerializeObject(HeapObject* o, HowToCode how_to_code,
WhereToPoint where_to_point, int skip) override;
void SerializeBuiltin(int builtin_index, HowToCode how_to_code,
WhereToPoint where_to_point);
......
......@@ -90,7 +90,7 @@ class AsmTyper : public AstVisitor {
Zone* zone() const { return zone_; }
#define DECLARE_VISIT(type) virtual void Visit##type(type* node) override;
#define DECLARE_VISIT(type) void Visit##type(type* node) override;
AST_NODE_LIST(DECLARE_VISIT)
#undef DECLARE_VISIT
......
......@@ -136,15 +136,15 @@ class MoveInterpreter : public GapResolver::Assembler {
public:
explicit MoveInterpreter(Zone* zone) : zone_(zone) {}
virtual void AssembleMove(InstructionOperand* source,
InstructionOperand* destination) override {
void AssembleMove(InstructionOperand* source,
InstructionOperand* destination) override {
ParallelMove* moves = new (zone_) ParallelMove(zone_);
moves->AddMove(*source, *destination);
state_.ExecuteInParallel(moves);
}
virtual void AssembleSwap(InstructionOperand* source,
InstructionOperand* destination) override {
void AssembleSwap(InstructionOperand* source,
InstructionOperand* destination) override {
ParallelMove* moves = new (zone_) ParallelMove(zone_);
moves->AddMove(*source, *destination);
moves->AddMove(*destination, *source);
......
......@@ -35,9 +35,8 @@ class ThreadWithMutexAndConditionVariable final : public Thread {
: Thread(Options("ThreadWithMutexAndConditionVariable")),
running_(false),
finished_(false) {}
virtual ~ThreadWithMutexAndConditionVariable() {}
virtual void Run() override {
void Run() override {
LockGuard<Mutex> lock_guard(&mutex_);
running_ = true;
cv_.NotifyOne();
......@@ -116,9 +115,8 @@ class ThreadWithSharedMutexAndConditionVariable final : public Thread {
finished_(false),
cv_(NULL),
mutex_(NULL) {}
virtual ~ThreadWithSharedMutexAndConditionVariable() {}
virtual void Run() override {
void Run() override {
LockGuard<Mutex> lock_guard(mutex_);
running_ = true;
cv_->NotifyAll();
......@@ -233,7 +231,7 @@ class LoopIncrementThread final : public Thread {
EXPECT_EQ(0, limit % thread_count);
}
virtual void Run() override {
void Run() override {
int last_count = -1;
while (true) {
LockGuard<Mutex> lock_guard(mutex_);
......
......@@ -27,9 +27,8 @@ class ProducerThread final : public Thread {
buffer_(buffer),
free_space_(free_space),
used_space_(used_space) {}
virtual ~ProducerThread() {}
virtual void Run() override {
void Run() override {
for (size_t n = 0; n < kDataSize; ++n) {
free_space_->Wait();
buffer_[n % kBufferSize] = kAlphabet[n % kAlphabetSize];
......@@ -52,9 +51,8 @@ class ConsumerThread final : public Thread {
buffer_(buffer),
free_space_(free_space),
used_space_(used_space) {}
virtual ~ConsumerThread() {}
virtual void Run() override {
void Run() override {
for (size_t n = 0; n < kDataSize; ++n) {
used_space_->Wait();
EXPECT_EQ(kAlphabet[n % kAlphabetSize], buffer_[n % kBufferSize]);
......@@ -73,9 +71,8 @@ class WaitAndSignalThread final : public Thread {
public:
explicit WaitAndSignalThread(Semaphore* semaphore)
: Thread(Options("WaitAndSignalThread")), semaphore_(semaphore) {}
virtual ~WaitAndSignalThread() {}
virtual void Run() override {
void Run() override {
for (int n = 0; n < 100; ++n) {
semaphore_->Wait();
ASSERT_FALSE(semaphore_->WaitFor(TimeDelta::FromMicroseconds(1)));
......
......@@ -26,7 +26,7 @@ class TaskQueueThread final : public base::Thread {
explicit TaskQueueThread(TaskQueue* queue)
: Thread(Options("libplatform TaskQueueThread")), queue_(queue) {}
virtual void Run() override { EXPECT_THAT(queue_->GetNext(), IsNull()); }
void Run() override { EXPECT_THAT(queue_->GetNext(), IsNull()); }
private:
TaskQueue* queue_;
......
......@@ -12,9 +12,8 @@ namespace {
class DefaultPlatformEnvironment final : public ::testing::Environment {
public:
DefaultPlatformEnvironment() : platform_(NULL) {}
~DefaultPlatformEnvironment() {}
virtual void SetUp() override {
void SetUp() override {
EXPECT_EQ(NULL, platform_);
platform_ = v8::platform::CreateDefaultPlatform();
ASSERT_TRUE(platform_ != NULL);
......@@ -22,7 +21,7 @@ class DefaultPlatformEnvironment final : public ::testing::Environment {
ASSERT_TRUE(v8::V8::Initialize());
}
virtual void TearDown() override {
void TearDown() override {
ASSERT_TRUE(platform_ != NULL);
v8::V8::Dispose();
v8::V8::ShutdownPlatform();
......
......@@ -57,7 +57,6 @@ LINT_RULES = """
-build/include_what_you_use
-build/namespaces
-readability/check
-readability/inheritance
-readability/nolint
+readability/streams
-runtime/references
......
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