OLD | NEW |
1 // Copyright 2006-2009 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2009 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 1951 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1962 | 1962 |
1963 static const int kNumberOfElementsIndex = 0; | 1963 static const int kNumberOfElementsIndex = 0; |
1964 static const int kNumberOfDeletedElementsIndex = 1; | 1964 static const int kNumberOfDeletedElementsIndex = 1; |
1965 static const int kCapacityIndex = 2; | 1965 static const int kCapacityIndex = 2; |
1966 static const int kPrefixStartIndex = 3; | 1966 static const int kPrefixStartIndex = 3; |
1967 static const int kElementsStartIndex = | 1967 static const int kElementsStartIndex = |
1968 kPrefixStartIndex + Shape::kPrefixSize; | 1968 kPrefixStartIndex + Shape::kPrefixSize; |
1969 static const int kEntrySize = Shape::kEntrySize; | 1969 static const int kEntrySize = Shape::kEntrySize; |
1970 static const int kElementsStartOffset = | 1970 static const int kElementsStartOffset = |
1971 kHeaderSize + kElementsStartIndex * kPointerSize; | 1971 kHeaderSize + kElementsStartIndex * kPointerSize; |
| 1972 static const int kCapacityOffset = |
| 1973 kHeaderSize + kCapacityIndex * kPointerSize; |
1972 | 1974 |
1973 // Constant used for denoting a absent entry. | 1975 // Constant used for denoting a absent entry. |
1974 static const int kNotFound = -1; | 1976 static const int kNotFound = -1; |
1975 | 1977 |
1976 // Maximal capacity of HashTable. Based on maximal length of underlying | 1978 // Maximal capacity of HashTable. Based on maximal length of underlying |
1977 // FixedArray. Staying below kMaxCapacity also ensures that EntryToIndex | 1979 // FixedArray. Staying below kMaxCapacity also ensures that EntryToIndex |
1978 // cannot overflow. | 1980 // cannot overflow. |
1979 static const int kMaxCapacity = | 1981 static const int kMaxCapacity = |
1980 (FixedArray::kMaxLength - kElementsStartOffset) / kEntrySize; | 1982 (FixedArray::kMaxLength - kElementsStartOffset) / kEntrySize; |
1981 | 1983 |
(...skipping 2997 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4979 } else { | 4981 } else { |
4980 value &= ~(1 << bit_position); | 4982 value &= ~(1 << bit_position); |
4981 } | 4983 } |
4982 return value; | 4984 return value; |
4983 } | 4985 } |
4984 }; | 4986 }; |
4985 | 4987 |
4986 } } // namespace v8::internal | 4988 } } // namespace v8::internal |
4987 | 4989 |
4988 #endif // V8_OBJECTS_H_ | 4990 #endif // V8_OBJECTS_H_ |
OLD | NEW |