Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(236)

Side by Side Diff: src/scanner-character-streams.h

Issue 216523004: Cleanup scanner character streams. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | src/scanner-character-streams.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 GenericStringUtf16CharacterStream(Handle<String> data, 65 GenericStringUtf16CharacterStream(Handle<String> data,
66 unsigned start_position, 66 unsigned start_position,
67 unsigned end_position); 67 unsigned end_position);
68 virtual ~GenericStringUtf16CharacterStream(); 68 virtual ~GenericStringUtf16CharacterStream();
69 69
70 protected: 70 protected:
71 virtual unsigned BufferSeekForward(unsigned delta); 71 virtual unsigned BufferSeekForward(unsigned delta);
72 virtual unsigned FillBuffer(unsigned position, unsigned length); 72 virtual unsigned FillBuffer(unsigned position, unsigned length);
73 73
74 Handle<String> string_; 74 Handle<String> string_;
75 unsigned start_position_;
76 unsigned length_; 75 unsigned length_;
77 }; 76 };
78 77
79 78
80 // Utf16 stream based on a literal UTF-8 string. 79 // Utf16 stream based on a literal UTF-8 string.
81 class Utf8ToUtf16CharacterStream: public BufferedUtf16CharacterStream { 80 class Utf8ToUtf16CharacterStream: public BufferedUtf16CharacterStream {
82 public: 81 public:
83 Utf8ToUtf16CharacterStream(const byte* data, unsigned length); 82 Utf8ToUtf16CharacterStream(const byte* data, unsigned length);
84 virtual ~Utf8ToUtf16CharacterStream(); 83 virtual ~Utf8ToUtf16CharacterStream();
85 84
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 // Entire string is read at start. 119 // Entire string is read at start.
121 return false; 120 return false;
122 } 121 }
123 Handle<ExternalTwoByteString> source_; 122 Handle<ExternalTwoByteString> source_;
124 const uc16* raw_data_; // Pointer to the actual array of characters. 123 const uc16* raw_data_; // Pointer to the actual array of characters.
125 }; 124 };
126 125
127 } } // namespace v8::internal 126 } } // namespace v8::internal
128 127
129 #endif // V8_SCANNER_CHARACTER_STREAMS_H_ 128 #endif // V8_SCANNER_CHARACTER_STREAMS_H_
OLDNEW
« no previous file with comments | « no previous file | src/scanner-character-streams.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698