OLD | NEW |
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 7217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7228 inline void set_length(int value); | 7228 inline void set_length(int value); |
7229 | 7229 |
7230 // Get and set the hash field of the string. | 7230 // Get and set the hash field of the string. |
7231 inline uint32_t hash_field(); | 7231 inline uint32_t hash_field(); |
7232 inline void set_hash_field(uint32_t value); | 7232 inline void set_hash_field(uint32_t value); |
7233 | 7233 |
7234 // Returns whether this string has only ASCII chars, i.e. all of them can | 7234 // Returns whether this string has only ASCII chars, i.e. all of them can |
7235 // be ASCII encoded. This might be the case even if the string is | 7235 // be ASCII encoded. This might be the case even if the string is |
7236 // two-byte. Such strings may appear when the embedder prefers | 7236 // two-byte. Such strings may appear when the embedder prefers |
7237 // two-byte external representations even for ASCII data. | 7237 // two-byte external representations even for ASCII data. |
7238 inline bool IsAsciiRepresentation(); | 7238 inline bool IsOneByteRepresentation(); |
7239 inline bool IsTwoByteRepresentation(); | 7239 inline bool IsTwoByteRepresentation(); |
7240 | 7240 |
7241 // Cons and slices have an encoding flag that may not represent the actual | 7241 // Cons and slices have an encoding flag that may not represent the actual |
7242 // encoding of the underlying string. This is taken into account here. | 7242 // encoding of the underlying string. This is taken into account here. |
7243 // Requires: this->IsFlat() | 7243 // Requires: this->IsFlat() |
7244 inline bool IsAsciiRepresentationUnderneath(); | 7244 inline bool IsOneByteRepresentationUnderneath(); |
7245 inline bool IsTwoByteRepresentationUnderneath(); | 7245 inline bool IsTwoByteRepresentationUnderneath(); |
7246 | 7246 |
7247 // NOTE: this should be considered only a hint. False negatives are | 7247 // NOTE: this should be considered only a hint. False negatives are |
7248 // possible. | 7248 // possible. |
7249 inline bool HasOnlyAsciiChars(); | 7249 inline bool HasOnlyAsciiChars(); |
7250 | 7250 |
7251 // Get and set individual two byte chars in the string. | 7251 // Get and set individual two byte chars in the string. |
7252 inline void Set(int index, uint16_t value); | 7252 inline void Set(int index, uint16_t value); |
7253 // Get individual two byte char in the string. Repeated calls | 7253 // Get individual two byte char in the string. Repeated calls |
7254 // to this method are not efficient unless the string is flat. | 7254 // to this method are not efficient unless the string is flat. |
(...skipping 1763 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9018 } else { | 9018 } else { |
9019 value &= ~(1 << bit_position); | 9019 value &= ~(1 << bit_position); |
9020 } | 9020 } |
9021 return value; | 9021 return value; |
9022 } | 9022 } |
9023 }; | 9023 }; |
9024 | 9024 |
9025 } } // namespace v8::internal | 9025 } } // namespace v8::internal |
9026 | 9026 |
9027 #endif // V8_OBJECTS_H_ | 9027 #endif // V8_OBJECTS_H_ |
OLD | NEW |