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

Side by Side Diff: src/objects.h

Issue 11638037: Remove most uses of StringInputBuffer (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: last patch set had upload error Created 8 years 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') | src/objects.cc » ('J')
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 7179 matching lines...) Expand 10 before | Expand all | Expand 10 after
7190 // do any heap allocations. This is useful when printing stack traces. 7190 // do any heap allocations. This is useful when printing stack traces.
7191 SmartArrayPointer<uc16> ToWideCString( 7191 SmartArrayPointer<uc16> ToWideCString(
7192 RobustnessFlag robustness_flag = FAST_STRING_TRAVERSAL); 7192 RobustnessFlag robustness_flag = FAST_STRING_TRAVERSAL);
7193 7193
7194 // Tells whether the hash code has been computed. 7194 // Tells whether the hash code has been computed.
7195 inline bool HasHashCode(); 7195 inline bool HasHashCode();
7196 7196
7197 // Returns a hash value used for the property table 7197 // Returns a hash value used for the property table
7198 inline uint32_t Hash(); 7198 inline uint32_t Hash();
7199 7199
7200 static bool ComputeArrayIndex(unibrow::CharacterStream* buffer, 7200 bool ComputeArrayIndex(uint32_t* index);
7201 uint32_t* index,
7202 int length);
7203 7201
7204 // Externalization. 7202 // Externalization.
7205 bool MakeExternal(v8::String::ExternalStringResource* resource); 7203 bool MakeExternal(v8::String::ExternalStringResource* resource);
7206 bool MakeExternal(v8::String::ExternalAsciiStringResource* resource); 7204 bool MakeExternal(v8::String::ExternalAsciiStringResource* resource);
7207 7205
7208 // Conversion. 7206 // Conversion.
7209 inline bool AsArrayIndex(uint32_t* index); 7207 inline bool AsArrayIndex(uint32_t* index);
7210 7208
7211 // Casting. 7209 // Casting.
7212 static inline String* cast(Object* obj); 7210 static inline String* cast(Object* obj);
(...skipping 674 matching lines...) Expand 10 before | Expand all | Expand 10 after
7887 ConsString* frames_[kStackSize]; 7885 ConsString* frames_[kStackSize];
7888 unsigned consumed_; 7886 unsigned consumed_;
7889 ConsString* root_; 7887 ConsString* root_;
7890 DISALLOW_COPY_AND_ASSIGN(ConsStringIteratorOp); 7888 DISALLOW_COPY_AND_ASSIGN(ConsStringIteratorOp);
7891 }; 7889 };
7892 7890
7893 7891
7894 // Note: this class is not GC-safe. 7892 // Note: this class is not GC-safe.
7895 class StringCharacterStream { 7893 class StringCharacterStream {
7896 public: 7894 public:
7895 inline StringCharacterStream(String* string, ConsStringIteratorOp* op);
7897 inline StringCharacterStream(String* string, 7896 inline StringCharacterStream(String* string,
7898 unsigned offset, 7897 unsigned offset,
7899 ConsStringIteratorOp* op); 7898 ConsStringIteratorOp* op);
7900 inline uint16_t GetNext(); 7899 inline uint16_t GetNext();
7901 inline bool HasMore(); 7900 inline bool HasMore();
7902 inline void Reset(String* string, unsigned offset, ConsStringIteratorOp* op); 7901 inline void Reset(String* string) { Reset(string, 0); }
7902 inline void Reset(String* string, unsigned offset);
Yang 2012/12/21 09:21:48 Save a line using optional argument with default v
7903 inline void VisitOneByteString(const uint8_t* chars, unsigned length); 7903 inline void VisitOneByteString(const uint8_t* chars, unsigned length);
7904 inline void VisitTwoByteString(const uint16_t* chars, unsigned length); 7904 inline void VisitTwoByteString(const uint16_t* chars, unsigned length);
7905 7905
7906 private: 7906 private:
7907 bool is_one_byte_; 7907 bool is_one_byte_;
7908 union { 7908 union {
7909 const uint8_t* buffer8_; 7909 const uint8_t* buffer8_;
7910 const uint16_t* buffer16_; 7910 const uint16_t* buffer16_;
7911 }; 7911 };
7912 const uint8_t* end_; 7912 const uint8_t* end_;
(...skipping 971 matching lines...) Expand 10 before | Expand all | Expand 10 after
8884 } else { 8884 } else {
8885 value &= ~(1 << bit_position); 8885 value &= ~(1 << bit_position);
8886 } 8886 }
8887 return value; 8887 return value;
8888 } 8888 }
8889 }; 8889 };
8890 8890
8891 } } // namespace v8::internal 8891 } } // namespace v8::internal
8892 8892
8893 #endif // V8_OBJECTS_H_ 8893 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/isolate.cc ('k') | src/objects.cc » ('j') | src/objects.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698