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 7735 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
7746 class SeqString: public String { | 7746 class SeqString: public String { |
7747 public: | 7747 public: |
7748 // Casting. | 7748 // Casting. |
7749 static inline SeqString* cast(Object* obj); | 7749 static inline SeqString* cast(Object* obj); |
7750 | 7750 |
7751 // Layout description. | 7751 // Layout description. |
7752 static const int kHeaderSize = String::kSize; | 7752 static const int kHeaderSize = String::kSize; |
7753 | 7753 |
7754 // Truncate the string in-place if possible and return the result. | 7754 // Truncate the string in-place if possible and return the result. |
7755 // In case of new_length == 0, the empty string is returned without | 7755 // In case of new_length == 0, the empty string is returned without |
7756 // truncating the original string. | 7756 // truncating the original string. |
Hannes Payer (out of office)
2013/03/21 12:48:30
I would revert this change and truncate all string
| |
7757 MUST_USE_RESULT String* Truncate(int new_length); | 7757 void Truncate(int new_length); |
7758 | 7758 |
7759 private: | 7759 private: |
7760 DISALLOW_IMPLICIT_CONSTRUCTORS(SeqString); | 7760 DISALLOW_IMPLICIT_CONSTRUCTORS(SeqString); |
7761 }; | 7761 }; |
7762 | 7762 |
7763 | 7763 |
7764 // The AsciiString class captures sequential ASCII string objects. | 7764 // The AsciiString class captures sequential ASCII string objects. |
7765 // Each character in the AsciiString is an ASCII character. | 7765 // Each character in the AsciiString is an ASCII character. |
7766 class SeqOneByteString: public SeqString { | 7766 class SeqOneByteString: public SeqString { |
7767 public: | 7767 public: |
(...skipping 1493 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
9261 } else { | 9261 } else { |
9262 value &= ~(1 << bit_position); | 9262 value &= ~(1 << bit_position); |
9263 } | 9263 } |
9264 return value; | 9264 return value; |
9265 } | 9265 } |
9266 }; | 9266 }; |
9267 | 9267 |
9268 } } // namespace v8::internal | 9268 } } // namespace v8::internal |
9269 | 9269 |
9270 #endif // V8_OBJECTS_H_ | 9270 #endif // V8_OBJECTS_H_ |
OLD | NEW |