OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef V8_OBJECTS_H_ | 5 #ifndef V8_OBJECTS_H_ |
6 #define V8_OBJECTS_H_ | 6 #define V8_OBJECTS_H_ |
7 | 7 |
8 #include <iosfwd> | 8 #include <iosfwd> |
9 | 9 |
10 #include "src/allocation.h" | 10 #include "src/allocation.h" |
(...skipping 8967 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8978 // a flat vector of char or of uc16. | 8978 // a flat vector of char or of uc16. |
8979 // If the string isn't flat, and therefore doesn't have flat content, the | 8979 // If the string isn't flat, and therefore doesn't have flat content, the |
8980 // returned structure will report so, and can't provide a vector of either | 8980 // returned structure will report so, and can't provide a vector of either |
8981 // kind. | 8981 // kind. |
8982 FlatContent GetFlatContent(); | 8982 FlatContent GetFlatContent(); |
8983 | 8983 |
8984 // Returns the parent of a sliced string or first part of a flat cons string. | 8984 // Returns the parent of a sliced string or first part of a flat cons string. |
8985 // Requires: StringShape(this).IsIndirect() && this->IsFlat() | 8985 // Requires: StringShape(this).IsIndirect() && this->IsFlat() |
8986 inline String* GetUnderlying(); | 8986 inline String* GetUnderlying(); |
8987 | 8987 |
8988 // Mark the string as an undetectable object. It only applies to | |
8989 // one-byte and two-byte string types. | |
8990 bool MarkAsUndetectable(); | |
8991 | |
8992 // String equality operations. | 8988 // String equality operations. |
8993 inline bool Equals(String* other); | 8989 inline bool Equals(String* other); |
8994 inline static bool Equals(Handle<String> one, Handle<String> two); | 8990 inline static bool Equals(Handle<String> one, Handle<String> two); |
8995 bool IsUtf8EqualTo(Vector<const char> str, bool allow_prefix_match = false); | 8991 bool IsUtf8EqualTo(Vector<const char> str, bool allow_prefix_match = false); |
8996 bool IsOneByteEqualTo(Vector<const uint8_t> str); | 8992 bool IsOneByteEqualTo(Vector<const uint8_t> str); |
8997 bool IsTwoByteEqualTo(Vector<const uc16> str); | 8993 bool IsTwoByteEqualTo(Vector<const uc16> str); |
8998 | 8994 |
8999 // Return a UTF8 representation of the string. The string is null | 8995 // Return a UTF8 representation of the string. The string is null |
9000 // terminated but may optionally contain nulls. Length is returned | 8996 // terminated but may optionally contain nulls. Length is returned |
9001 // in length_output if length_output is not a null pointer The string | 8997 // in length_output if length_output is not a null pointer The string |
(...skipping 1963 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10965 } else { | 10961 } else { |
10966 value &= ~(1 << bit_position); | 10962 value &= ~(1 << bit_position); |
10967 } | 10963 } |
10968 return value; | 10964 return value; |
10969 } | 10965 } |
10970 }; | 10966 }; |
10971 | 10967 |
10972 } } // namespace v8::internal | 10968 } } // namespace v8::internal |
10973 | 10969 |
10974 #endif // V8_OBJECTS_H_ | 10970 #endif // V8_OBJECTS_H_ |
OLD | NEW |