| Index: src/scanner-character-streams.h
|
| diff --git a/src/scanner-character-streams.h b/src/scanner-character-streams.h
|
| index 0d02f0201965923a7c19b1ff7d8bb8eefefa7d10..3b30fd438fbc9aba7fd2f941afac963cddb74e53 100644
|
| --- a/src/scanner-character-streams.h
|
| +++ b/src/scanner-character-streams.h
|
| @@ -73,10 +73,11 @@ class Utf8ToUtf16CharacterStream: public BufferedUtf16CharacterStream {
|
| };
|
|
|
|
|
| -// UTF16 buffer to read characters from an external string.
|
| +// UTF16 buffer to read characters from an external two byte (UTF-16)
|
| +// string. The caller is responsible for keeping the memory alive.
|
| class ExternalTwoByteStringUtf16CharacterStream: public Utf16CharacterStream {
|
| public:
|
| - ExternalTwoByteStringUtf16CharacterStream(Handle<ExternalTwoByteString> data,
|
| + ExternalTwoByteStringUtf16CharacterStream(const uint16_t* raw_data,
|
| int start_position,
|
| int end_position);
|
| virtual ~ExternalTwoByteStringUtf16CharacterStream();
|
| @@ -96,10 +97,29 @@ class ExternalTwoByteStringUtf16CharacterStream: public Utf16CharacterStream {
|
| // Entire string is read at start.
|
| return false;
|
| }
|
| - Handle<ExternalTwoByteString> source_;
|
| const uc16* raw_data_; // Pointer to the actual array of characters.
|
| };
|
|
|
| +
|
| +// UTF16 buffer to read characters from an external one byte (latin1)
|
| +// string. Note that "ascii" in ExternalAsciiString is actually latin1. The
|
| +// caller is responsible for keeping the memory alive.
|
| +class ExternalOneByteStringUtf16CharacterStream
|
| + : public BufferedUtf16CharacterStream {
|
| + public:
|
| + ExternalOneByteStringUtf16CharacterStream(const uint8_t* raw_data,
|
| + int start_position,
|
| + int end_position);
|
| + virtual ~ExternalOneByteStringUtf16CharacterStream();
|
| +
|
| + protected:
|
| + virtual unsigned BufferSeekForward(unsigned delta);
|
| + virtual unsigned FillBuffer(unsigned position, unsigned length);
|
| +
|
| + const uint8_t* raw_data_; // Pointer to the actual array of characters.
|
| + unsigned length_;
|
| +};
|
| +
|
| } } // namespace v8::internal
|
|
|
| #endif // V8_SCANNER_CHARACTER_STREAMS_H_
|
|
|