| Index: src/scanner-character-streams.h
|
| diff --git a/src/scanner-character-streams.h b/src/scanner-character-streams.h
|
| index b15da52437be4a3260819ef3460f30bc34763a06..8a0ae2392680533dff904d1aa6b869a253907617 100644
|
| --- a/src/scanner-character-streams.h
|
| +++ b/src/scanner-character-streams.h
|
| @@ -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;
|
| }
|
|
|