| 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 7778 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7789 static int SizeFor(int length) { | 7789 static int SizeFor(int length) { |
| 7790 return OBJECT_POINTER_ALIGN(kHeaderSize + length * kCharSize); | 7790 return OBJECT_POINTER_ALIGN(kHeaderSize + length * kCharSize); |
| 7791 } | 7791 } |
| 7792 | 7792 |
| 7793 // Maximal memory usage for a single sequential ASCII string. | 7793 // Maximal memory usage for a single sequential ASCII string. |
| 7794 static const int kMaxSize = 512 * MB - 1; | 7794 static const int kMaxSize = 512 * MB - 1; |
| 7795 // Maximal length of a single sequential ASCII string. | 7795 // Maximal length of a single sequential ASCII string. |
| 7796 // Q.v. String::kMaxLength which is the maximal size of concatenated strings. | 7796 // Q.v. String::kMaxLength which is the maximal size of concatenated strings. |
| 7797 static const int kMaxLength = (kMaxSize - kHeaderSize); | 7797 static const int kMaxLength = (kMaxSize - kHeaderSize); |
| 7798 | 7798 |
| 7799 DECLARE_VERIFIER(SeqOneByteString) | |
| 7800 | |
| 7801 private: | 7799 private: |
| 7802 DISALLOW_IMPLICIT_CONSTRUCTORS(SeqOneByteString); | 7800 DISALLOW_IMPLICIT_CONSTRUCTORS(SeqOneByteString); |
| 7803 }; | 7801 }; |
| 7804 | 7802 |
| 7805 | 7803 |
| 7806 // The TwoByteString class captures sequential unicode string objects. | 7804 // The TwoByteString class captures sequential unicode string objects. |
| 7807 // Each character in the TwoByteString is a two-byte uint16_t. | 7805 // Each character in the TwoByteString is a two-byte uint16_t. |
| 7808 class SeqTwoByteString: public SeqString { | 7806 class SeqTwoByteString: public SeqString { |
| 7809 public: | 7807 public: |
| 7810 static const bool kHasAsciiEncoding = false; | 7808 static const bool kHasAsciiEncoding = false; |
| (...skipping 1453 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9264 } else { | 9262 } else { |
| 9265 value &= ~(1 << bit_position); | 9263 value &= ~(1 << bit_position); |
| 9266 } | 9264 } |
| 9267 return value; | 9265 return value; |
| 9268 } | 9266 } |
| 9269 }; | 9267 }; |
| 9270 | 9268 |
| 9271 } } // namespace v8::internal | 9269 } } // namespace v8::internal |
| 9272 | 9270 |
| 9273 #endif // V8_OBJECTS_H_ | 9271 #endif // V8_OBJECTS_H_ |
| OLD | NEW |