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 6573 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6584 | 6584 |
6585 // Maximum number of characters to consider when trying to convert a string | 6585 // Maximum number of characters to consider when trying to convert a string |
6586 // value into an array index. | 6586 // value into an array index. |
6587 static const int kMaxArrayIndexSize = 10; | 6587 static const int kMaxArrayIndexSize = 10; |
6588 | 6588 |
6589 // Max ASCII char code. | 6589 // Max ASCII char code. |
6590 static const int kMaxAsciiCharCode = unibrow::Utf8::kMaxOneByteChar; | 6590 static const int kMaxAsciiCharCode = unibrow::Utf8::kMaxOneByteChar; |
6591 static const unsigned kMaxAsciiCharCodeU = unibrow::Utf8::kMaxOneByteChar; | 6591 static const unsigned kMaxAsciiCharCodeU = unibrow::Utf8::kMaxOneByteChar; |
6592 static const int kMaxUC16CharCode = 0xffff; | 6592 static const int kMaxUC16CharCode = 0xffff; |
6593 | 6593 |
6594 // Minimum length for a cons string. | |
6595 static const int kMinNonFlatLength = 13; | |
6596 | |
6597 // Mask constant for checking if a string has a computed hash code | 6594 // Mask constant for checking if a string has a computed hash code |
6598 // and if it is an array index. The least significant bit indicates | 6595 // and if it is an array index. The least significant bit indicates |
6599 // whether a hash code has been computed. If the hash code has been | 6596 // whether a hash code has been computed. If the hash code has been |
6600 // computed the 2nd bit tells whether the string can be used as an | 6597 // computed the 2nd bit tells whether the string can be used as an |
6601 // array index. | 6598 // array index. |
6602 static const int kHashNotComputedMask = 1; | 6599 static const int kHashNotComputedMask = 1; |
6603 static const int kIsNotArrayIndexMask = 1 << 1; | 6600 static const int kIsNotArrayIndexMask = 1 << 1; |
6604 static const int kNofHashBitFields = 2; | 6601 static const int kNofHashBitFields = 2; |
6605 | 6602 |
6606 // Shift constant retrieving hash code from hash field. | 6603 // Shift constant retrieving hash code from hash field. |
(...skipping 1584 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8191 } else { | 8188 } else { |
8192 value &= ~(1 << bit_position); | 8189 value &= ~(1 << bit_position); |
8193 } | 8190 } |
8194 return value; | 8191 return value; |
8195 } | 8192 } |
8196 }; | 8193 }; |
8197 | 8194 |
8198 } } // namespace v8::internal | 8195 } } // namespace v8::internal |
8199 | 8196 |
8200 #endif // V8_OBJECTS_H_ | 8197 #endif // V8_OBJECTS_H_ |
OLD | NEW |