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 6868 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6879 inline bool IsTwoByteRepresentationUnderneath(); | 6879 inline bool IsTwoByteRepresentationUnderneath(); |
6880 | 6880 |
6881 // NOTE: this should be considered only a hint. False negatives are | 6881 // NOTE: this should be considered only a hint. False negatives are |
6882 // possible. | 6882 // possible. |
6883 inline bool HasOnlyAsciiChars(); | 6883 inline bool HasOnlyAsciiChars(); |
6884 | 6884 |
6885 // Get and set individual two byte chars in the string. | 6885 // Get and set individual two byte chars in the string. |
6886 inline void Set(int index, uint16_t value); | 6886 inline void Set(int index, uint16_t value); |
6887 // Get individual two byte char in the string. Repeated calls | 6887 // Get individual two byte char in the string. Repeated calls |
6888 // to this method are not efficient unless the string is flat. | 6888 // to this method are not efficient unless the string is flat. |
6889 inline uint16_t Get(int index); | 6889 INLINE(uint16_t Get(int index)); |
6890 | 6890 |
6891 // Try to flatten the string. Checks first inline to see if it is | 6891 // Try to flatten the string. Checks first inline to see if it is |
6892 // necessary. Does nothing if the string is not a cons string. | 6892 // necessary. Does nothing if the string is not a cons string. |
6893 // Flattening allocates a sequential string with the same data as | 6893 // Flattening allocates a sequential string with the same data as |
6894 // the given string and mutates the cons string to a degenerate | 6894 // the given string and mutates the cons string to a degenerate |
6895 // form, where the first component is the new sequential string and | 6895 // form, where the first component is the new sequential string and |
6896 // the second component is the empty string. If allocation fails, | 6896 // the second component is the empty string. If allocation fails, |
6897 // this function returns a failure. If flattening succeeds, this | 6897 // this function returns a failure. If flattening succeeds, this |
6898 // function returns the sequential string that is now the first | 6898 // function returns the sequential string that is now the first |
6899 // component of the cons string. | 6899 // component of the cons string. |
(...skipping 1758 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8658 } else { | 8658 } else { |
8659 value &= ~(1 << bit_position); | 8659 value &= ~(1 << bit_position); |
8660 } | 8660 } |
8661 return value; | 8661 return value; |
8662 } | 8662 } |
8663 }; | 8663 }; |
8664 | 8664 |
8665 } } // namespace v8::internal | 8665 } } // namespace v8::internal |
8666 | 8666 |
8667 #endif // V8_OBJECTS_H_ | 8667 #endif // V8_OBJECTS_H_ |
OLD | NEW |