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 8463 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8474 FlatContent GetFlatContent(); | 8474 FlatContent GetFlatContent(); |
8475 | 8475 |
8476 // Returns the parent of a sliced string or first part of a flat cons string. | 8476 // Returns the parent of a sliced string or first part of a flat cons string. |
8477 // Requires: StringShape(this).IsIndirect() && this->IsFlat() | 8477 // Requires: StringShape(this).IsIndirect() && this->IsFlat() |
8478 inline String* GetUnderlying(); | 8478 inline String* GetUnderlying(); |
8479 | 8479 |
8480 // Mark the string as an undetectable object. It only applies to | 8480 // Mark the string as an undetectable object. It only applies to |
8481 // ASCII and two byte string types. | 8481 // ASCII and two byte string types. |
8482 bool MarkAsUndetectable(); | 8482 bool MarkAsUndetectable(); |
8483 | 8483 |
8484 // Return a substring. | |
8485 MUST_USE_RESULT MaybeObject* SubString(int from, | |
8486 int to, | |
8487 PretenureFlag pretenure = NOT_TENURED); | |
8488 | |
8489 // String equality operations. | 8484 // String equality operations. |
8490 inline bool Equals(String* other); | 8485 inline bool Equals(String* other); |
8491 bool IsUtf8EqualTo(Vector<const char> str, bool allow_prefix_match = false); | 8486 bool IsUtf8EqualTo(Vector<const char> str, bool allow_prefix_match = false); |
8492 bool IsOneByteEqualTo(Vector<const uint8_t> str); | 8487 bool IsOneByteEqualTo(Vector<const uint8_t> str); |
8493 bool IsTwoByteEqualTo(Vector<const uc16> str); | 8488 bool IsTwoByteEqualTo(Vector<const uc16> str); |
8494 | 8489 |
8495 // Return a UTF8 representation of the string. The string is null | 8490 // Return a UTF8 representation of the string. The string is null |
8496 // terminated but may optionally contain nulls. Length is returned | 8491 // terminated but may optionally contain nulls. Length is returned |
8497 // in length_output if length_output is not a null pointer The string | 8492 // in length_output if length_output is not a null pointer The string |
8498 // should be nearly flat, otherwise the performance of this method may | 8493 // should be nearly flat, otherwise the performance of this method may |
(...skipping 1941 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10440 } else { | 10435 } else { |
10441 value &= ~(1 << bit_position); | 10436 value &= ~(1 << bit_position); |
10442 } | 10437 } |
10443 return value; | 10438 return value; |
10444 } | 10439 } |
10445 }; | 10440 }; |
10446 | 10441 |
10447 } } // namespace v8::internal | 10442 } } // namespace v8::internal |
10448 | 10443 |
10449 #endif // V8_OBJECTS_H_ | 10444 #endif // V8_OBJECTS_H_ |
OLD | NEW |