Chromium Code Reviews| Index: src/objects.h |
| diff --git a/src/objects.h b/src/objects.h |
| index 8b1cb2c8a3b2139eec7dbab54fc5d8b55da2b30e..75100bd51f9470063b831c99b7937fea1a9fadf3 100644 |
| --- a/src/objects.h |
| +++ b/src/objects.h |
| @@ -3590,6 +3590,25 @@ class ExternalTwoByteString: public ExternalString { |
| }; |
| +class FlatStringReader { |
| +public: |
| + explicit FlatStringReader(Handle<String> str); |
|
Erik Corry
2008/11/19 09:45:38
FlatStringReaders can only be stack allocated, rig
|
| + explicit FlatStringReader(Vector<const char> input); |
| + ~FlatStringReader(); |
| + void RefreshState(); |
| + inline uc32 Get(int index); |
| + int length() { return length_; } |
| + static void PostGarbageCollectionProcessing(); |
| +private: |
| + String** str_; |
| + bool is_ascii_; |
| + int length_; |
| + const void* start_; |
| + FlatStringReader* prev_; |
| + static FlatStringReader* top_; |
| +}; |
| + |
| + |
| // Note that StringInputBuffers are not valid across a GC! To fix this |
| // it would have to store a String Handle instead of a String* and |
| // AsciiStringReadBlock would have to be modified to use memcpy. |