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

Side by Side Diff: src/objects.h

Issue 11688003: Revert r13275 and 13276 (Remove most uses of StringInputBuffer). (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 12 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 | « src/isolate.cc ('k') | src/objects.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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 7182 matching lines...) Expand 10 before | Expand all | Expand 10 after
7193 // do any heap allocations. This is useful when printing stack traces. 7193 // do any heap allocations. This is useful when printing stack traces.
7194 SmartArrayPointer<uc16> ToWideCString( 7194 SmartArrayPointer<uc16> ToWideCString(
7195 RobustnessFlag robustness_flag = FAST_STRING_TRAVERSAL); 7195 RobustnessFlag robustness_flag = FAST_STRING_TRAVERSAL);
7196 7196
7197 // Tells whether the hash code has been computed. 7197 // Tells whether the hash code has been computed.
7198 inline bool HasHashCode(); 7198 inline bool HasHashCode();
7199 7199
7200 // Returns a hash value used for the property table 7200 // Returns a hash value used for the property table
7201 inline uint32_t Hash(); 7201 inline uint32_t Hash();
7202 7202
7203 bool ComputeArrayIndex(uint32_t* index); 7203 static bool ComputeArrayIndex(unibrow::CharacterStream* buffer,
7204 uint32_t* index,
7205 int length);
7204 7206
7205 // Externalization. 7207 // Externalization.
7206 bool MakeExternal(v8::String::ExternalStringResource* resource); 7208 bool MakeExternal(v8::String::ExternalStringResource* resource);
7207 bool MakeExternal(v8::String::ExternalAsciiStringResource* resource); 7209 bool MakeExternal(v8::String::ExternalAsciiStringResource* resource);
7208 7210
7209 // Conversion. 7211 // Conversion.
7210 inline bool AsArrayIndex(uint32_t* index); 7212 inline bool AsArrayIndex(uint32_t* index);
7211 7213
7212 // Casting. 7214 // Casting.
7213 static inline String* cast(Object* obj); 7215 static inline String* cast(Object* obj);
(...skipping 675 matching lines...) Expand 10 before | Expand all | Expand 10 after
7889 unsigned consumed_; 7891 unsigned consumed_;
7890 ConsString* root_; 7892 ConsString* root_;
7891 DISALLOW_COPY_AND_ASSIGN(ConsStringIteratorOp); 7893 DISALLOW_COPY_AND_ASSIGN(ConsStringIteratorOp);
7892 }; 7894 };
7893 7895
7894 7896
7895 // Note: this class is not GC-safe. 7897 // Note: this class is not GC-safe.
7896 class StringCharacterStream { 7898 class StringCharacterStream {
7897 public: 7899 public:
7898 inline StringCharacterStream(String* string, 7900 inline StringCharacterStream(String* string,
7899 ConsStringIteratorOp* op, 7901 unsigned offset,
7900 unsigned offset = 0); 7902 ConsStringIteratorOp* op);
7901 inline uint16_t GetNext(); 7903 inline uint16_t GetNext();
7902 inline bool HasMore(); 7904 inline bool HasMore();
7903 inline void Reset(String* string, unsigned offset = 0); 7905 inline void Reset(String* string, unsigned offset, ConsStringIteratorOp* op);
7904 inline void VisitOneByteString(const uint8_t* chars, unsigned length); 7906 inline void VisitOneByteString(const uint8_t* chars, unsigned length);
7905 inline void VisitTwoByteString(const uint16_t* chars, unsigned length); 7907 inline void VisitTwoByteString(const uint16_t* chars, unsigned length);
7906 7908
7907 private: 7909 private:
7908 bool is_one_byte_; 7910 bool is_one_byte_;
7909 union { 7911 union {
7910 const uint8_t* buffer8_; 7912 const uint8_t* buffer8_;
7911 const uint16_t* buffer16_; 7913 const uint16_t* buffer16_;
7912 }; 7914 };
7913 const uint8_t* end_; 7915 const uint8_t* end_;
(...skipping 971 matching lines...) Expand 10 before | Expand all | Expand 10 after
8885 } else { 8887 } else {
8886 value &= ~(1 << bit_position); 8888 value &= ~(1 << bit_position);
8887 } 8889 }
8888 return value; 8890 return value;
8889 } 8891 }
8890 }; 8892 };
8891 8893
8892 } } // namespace v8::internal 8894 } } // namespace v8::internal
8893 8895
8894 #endif // V8_OBJECTS_H_ 8896 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/isolate.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698