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 1793 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1804 // Remove all transitions. Return a copy of the array with all transitions | 1804 // Remove all transitions. Return a copy of the array with all transitions |
1805 // removed, or a Failure object if the new array could not be allocated. | 1805 // removed, or a Failure object if the new array could not be allocated. |
1806 Object* RemoveTransitions(); | 1806 Object* RemoveTransitions(); |
1807 | 1807 |
1808 // Sort the instance descriptors by the hash codes of their keys. | 1808 // Sort the instance descriptors by the hash codes of their keys. |
1809 void Sort(); | 1809 void Sort(); |
1810 | 1810 |
1811 // Search the instance descriptors for given name. | 1811 // Search the instance descriptors for given name. |
1812 inline int Search(String* name); | 1812 inline int Search(String* name); |
1813 | 1813 |
| 1814 // As the above, but uses DescriptorLookupCache and updates it when |
| 1815 // necessary. |
| 1816 inline int SearchWithCache(String* name); |
| 1817 |
1814 // Tells whether the name is present int the array. | 1818 // Tells whether the name is present int the array. |
1815 bool Contains(String* name) { return kNotFound != Search(name); } | 1819 bool Contains(String* name) { return kNotFound != Search(name); } |
1816 | 1820 |
1817 // Perform a binary search in the instance descriptors represented | 1821 // Perform a binary search in the instance descriptors represented |
1818 // by this fixed array. low and high are descriptor indices. If there | 1822 // by this fixed array. low and high are descriptor indices. If there |
1819 // are three instance descriptors in this array it should be called | 1823 // are three instance descriptors in this array it should be called |
1820 // with low=0 and high=2. | 1824 // with low=0 and high=2. |
1821 int BinarySearch(String* name, int low, int high); | 1825 int BinarySearch(String* name, int low, int high); |
1822 | 1826 |
1823 // Perform a linear search in the instance descriptors represented | 1827 // Perform a linear search in the instance descriptors represented |
(...skipping 3543 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5367 } else { | 5371 } else { |
5368 value &= ~(1 << bit_position); | 5372 value &= ~(1 << bit_position); |
5369 } | 5373 } |
5370 return value; | 5374 return value; |
5371 } | 5375 } |
5372 }; | 5376 }; |
5373 | 5377 |
5374 } } // namespace v8::internal | 5378 } } // namespace v8::internal |
5375 | 5379 |
5376 #endif // V8_OBJECTS_H_ | 5380 #endif // V8_OBJECTS_H_ |
OLD | NEW |