OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 2969 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2980 // kRequiresSlowElementsLimit or set_requires_slow_elements() has been called | 2980 // kRequiresSlowElementsLimit or set_requires_slow_elements() has been called |
2981 // when defining a getter or setter with a number key. | 2981 // when defining a getter or setter with a number key. |
2982 inline bool requires_slow_elements(); | 2982 inline bool requires_slow_elements(); |
2983 inline void set_requires_slow_elements(); | 2983 inline void set_requires_slow_elements(); |
2984 | 2984 |
2985 // Get the value of the max number key that has been added to this | 2985 // Get the value of the max number key that has been added to this |
2986 // dictionary. max_number_key can only be called if | 2986 // dictionary. max_number_key can only be called if |
2987 // requires_slow_elements returns false. | 2987 // requires_slow_elements returns false. |
2988 inline uint32_t max_number_key(); | 2988 inline uint32_t max_number_key(); |
2989 | 2989 |
2990 // Remove all entries were key is a number and (from <= key && key < to). | |
2991 void RemoveNumberEntries(uint32_t from, uint32_t to); | |
2992 | |
2993 // Bit masks. | 2990 // Bit masks. |
2994 static const int kRequiresSlowElementsMask = 1; | 2991 static const int kRequiresSlowElementsMask = 1; |
2995 static const int kRequiresSlowElementsTagSize = 1; | 2992 static const int kRequiresSlowElementsTagSize = 1; |
2996 static const uint32_t kRequiresSlowElementsLimit = (1 << 29) - 1; | 2993 static const uint32_t kRequiresSlowElementsLimit = (1 << 29) - 1; |
2997 }; | 2994 }; |
2998 | 2995 |
2999 | 2996 |
3000 template <int entrysize> | 2997 template <int entrysize> |
3001 class ObjectHashTableShape { | 2998 class ObjectHashTableShape { |
3002 public: | 2999 public: |
(...skipping 4803 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7806 } else { | 7803 } else { |
7807 value &= ~(1 << bit_position); | 7804 value &= ~(1 << bit_position); |
7808 } | 7805 } |
7809 return value; | 7806 return value; |
7810 } | 7807 } |
7811 }; | 7808 }; |
7812 | 7809 |
7813 } } // namespace v8::internal | 7810 } } // namespace v8::internal |
7814 | 7811 |
7815 #endif // V8_OBJECTS_H_ | 7812 #endif // V8_OBJECTS_H_ |
OLD | NEW |