OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2005, 2006, 2007, 2008, 2011, 2012 Apple Inc. All rights | 2 * Copyright (C) 2005, 2006, 2007, 2008, 2011, 2012 Apple Inc. All rights |
3 * reserved. | 3 * reserved. |
4 * Copyright (C) 2011, Benjamin Poulain <ikipou@gmail.com> | 4 * Copyright (C) 2011, Benjamin Poulain <ikipou@gmail.com> |
5 * | 5 * |
6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
10 * | 10 * |
11 * This library is distributed in the hope that it will be useful, | 11 * This library is distributed in the hope that it will be useful, |
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
14 * Library General Public License for more details. | 14 * Library General Public License for more details. |
15 * | 15 * |
16 * You should have received a copy of the GNU Library General Public License | 16 * You should have received a copy of the GNU Library General Public License |
17 * along with this library; see the file COPYING.LIB. If not, write to | 17 * along with this library; see the file COPYING.LIB. If not, write to |
18 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | 18 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
19 * Boston, MA 02110-1301, USA. | 19 * Boston, MA 02110-1301, USA. |
20 * | 20 * |
21 */ | 21 */ |
22 | 22 |
23 #ifndef WTF_LinkedHashSet_h | 23 #ifndef WTF_LinkedHashSet_h |
24 #define WTF_LinkedHashSet_h | 24 #define WTF_LinkedHashSet_h |
25 | 25 |
26 #include "wtf/AddressSanitizer.h" | 26 #include "platform/wtf/AddressSanitizer.h" |
27 #include "wtf/HashSet.h" | 27 #include "platform/wtf/HashSet.h" |
28 #include "wtf/allocator/PartitionAllocator.h" | 28 #include "platform/wtf/allocator/PartitionAllocator.h" |
29 | 29 |
30 namespace WTF { | 30 namespace WTF { |
31 | 31 |
32 // LinkedHashSet: Just like HashSet, this class provides a Set | 32 // LinkedHashSet: Just like HashSet, this class provides a Set |
33 // interface - a collection of unique objects with O(1) insertion, | 33 // interface - a collection of unique objects with O(1) insertion, |
34 // removal and test for containership. However, it also has an | 34 // removal and test for containership. However, it also has an |
35 // order - iterating it will always give back values in the order | 35 // order - iterating it will always give back values in the order |
36 // in which they are added. | 36 // in which they are added. |
37 | 37 |
38 // Unlike ListHashSet, but like most WTF collections, iteration is NOT safe | 38 // Unlike ListHashSet, but like most WTF collections, iteration is NOT safe |
(...skipping 890 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
929 swap(static_cast<Base&>(a), static_cast<Base&>(b)); | 929 swap(static_cast<Base&>(a), static_cast<Base&>(b)); |
930 swap(a.m_value, b.m_value); | 930 swap(a.m_value, b.m_value); |
931 Allocator::leaveGCForbiddenScope(); | 931 Allocator::leaveGCForbiddenScope(); |
932 } | 932 } |
933 | 933 |
934 } // namespace WTF | 934 } // namespace WTF |
935 | 935 |
936 using WTF::LinkedHashSet; | 936 using WTF::LinkedHashSet; |
937 | 937 |
938 #endif /* WTF_LinkedHashSet_h */ | 938 #endif /* WTF_LinkedHashSet_h */ |
OLD | NEW |