| 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 7669 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7680 static const int kArrayIndexHashMask = (1 << kArrayIndexHashLengthShift) - 1; | 7680 static const int kArrayIndexHashMask = (1 << kArrayIndexHashLengthShift) - 1; |
| 7681 | 7681 |
| 7682 static const int kArrayIndexValueMask = | 7682 static const int kArrayIndexValueMask = |
| 7683 ((1 << kArrayIndexValueBits) - 1) << kHashShift; | 7683 ((1 << kArrayIndexValueBits) - 1) << kHashShift; |
| 7684 | 7684 |
| 7685 // Check that kMaxCachedArrayIndexLength + 1 is a power of two so we | 7685 // Check that kMaxCachedArrayIndexLength + 1 is a power of two so we |
| 7686 // could use a mask to test if the length of string is less than or equal to | 7686 // could use a mask to test if the length of string is less than or equal to |
| 7687 // kMaxCachedArrayIndexLength. | 7687 // kMaxCachedArrayIndexLength. |
| 7688 STATIC_CHECK(IS_POWER_OF_TWO(kMaxCachedArrayIndexLength + 1)); | 7688 STATIC_CHECK(IS_POWER_OF_TWO(kMaxCachedArrayIndexLength + 1)); |
| 7689 | 7689 |
| 7690 static const int kContainsCachedArrayIndexMask = | 7690 static const unsigned int kContainsCachedArrayIndexMask = |
| 7691 (~kMaxCachedArrayIndexLength << kArrayIndexHashLengthShift) | | 7691 (~kMaxCachedArrayIndexLength << kArrayIndexHashLengthShift) | |
| 7692 kIsNotArrayIndexMask; | 7692 kIsNotArrayIndexMask; |
| 7693 | 7693 |
| 7694 // Value of empty hash field indicating that the hash is not computed. | 7694 // Value of empty hash field indicating that the hash is not computed. |
| 7695 static const int kEmptyHashField = | 7695 static const int kEmptyHashField = |
| 7696 kIsNotArrayIndexMask | kHashNotComputedMask; | 7696 kIsNotArrayIndexMask | kHashNotComputedMask; |
| 7697 | 7697 |
| 7698 protected: | 7698 protected: |
| 7699 static inline bool IsHashFieldComputed(uint32_t field); | 7699 static inline bool IsHashFieldComputed(uint32_t field); |
| 7700 | 7700 |
| (...skipping 2046 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9747 } else { | 9747 } else { |
| 9748 value &= ~(1 << bit_position); | 9748 value &= ~(1 << bit_position); |
| 9749 } | 9749 } |
| 9750 return value; | 9750 return value; |
| 9751 } | 9751 } |
| 9752 }; | 9752 }; |
| 9753 | 9753 |
| 9754 } } // namespace v8::internal | 9754 } } // namespace v8::internal |
| 9755 | 9755 |
| 9756 #endif // V8_OBJECTS_H_ | 9756 #endif // V8_OBJECTS_H_ |
| OLD | NEW |