/src/harfbuzz/src/hb-map.hh
Line | Count | Source |
1 | | /* |
2 | | * Copyright © 2018 Google, Inc. |
3 | | * |
4 | | * This is part of HarfBuzz, a text shaping library. |
5 | | * |
6 | | * Permission is hereby granted, without written agreement and without |
7 | | * license or royalty fees, to use, copy, modify, and distribute this |
8 | | * software and its documentation for any purpose, provided that the |
9 | | * above copyright notice and the following two paragraphs appear in |
10 | | * all copies of this software. |
11 | | * |
12 | | * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR |
13 | | * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES |
14 | | * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN |
15 | | * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH |
16 | | * DAMAGE. |
17 | | * |
18 | | * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, |
19 | | * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND |
20 | | * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS |
21 | | * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO |
22 | | * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. |
23 | | * |
24 | | * Google Author(s): Behdad Esfahbod |
25 | | */ |
26 | | |
27 | | #ifndef HB_MAP_HH |
28 | | #define HB_MAP_HH |
29 | | |
30 | | #include "hb.hh" |
31 | | |
32 | | #include "hb-set.hh" |
33 | | |
34 | | |
35 | | /* |
36 | | * hb_hashmap_t |
37 | | */ |
38 | | |
39 | | extern HB_INTERNAL const hb_codepoint_t minus_1; |
40 | | |
41 | | template <typename K, typename V, |
42 | | bool minus_one = false> |
43 | | struct hb_hashmap_t |
44 | | { |
45 | | static constexpr bool realloc_move = true; |
46 | | |
47 | 17.7k | hb_hashmap_t () { init (); }Unexecuted instantiation: hb_hashmap_t<hb_serialize_context_t::object_t const*, unsigned int, false>::hb_hashmap_t() hb_hashmap_t<unsigned int, unsigned int, true>::hb_hashmap_t() Line | Count | Source | 47 | 17.7k | hb_hashmap_t () { init (); } |
Unexecuted instantiation: hb_hashmap_t<unsigned int, hb_set_t, false>::hb_hashmap_t() Unexecuted instantiation: hb_hashmap_t<unsigned int, hb::unique_ptr<hb_set_t>, false>::hb_hashmap_t() |
48 | 17.7k | ~hb_hashmap_t () { fini (); }Unexecuted instantiation: hb_hashmap_t<hb_serialize_context_t::object_t const*, unsigned int, false>::~hb_hashmap_t() hb_hashmap_t<unsigned int, unsigned int, true>::~hb_hashmap_t() Line | Count | Source | 48 | 17.7k | ~hb_hashmap_t () { fini (); } |
Unexecuted instantiation: hb_hashmap_t<unsigned int, hb_set_t, false>::~hb_hashmap_t() Unexecuted instantiation: hb_hashmap_t<unsigned int, hb::unique_ptr<hb_set_t>, false>::~hb_hashmap_t() |
49 | | |
50 | | void _copy (const hb_hashmap_t& o) |
51 | 0 | { |
52 | 0 | if (unlikely (!o.successful)) |
53 | 0 | { |
54 | 0 | successful = false; |
55 | 0 | return; |
56 | 0 | } |
57 | 0 | if (unlikely (!o.mask)) return; |
58 | | |
59 | 0 | if (hb_is_trivially_copy_assignable (item_t)) |
60 | 0 | { |
61 | 0 | items = (item_t *) hb_malloc2 ((o.mask + 1), sizeof (item_t)); |
62 | 0 | if (unlikely (!items)) |
63 | 0 | { |
64 | 0 | successful = false; |
65 | 0 | return; |
66 | 0 | } |
67 | 0 | population = o.population; |
68 | 0 | occupancy = o.occupancy; |
69 | 0 | mask = o.mask; |
70 | 0 | prime = o.prime; |
71 | 0 | max_chain_length = o.max_chain_length; |
72 | 0 | memcpy (items, o.items, sizeof (item_t) * (mask + 1)); |
73 | 0 | return; |
74 | 0 | } |
75 | | |
76 | 0 | alloc (o.population); hb_copy (o, *this); |
77 | 0 | } Unexecuted instantiation: hb_hashmap_t<unsigned int, unsigned int, true>::_copy(hb_hashmap_t<unsigned int, unsigned int, true> const&) Unexecuted instantiation: hb_hashmap_t<unsigned int, Triple, false>::_copy(hb_hashmap_t<unsigned int, Triple, false> const&) |
78 | | |
79 | | hb_hashmap_t (const hb_hashmap_t& o) : hb_hashmap_t () { _copy (o); } |
80 | | hb_hashmap_t& operator= (const hb_hashmap_t& o) |
81 | 0 | { |
82 | 0 | reset (); |
83 | 0 | if (!items) { _copy (o); return *this; } |
84 | 0 | alloc (o.population); hb_copy (o, *this); return *this; |
85 | 0 | } Unexecuted instantiation: hb_hashmap_t<unsigned int, Triple, false>::operator=(hb_hashmap_t<unsigned int, Triple, false> const&) Unexecuted instantiation: hb_hashmap_t<unsigned int, unsigned int, true>::operator=(hb_hashmap_t<unsigned int, unsigned int, true> const&) |
86 | | |
87 | | hb_hashmap_t (hb_hashmap_t&& o) noexcept : hb_hashmap_t () { hb_swap (*this, o); } |
88 | 0 | hb_hashmap_t& operator= (hb_hashmap_t&& o) noexcept { hb_swap (*this, o); return *this; }Unexecuted instantiation: hb_hashmap_t<unsigned int, unsigned int, true>::operator=(hb_hashmap_t<unsigned int, unsigned int, true>&&) Unexecuted instantiation: hb_hashmap_t<hb_vector_t<bool, false> const*, hb_vector_t<unsigned char, false>, false>::operator=(hb_hashmap_t<hb_vector_t<bool, false> const*, hb_vector_t<unsigned char, false>, false>&&) Unexecuted instantiation: hb_hashmap_t<hb_vector_t<bool, false> const*, unsigned int, false>::operator=(hb_hashmap_t<hb_vector_t<bool, false> const*, unsigned int, false>&&) Unexecuted instantiation: hb_hashmap_t<unsigned int, Triple, false>::operator=(hb_hashmap_t<unsigned int, Triple, false>&&) Unexecuted instantiation: hb_hashmap_t<OT::hb_depend_context_t::recurse_key_t, bool, false>::operator=(hb_hashmap_t<OT::hb_depend_context_t::recurse_key_t, bool, false>&&) Unexecuted instantiation: hb_hashmap_t<unsigned long, unsigned int, false>::operator=(hb_hashmap_t<unsigned long, unsigned int, false>&&) |
89 | | |
90 | | hb_hashmap_t (std::initializer_list<hb_pair_t<K, V>> lst) : hb_hashmap_t () |
91 | | { |
92 | | for (auto&& item : lst) |
93 | | set (item.first, item.second); |
94 | | } |
95 | | template <typename Iterable, |
96 | | hb_requires (hb_is_iterable (Iterable))> |
97 | | hb_hashmap_t (const Iterable &o) : hb_hashmap_t () |
98 | | { |
99 | | auto iter = hb_iter (o); |
100 | | if (iter.is_random_access_iterator || iter.has_fast_len) |
101 | | alloc (hb_len (iter)); |
102 | | hb_copy (iter, *this); |
103 | | } |
104 | | |
105 | | struct item_t |
106 | | { |
107 | | K key; |
108 | | uint32_t is_real_ : 1; |
109 | | uint32_t is_used_ : 1; |
110 | | uint32_t hash : 30; |
111 | | V value; |
112 | | |
113 | | item_t () : key (), |
114 | 0 | is_real_ (false), is_used_ (false), |
115 | 0 | hash (0), |
116 | 0 | value () {}Unexecuted instantiation: hb_hashmap_t<unsigned int, hb::unique_ptr<hb_set_t>, false>::item_t::item_t() Unexecuted instantiation: hb_hashmap_t<unsigned int, hb_set_t, false>::item_t::item_t() Unexecuted instantiation: hb_hashmap_t<unsigned int, unsigned int, true>::item_t::item_t() |
117 | | |
118 | | // Needed for https://github.com/harfbuzz/harfbuzz/issues/4138 |
119 | 0 | K& get_key () { return key; }Unexecuted instantiation: hb_hashmap_t<unsigned int, unsigned int, true>::item_t::get_key() Unexecuted instantiation: hb_hashmap_t<unsigned int, Triple, false>::item_t::get_key() Unexecuted instantiation: hb_hashmap_t<unsigned int, face_table_info_t, false>::item_t::get_key() Unexecuted instantiation: hb_hashmap_t<hb_ot_name_record_ids_t, hb_array_t<char const>, false>::item_t::get_key() |
120 | 0 | V& get_value () { return value; }Unexecuted instantiation: hb_hashmap_t<hb_ot_name_record_ids_t, hb_array_t<char const>, false>::item_t::get_value() Unexecuted instantiation: hb_hashmap_t<unsigned int, hb_vector_t<unsigned int, false>, false>::item_t::get_value() Unexecuted instantiation: hb_hashmap_t<unsigned int, unsigned int, true>::item_t::get_value() Unexecuted instantiation: hb_hashmap_t<unsigned int, hb_pair_t<unsigned int, int>, false>::item_t::get_value() Unexecuted instantiation: hb_hashmap_t<unsigned int, face_table_info_t, false>::item_t::get_value() |
121 | | |
122 | 10.5k | bool is_used () const { return is_used_; }hb_hashmap_t<unsigned int, unsigned int, true>::item_t::is_used() const Line | Count | Source | 122 | 10.5k | bool is_used () const { return is_used_; } |
Unexecuted instantiation: hb_hashmap_t<hb_serialize_context_t::object_t const*, unsigned int, false>::item_t::is_used() const Unexecuted instantiation: hb_hashmap_t<unsigned int, hb_vector_t<unsigned int, false>, false>::item_t::is_used() const Unexecuted instantiation: hb_hashmap_t<unsigned int, hb::shared_ptr<hb_set_t>, false>::item_t::is_used() const Unexecuted instantiation: hb_hashmap_t<unsigned int, OT::Feature const*, false>::item_t::is_used() const Unexecuted instantiation: hb_hashmap_t<unsigned int, hb::unique_ptr<hb_set_t>, false>::item_t::is_used() const Unexecuted instantiation: hb_hashmap_t<unsigned int, Triple, false>::item_t::is_used() const Unexecuted instantiation: hb_hashmap_t<unsigned int, TripleDistances, false>::item_t::is_used() const Unexecuted instantiation: hb_hashmap_t<unsigned long, hb_pair_t<unsigned int, int>, false>::item_t::is_used() const Unexecuted instantiation: hb_hashmap_t<unsigned int, hb_pair_t<unsigned int, int>, false>::item_t::is_used() const Unexecuted instantiation: hb_hashmap_t<hb::shared_ptr<hb_map_t>, unsigned int, false>::item_t::is_used() const Unexecuted instantiation: hb_hashmap_t<unsigned int, hb_pair_t<void const*, void const*>, false>::item_t::is_used() const Unexecuted instantiation: hb_hashmap_t<hb_vector_t<OT::HBFixed<OT::NumType<true, short, 2u>, 14u>, false> const*, unsigned int, false>::item_t::is_used() const Unexecuted instantiation: hb_hashmap_t<hb_hashmap_t<unsigned int, Triple, false> const*, unsigned int, false>::item_t::is_used() const Unexecuted instantiation: hb_hashmap_t<unsigned int, hb_vector_t<int, false> const*, false>::item_t::is_used() const Unexecuted instantiation: hb_hashmap_t<hb_set_t const*, unsigned int, false>::item_t::is_used() const Unexecuted instantiation: hb_hashmap_t<hb_array_t<OT::NumType<true, unsigned int, 4u> const>, unsigned int, false>::item_t::is_used() const Unexecuted instantiation: hb_hashmap_t<unsigned int, face_table_info_t, false>::item_t::is_used() const Unexecuted instantiation: hb_hashmap_t<unsigned int, unsigned int, false>::item_t::is_used() const Unexecuted instantiation: hb_hashmap_t<unsigned long, unsigned int, false>::item_t::is_used() const Unexecuted instantiation: hb_hashmap_t<OT::hb_depend_context_t::recurse_key_t, bool, false>::item_t::is_used() const Unexecuted instantiation: hb_hashmap_t<unsigned int, hb_set_t, false>::item_t::is_used() const Unexecuted instantiation: hb_hashmap_t<OT::hb_depend_context_t::glyph_set_cache_key_t, unsigned int, false>::item_t::is_used() const Unexecuted instantiation: hb_hashmap_t<OT::hb_depend_context_t::context_set_cache_key_t, unsigned int, false>::item_t::is_used() const Unexecuted instantiation: hb_hashmap_t<hb_ot_name_record_ids_t, hb_array_t<char const>, false>::item_t::is_used() const Unexecuted instantiation: hb_hashmap_t<hb_ot_name_record_ids_t, unsigned int, false>::item_t::is_used() const Unexecuted instantiation: hb_hashmap_t<OT::SVG::svg_id_span_t, hb_pair_t<unsigned int, unsigned int>, false>::item_t::is_used() const |
123 | 2.56k | void set_used (bool is_used) { is_used_ = is_used; }hb_hashmap_t<unsigned int, unsigned int, true>::item_t::set_used(bool) Line | Count | Source | 123 | 2.56k | void set_used (bool is_used) { is_used_ = is_used; } |
Unexecuted instantiation: hb_hashmap_t<hb_serialize_context_t::object_t const*, unsigned int, false>::item_t::set_used(bool) Unexecuted instantiation: hb_hashmap_t<unsigned int, hb_vector_t<unsigned int, false>, false>::item_t::set_used(bool) Unexecuted instantiation: hb_hashmap_t<unsigned int, hb::unique_ptr<hb_set_t>, false>::item_t::set_used(bool) Unexecuted instantiation: hb_hashmap_t<unsigned int, Triple, false>::item_t::set_used(bool) Unexecuted instantiation: hb_hashmap_t<unsigned long, hb_pair_t<unsigned int, int>, false>::item_t::set_used(bool) Unexecuted instantiation: hb_hashmap_t<hb::shared_ptr<hb_map_t>, unsigned int, false>::item_t::set_used(bool) Unexecuted instantiation: hb_hashmap_t<unsigned int, hb::shared_ptr<hb_set_t>, false>::item_t::set_used(bool) Unexecuted instantiation: hb_hashmap_t<unsigned int, OT::Feature const*, false>::item_t::set_used(bool) Unexecuted instantiation: hb_hashmap_t<hb_hashmap_t<unsigned int, Triple, false> const*, unsigned int, false>::item_t::set_used(bool) Unexecuted instantiation: hb_hashmap_t<unsigned int, hb_vector_t<int, false> const*, false>::item_t::set_used(bool) Unexecuted instantiation: hb_hashmap_t<hb_set_t const*, unsigned int, false>::item_t::set_used(bool) Unexecuted instantiation: hb_hashmap_t<hb_array_t<OT::NumType<true, unsigned int, 4u> const>, unsigned int, false>::item_t::set_used(bool) Unexecuted instantiation: hb_hashmap_t<unsigned int, hb_pair_t<unsigned int, int>, false>::item_t::set_used(bool) Unexecuted instantiation: hb_hashmap_t<unsigned int, face_table_info_t, false>::item_t::set_used(bool) Unexecuted instantiation: hb_hashmap_t<unsigned int, unsigned int, false>::item_t::set_used(bool) Unexecuted instantiation: hb_hashmap_t<unsigned long, unsigned int, false>::item_t::set_used(bool) Unexecuted instantiation: hb_hashmap_t<OT::hb_depend_context_t::recurse_key_t, bool, false>::item_t::set_used(bool) Unexecuted instantiation: hb_hashmap_t<unsigned int, hb_set_t, false>::item_t::set_used(bool) Unexecuted instantiation: hb_hashmap_t<OT::hb_depend_context_t::glyph_set_cache_key_t, unsigned int, false>::item_t::set_used(bool) Unexecuted instantiation: hb_hashmap_t<OT::hb_depend_context_t::context_set_cache_key_t, unsigned int, false>::item_t::set_used(bool) Unexecuted instantiation: hb_hashmap_t<hb_ot_name_record_ids_t, unsigned int, false>::item_t::set_used(bool) Unexecuted instantiation: hb_hashmap_t<OT::SVG::svg_id_span_t, hb_pair_t<unsigned int, unsigned int>, false>::item_t::set_used(bool) |
124 | 2.56k | void set_real (bool is_real) { is_real_ = is_real; }hb_hashmap_t<unsigned int, unsigned int, true>::item_t::set_real(bool) Line | Count | Source | 124 | 2.56k | void set_real (bool is_real) { is_real_ = is_real; } |
Unexecuted instantiation: hb_hashmap_t<hb_serialize_context_t::object_t const*, unsigned int, false>::item_t::set_real(bool) Unexecuted instantiation: hb_hashmap_t<unsigned int, hb_vector_t<unsigned int, false>, false>::item_t::set_real(bool) Unexecuted instantiation: hb_hashmap_t<unsigned int, hb::unique_ptr<hb_set_t>, false>::item_t::set_real(bool) Unexecuted instantiation: hb_hashmap_t<unsigned int, Triple, false>::item_t::set_real(bool) Unexecuted instantiation: hb_hashmap_t<unsigned long, hb_pair_t<unsigned int, int>, false>::item_t::set_real(bool) Unexecuted instantiation: hb_hashmap_t<hb::shared_ptr<hb_map_t>, unsigned int, false>::item_t::set_real(bool) Unexecuted instantiation: hb_hashmap_t<unsigned int, hb::shared_ptr<hb_set_t>, false>::item_t::set_real(bool) Unexecuted instantiation: hb_hashmap_t<unsigned int, OT::Feature const*, false>::item_t::set_real(bool) Unexecuted instantiation: hb_hashmap_t<hb_hashmap_t<unsigned int, Triple, false> const*, unsigned int, false>::item_t::set_real(bool) Unexecuted instantiation: hb_hashmap_t<unsigned int, hb_vector_t<int, false> const*, false>::item_t::set_real(bool) Unexecuted instantiation: hb_hashmap_t<hb_set_t const*, unsigned int, false>::item_t::set_real(bool) Unexecuted instantiation: hb_hashmap_t<hb_array_t<OT::NumType<true, unsigned int, 4u> const>, unsigned int, false>::item_t::set_real(bool) Unexecuted instantiation: hb_hashmap_t<unsigned int, hb_pair_t<unsigned int, int>, false>::item_t::set_real(bool) Unexecuted instantiation: hb_hashmap_t<unsigned int, face_table_info_t, false>::item_t::set_real(bool) Unexecuted instantiation: hb_hashmap_t<unsigned int, unsigned int, false>::item_t::set_real(bool) Unexecuted instantiation: hb_hashmap_t<unsigned long, unsigned int, false>::item_t::set_real(bool) Unexecuted instantiation: hb_hashmap_t<OT::hb_depend_context_t::recurse_key_t, bool, false>::item_t::set_real(bool) Unexecuted instantiation: hb_hashmap_t<unsigned int, hb_set_t, false>::item_t::set_real(bool) Unexecuted instantiation: hb_hashmap_t<OT::hb_depend_context_t::glyph_set_cache_key_t, unsigned int, false>::item_t::set_real(bool) Unexecuted instantiation: hb_hashmap_t<OT::hb_depend_context_t::context_set_cache_key_t, unsigned int, false>::item_t::set_real(bool) Unexecuted instantiation: hb_hashmap_t<hb_ot_name_record_ids_t, unsigned int, false>::item_t::set_real(bool) Unexecuted instantiation: hb_hashmap_t<OT::SVG::svg_id_span_t, hb_pair_t<unsigned int, unsigned int>, false>::item_t::set_real(bool) |
125 | 6.41k | bool is_real () const { return is_real_; }hb_hashmap_t<unsigned int, unsigned int, true>::item_t::is_real() const Line | Count | Source | 125 | 6.41k | bool is_real () const { return is_real_; } |
Unexecuted instantiation: hb_hashmap_t<hb_serialize_context_t::object_t const*, unsigned int, false>::item_t::is_real() const Unexecuted instantiation: hb_hashmap_t<hb_ot_name_record_ids_t, hb_array_t<char const>, false>::item_t::is_real() const Unexecuted instantiation: hb_hashmap_t<unsigned int, hb_vector_t<unsigned int, false>, false>::item_t::is_real() const Unexecuted instantiation: hb_hashmap_t<unsigned int, hb::shared_ptr<hb_set_t>, false>::item_t::is_real() const Unexecuted instantiation: hb_hashmap_t<unsigned int, OT::Feature const*, false>::item_t::is_real() const Unexecuted instantiation: hb_hashmap_t<unsigned int, hb::unique_ptr<hb_set_t>, false>::item_t::is_real() const Unexecuted instantiation: hb_hashmap_t<unsigned int, Triple, false>::item_t::is_real() const Unexecuted instantiation: hb_hashmap_t<unsigned int, TripleDistances, false>::item_t::is_real() const Unexecuted instantiation: hb_hashmap_t<unsigned long, hb_pair_t<unsigned int, int>, false>::item_t::is_real() const Unexecuted instantiation: hb_hashmap_t<unsigned int, hb_pair_t<unsigned int, int>, false>::item_t::is_real() const Unexecuted instantiation: hb_hashmap_t<hb::shared_ptr<hb_map_t>, unsigned int, false>::item_t::is_real() const Unexecuted instantiation: hb_hashmap_t<unsigned int, hb_pair_t<void const*, void const*>, false>::item_t::is_real() const Unexecuted instantiation: hb_hashmap_t<hb_vector_t<OT::HBFixed<OT::NumType<true, short, 2u>, 14u>, false> const*, unsigned int, false>::item_t::is_real() const Unexecuted instantiation: hb_hashmap_t<hb_hashmap_t<unsigned int, Triple, false> const*, unsigned int, false>::item_t::is_real() const Unexecuted instantiation: hb_hashmap_t<unsigned int, hb_vector_t<int, false> const*, false>::item_t::is_real() const Unexecuted instantiation: hb_hashmap_t<hb_set_t const*, unsigned int, false>::item_t::is_real() const Unexecuted instantiation: hb_hashmap_t<hb_array_t<OT::NumType<true, unsigned int, 4u> const>, unsigned int, false>::item_t::is_real() const Unexecuted instantiation: hb_hashmap_t<unsigned int, face_table_info_t, false>::item_t::is_real() const Unexecuted instantiation: hb_hashmap_t<unsigned int, unsigned int, false>::item_t::is_real() const Unexecuted instantiation: hb_hashmap_t<unsigned long, unsigned int, false>::item_t::is_real() const Unexecuted instantiation: hb_hashmap_t<OT::hb_depend_context_t::recurse_key_t, bool, false>::item_t::is_real() const Unexecuted instantiation: hb_hashmap_t<unsigned int, hb_set_t, false>::item_t::is_real() const Unexecuted instantiation: hb_hashmap_t<OT::hb_depend_context_t::glyph_set_cache_key_t, unsigned int, false>::item_t::is_real() const Unexecuted instantiation: hb_hashmap_t<OT::hb_depend_context_t::context_set_cache_key_t, unsigned int, false>::item_t::is_real() const Unexecuted instantiation: hb_hashmap_t<hb_ot_name_record_ids_t, unsigned int, false>::item_t::is_real() const Unexecuted instantiation: hb_hashmap_t<OT::SVG::svg_id_span_t, hb_pair_t<unsigned int, unsigned int>, false>::item_t::is_real() const |
126 | | |
127 | | template <bool v = minus_one, |
128 | | hb_enable_if (v == false)> |
129 | 0 | static const V& default_value () { return Null(V); };Unexecuted instantiation: _ZN12hb_hashmap_tIPKN22hb_serialize_context_t8object_tEjLb0EE6item_t13default_valueILb0ETnPNSt3__19enable_ifIXeqT_Lb0EEvE4typeELPv0EEERKjv Unexecuted instantiation: _ZN12hb_hashmap_tIjN2hb10unique_ptrI8hb_set_tEELb0EE6item_t13default_valueILb0ETnPNSt3__19enable_ifIXeqT_Lb0EEvE4typeELPv0EEERKS3_v Unexecuted instantiation: _ZN12hb_hashmap_tIjN2hb10shared_ptrI8hb_set_tEELb0EE6item_t13default_valueILb0ETnPNSt3__19enable_ifIXeqT_Lb0EEvE4typeELPv0EEERKS3_v Unexecuted instantiation: _ZN12hb_hashmap_tIj15TripleDistancesLb0EE6item_t13default_valueILb0ETnPNSt3__19enable_ifIXeqT_Lb0EEvE4typeELPv0EEERKS0_v Unexecuted instantiation: _ZN12hb_hashmap_tIj6TripleLb0EE6item_t13default_valueILb0ETnPNSt3__19enable_ifIXeqT_Lb0EEvE4typeELPv0EEERKS0_v Unexecuted instantiation: _ZN12hb_hashmap_tIj17face_table_info_tLb0EE6item_t13default_valueILb0ETnPNSt3__19enable_ifIXeqT_Lb0EEvE4typeELPv0EEERKS0_v Unexecuted instantiation: _ZN12hb_hashmap_tI23hb_ot_name_record_ids_t10hb_array_tIKcELb0EE6item_t13default_valueILb0ETnPNSt3__19enable_ifIXeqT_Lb0EEvE4typeELPv0EEERKS3_v |
130 | | template <bool v = minus_one, |
131 | | hb_enable_if (v == true)> |
132 | | static const V& default_value () |
133 | 241 | { |
134 | 241 | static_assert (hb_is_same (V, hb_codepoint_t), ""); |
135 | 241 | return minus_1; |
136 | 241 | }; |
137 | | |
138 | 5.38k | bool operator == (const K &o) const { return hb_deref (key) == hb_deref (o); }hb_hashmap_t<unsigned int, unsigned int, true>::item_t::operator==(unsigned int const&) const Line | Count | Source | 138 | 5.38k | bool operator == (const K &o) const { return hb_deref (key) == hb_deref (o); } |
Unexecuted instantiation: hb_hashmap_t<hb_serialize_context_t::object_t const*, unsigned int, false>::item_t::operator==(hb_serialize_context_t::object_t const* const&) const Unexecuted instantiation: hb_hashmap_t<unsigned int, hb_vector_t<unsigned int, false>, false>::item_t::operator==(unsigned int const&) const Unexecuted instantiation: hb_hashmap_t<unsigned int, hb::shared_ptr<hb_set_t>, false>::item_t::operator==(unsigned int const&) const Unexecuted instantiation: hb_hashmap_t<unsigned int, OT::Feature const*, false>::item_t::operator==(unsigned int const&) const Unexecuted instantiation: hb_hashmap_t<unsigned int, hb::unique_ptr<hb_set_t>, false>::item_t::operator==(unsigned int const&) const Unexecuted instantiation: hb_hashmap_t<unsigned int, Triple, false>::item_t::operator==(unsigned int const&) const Unexecuted instantiation: hb_hashmap_t<unsigned int, TripleDistances, false>::item_t::operator==(unsigned int const&) const Unexecuted instantiation: hb_hashmap_t<unsigned long, hb_pair_t<unsigned int, int>, false>::item_t::operator==(unsigned long const&) const Unexecuted instantiation: hb_hashmap_t<unsigned int, hb_pair_t<unsigned int, int>, false>::item_t::operator==(unsigned int const&) const Unexecuted instantiation: hb_hashmap_t<hb::shared_ptr<hb_map_t>, unsigned int, false>::item_t::operator==(hb::shared_ptr<hb_map_t> const&) const Unexecuted instantiation: hb_hashmap_t<unsigned int, hb_pair_t<void const*, void const*>, false>::item_t::operator==(unsigned int const&) const Unexecuted instantiation: hb_hashmap_t<hb_vector_t<OT::HBFixed<OT::NumType<true, short, 2u>, 14u>, false> const*, unsigned int, false>::item_t::operator==(hb_vector_t<OT::HBFixed<OT::NumType<true, short, 2u>, 14u>, false> const* const&) const Unexecuted instantiation: hb_hashmap_t<hb_hashmap_t<unsigned int, Triple, false> const*, unsigned int, false>::item_t::operator==(hb_hashmap_t<unsigned int, Triple, false> const* const&) const Unexecuted instantiation: hb_hashmap_t<unsigned int, hb_vector_t<int, false> const*, false>::item_t::operator==(unsigned int const&) const Unexecuted instantiation: hb_hashmap_t<hb_set_t const*, unsigned int, false>::item_t::operator==(hb_set_t const* const&) const Unexecuted instantiation: hb_hashmap_t<hb_array_t<OT::NumType<true, unsigned int, 4u> const>, unsigned int, false>::item_t::operator==(hb_array_t<OT::NumType<true, unsigned int, 4u> const> const&) const Unexecuted instantiation: hb_hashmap_t<unsigned int, face_table_info_t, false>::item_t::operator==(unsigned int const&) const Unexecuted instantiation: hb_hashmap_t<unsigned int, unsigned int, false>::item_t::operator==(unsigned int const&) const Unexecuted instantiation: hb_hashmap_t<unsigned long, unsigned int, false>::item_t::operator==(unsigned long const&) const Unexecuted instantiation: hb_hashmap_t<OT::hb_depend_context_t::recurse_key_t, bool, false>::item_t::operator==(OT::hb_depend_context_t::recurse_key_t const&) const Unexecuted instantiation: hb_hashmap_t<unsigned int, hb_set_t, false>::item_t::operator==(unsigned int const&) const Unexecuted instantiation: hb_hashmap_t<OT::hb_depend_context_t::glyph_set_cache_key_t, unsigned int, false>::item_t::operator==(OT::hb_depend_context_t::glyph_set_cache_key_t const&) const Unexecuted instantiation: hb_hashmap_t<OT::hb_depend_context_t::context_set_cache_key_t, unsigned int, false>::item_t::operator==(OT::hb_depend_context_t::context_set_cache_key_t const&) const Unexecuted instantiation: hb_hashmap_t<hb_ot_name_record_ids_t, hb_array_t<char const>, false>::item_t::operator==(hb_ot_name_record_ids_t const&) const Unexecuted instantiation: hb_hashmap_t<hb_ot_name_record_ids_t, unsigned int, false>::item_t::operator==(hb_ot_name_record_ids_t const&) const Unexecuted instantiation: hb_hashmap_t<OT::SVG::svg_id_span_t, hb_pair_t<unsigned int, unsigned int>, false>::item_t::operator==(OT::SVG::svg_id_span_t const&) const |
139 | | bool operator == (const item_t &o) const { return *this == o.key; } |
140 | 0 | hb_pair_t<K, V> get_pair() const { return hb_pair_t<K, V> (key, value); }Unexecuted instantiation: hb_hashmap_t<unsigned int, unsigned int, true>::item_t::get_pair() const Unexecuted instantiation: hb_hashmap_t<unsigned int, Triple, false>::item_t::get_pair() const Unexecuted instantiation: hb_hashmap_t<unsigned long, hb_pair_t<unsigned int, int>, false>::item_t::get_pair() const Unexecuted instantiation: hb_hashmap_t<unsigned int, hb_vector_t<int, false> const*, false>::item_t::get_pair() const Unexecuted instantiation: hb_hashmap_t<unsigned int, face_table_info_t, false>::item_t::get_pair() const |
141 | 0 | hb_pair_t<const K &, V &> get_pair_ref() { return hb_pair_t<const K &, V &> (key, value); }Unexecuted instantiation: hb_hashmap_t<unsigned int, hb_pair_t<unsigned int, int>, false>::item_t::get_pair_ref() Unexecuted instantiation: hb_hashmap_t<unsigned long, hb_pair_t<unsigned int, int>, false>::item_t::get_pair_ref() Unexecuted instantiation: hb_hashmap_t<unsigned int, unsigned int, true>::item_t::get_pair_ref() |
142 | | |
143 | | uint32_t total_hash () const |
144 | 0 | { return (hash * 31u) + hb_hash (value); }Unexecuted instantiation: hb_hashmap_t<unsigned int, unsigned int, true>::item_t::total_hash() const Unexecuted instantiation: hb_hashmap_t<unsigned int, Triple, false>::item_t::total_hash() const |
145 | | |
146 | | static constexpr bool is_trivially_constructible = (hb_is_trivially_constructible(K) && hb_is_trivially_constructible(V)); |
147 | | }; |
148 | | |
149 | | hb_object_header_t header; |
150 | | bool successful; /* Allocations successful */ |
151 | | unsigned short max_chain_length; |
152 | | unsigned int population; /* Not including tombstones. */ |
153 | | unsigned int occupancy; /* Including tombstones. */ |
154 | | unsigned int mask; |
155 | | unsigned int prime; |
156 | | item_t *items; |
157 | | |
158 | | friend void swap (hb_hashmap_t& a, hb_hashmap_t& b) noexcept |
159 | 0 | { |
160 | 0 | if (unlikely (!a.successful || !b.successful)) |
161 | 0 | return; |
162 | 0 | hb_swap (a.max_chain_length, b.max_chain_length); |
163 | 0 | hb_swap (a.population, b.population); |
164 | 0 | hb_swap (a.occupancy, b.occupancy); |
165 | 0 | hb_swap (a.mask, b.mask); |
166 | 0 | hb_swap (a.prime, b.prime); |
167 | 0 | hb_swap (a.items, b.items); |
168 | 0 | } Unexecuted instantiation: swap(hb_hashmap_t<unsigned int, unsigned int, true>&, hb_hashmap_t<unsigned int, unsigned int, true>&) Unexecuted instantiation: swap(hb_hashmap_t<unsigned int, Triple, false>&, hb_hashmap_t<unsigned int, Triple, false>&) Unexecuted instantiation: swap(hb_hashmap_t<hb_vector_t<bool, false> const*, hb_vector_t<unsigned char, false>, false>&, hb_hashmap_t<hb_vector_t<bool, false> const*, hb_vector_t<unsigned char, false>, false>&) Unexecuted instantiation: swap(hb_hashmap_t<hb_vector_t<bool, false> const*, unsigned int, false>&, hb_hashmap_t<hb_vector_t<bool, false> const*, unsigned int, false>&) Unexecuted instantiation: swap(hb_hashmap_t<OT::hb_depend_context_t::recurse_key_t, bool, false>&, hb_hashmap_t<OT::hb_depend_context_t::recurse_key_t, bool, false>&) Unexecuted instantiation: swap(hb_hashmap_t<unsigned long, unsigned int, false>&, hb_hashmap_t<unsigned long, unsigned int, false>&) |
169 | | void init () |
170 | 17.7k | { |
171 | 17.7k | hb_object_init (this); |
172 | | |
173 | 17.7k | successful = true; |
174 | 17.7k | max_chain_length = 0; |
175 | 17.7k | population = occupancy = 0; |
176 | 17.7k | mask = 0; |
177 | 17.7k | prime = 0; |
178 | 17.7k | items = nullptr; |
179 | 17.7k | } hb_hashmap_t<unsigned int, unsigned int, true>::init() Line | Count | Source | 170 | 17.7k | { | 171 | 17.7k | hb_object_init (this); | 172 | | | 173 | 17.7k | successful = true; | 174 | 17.7k | max_chain_length = 0; | 175 | 17.7k | population = occupancy = 0; | 176 | 17.7k | mask = 0; | 177 | 17.7k | prime = 0; | 178 | 17.7k | items = nullptr; | 179 | 17.7k | } |
Unexecuted instantiation: hb_hashmap_t<hb_serialize_context_t::object_t const*, unsigned int, false>::init() Unexecuted instantiation: hb_hashmap_t<unsigned int, hb::unique_ptr<hb_blob_t>, false>::init() Unexecuted instantiation: hb_hashmap_t<unsigned int, hb_vector_t<unsigned int, false>, false>::init() Unexecuted instantiation: hb_hashmap_t<unsigned int, Triple, false>::init() Unexecuted instantiation: hb_hashmap_t<hb_vector_t<bool, false> const*, hb_vector_t<unsigned char, false>, false>::init() Unexecuted instantiation: hb_hashmap_t<hb_vector_t<bool, false> const*, unsigned int, false>::init() Unexecuted instantiation: hb_hashmap_t<hb_hashmap_t<unsigned int, Triple, false> const*, unsigned int, false>::init() Unexecuted instantiation: hb_hashmap_t<unsigned int, hb_vector_t<int, false> const*, false>::init() Unexecuted instantiation: hb_hashmap_t<unsigned int, hb::unique_ptr<hb_set_t>, false>::init() Unexecuted instantiation: hb_hashmap_t<hb_set_t const*, unsigned int, false>::init() Unexecuted instantiation: hb_hashmap_t<hb_array_t<OT::NumType<true, unsigned int, 4u> const>, unsigned int, false>::init() Unexecuted instantiation: hb_hashmap_t<unsigned int, face_table_info_t, false>::init() Unexecuted instantiation: hb_hashmap_t<unsigned int, unsigned int, false>::init() Unexecuted instantiation: hb_hashmap_t<unsigned long, unsigned int, false>::init() Unexecuted instantiation: hb_hashmap_t<OT::hb_depend_context_t::recurse_key_t, bool, false>::init() Unexecuted instantiation: hb_hashmap_t<OT::hb_depend_context_t::glyph_set_cache_key_t, unsigned int, false>::init() Unexecuted instantiation: hb_hashmap_t<OT::hb_depend_context_t::context_set_cache_key_t, unsigned int, false>::init() Unexecuted instantiation: hb_hashmap_t<hb_ot_name_record_ids_t, unsigned int, false>::init() Unexecuted instantiation: hb_hashmap_t<OT::SVG::svg_id_span_t, hb_pair_t<unsigned int, unsigned int>, false>::init() Unexecuted instantiation: hb_hashmap_t<unsigned int, hb_set_t, false>::init() |
180 | | void fini () |
181 | 17.7k | { |
182 | 17.7k | hb_object_fini (this); |
183 | | |
184 | 17.7k | if (likely (items)) |
185 | 360 | { |
186 | 360 | unsigned size = mask + 1; |
187 | 4.90k | for (unsigned i = 0; i < size; i++) |
188 | 4.54k | items[i].~item_t (); |
189 | 360 | hb_free (items); |
190 | 360 | items = nullptr; |
191 | 360 | } |
192 | 17.7k | population = occupancy = 0; |
193 | 17.7k | } hb_hashmap_t<unsigned int, unsigned int, true>::fini() Line | Count | Source | 181 | 17.7k | { | 182 | 17.7k | hb_object_fini (this); | 183 | | | 184 | 17.7k | if (likely (items)) | 185 | 360 | { | 186 | 360 | unsigned size = mask + 1; | 187 | 4.90k | for (unsigned i = 0; i < size; i++) | 188 | 4.54k | items[i].~item_t (); | 189 | 360 | hb_free (items); | 190 | 360 | items = nullptr; | 191 | 360 | } | 192 | 17.7k | population = occupancy = 0; | 193 | 17.7k | } |
Unexecuted instantiation: hb_hashmap_t<hb_serialize_context_t::object_t const*, unsigned int, false>::fini() Unexecuted instantiation: hb_hashmap_t<unsigned int, Triple, false>::fini() Unexecuted instantiation: hb_hashmap_t<hb_ot_name_record_ids_t, hb_array_t<char const>, false>::fini() Unexecuted instantiation: hb_hashmap_t<unsigned int, hb_vector_t<unsigned int, false>, false>::fini() Unexecuted instantiation: hb_hashmap_t<unsigned int, hb::unique_ptr<hb_blob_t>, false>::fini() Unexecuted instantiation: hb_hashmap_t<hb_vector_t<bool, false> const*, hb_vector_t<unsigned char, false>, false>::fini() Unexecuted instantiation: hb_hashmap_t<hb_vector_t<bool, false> const*, unsigned int, false>::fini() Unexecuted instantiation: hb_hashmap_t<hb_hashmap_t<unsigned int, Triple, false> const*, unsigned int, false>::fini() Unexecuted instantiation: hb_hashmap_t<unsigned int, hb_vector_t<int, false> const*, false>::fini() Unexecuted instantiation: hb_hashmap_t<unsigned int, hb::unique_ptr<hb_set_t>, false>::fini() Unexecuted instantiation: hb_hashmap_t<hb_set_t const*, unsigned int, false>::fini() Unexecuted instantiation: hb_hashmap_t<hb_array_t<OT::NumType<true, unsigned int, 4u> const>, unsigned int, false>::fini() Unexecuted instantiation: hb_hashmap_t<unsigned int, face_table_info_t, false>::fini() Unexecuted instantiation: hb_hashmap_t<unsigned int, unsigned int, false>::fini() Unexecuted instantiation: hb_hashmap_t<OT::SVG::svg_id_span_t, hb_pair_t<unsigned int, unsigned int>, false>::fini() Unexecuted instantiation: hb_hashmap_t<unsigned long, unsigned int, false>::fini() Unexecuted instantiation: hb_hashmap_t<OT::hb_depend_context_t::recurse_key_t, bool, false>::fini() Unexecuted instantiation: hb_hashmap_t<OT::hb_depend_context_t::glyph_set_cache_key_t, unsigned int, false>::fini() Unexecuted instantiation: hb_hashmap_t<OT::hb_depend_context_t::context_set_cache_key_t, unsigned int, false>::fini() Unexecuted instantiation: hb_hashmap_t<hb_ot_name_record_ids_t, unsigned int, false>::fini() Unexecuted instantiation: hb_hashmap_t<unsigned int, hb_set_t, false>::fini() |
194 | | |
195 | | hb_hashmap_t& reset () |
196 | 0 | { |
197 | 0 | successful = true; |
198 | 0 | clear (); |
199 | 0 | return *this; |
200 | 0 | } Unexecuted instantiation: hb_hashmap_t<unsigned int, unsigned int, true>::reset() Unexecuted instantiation: hb_hashmap_t<unsigned int, Triple, false>::reset() |
201 | | |
202 | 0 | bool in_error () const { return !successful; }Unexecuted instantiation: hb_hashmap_t<hb_serialize_context_t::object_t const*, unsigned int, false>::in_error() const Unexecuted instantiation: hb_hashmap_t<unsigned int, Triple, false>::in_error() const Unexecuted instantiation: hb_hashmap_t<hb_ot_name_record_ids_t, hb_array_t<char const>, false>::in_error() const Unexecuted instantiation: hb_hashmap_t<unsigned int, unsigned int, true>::in_error() const Unexecuted instantiation: hb_hashmap_t<unsigned int, hb_vector_t<unsigned int, false>, false>::in_error() const Unexecuted instantiation: hb_hashmap_t<unsigned int, hb::unique_ptr<hb_blob_t>, false>::in_error() const Unexecuted instantiation: hb_hashmap_t<unsigned long, hb_pair_t<unsigned int, int>, false>::in_error() const Unexecuted instantiation: hb_hashmap_t<hb_hashmap_t<unsigned int, Triple, false> const*, unsigned int, false>::in_error() const Unexecuted instantiation: hb_hashmap_t<unsigned int, hb_vector_t<int, false> const*, false>::in_error() const Unexecuted instantiation: hb_hashmap_t<unsigned int, face_table_info_t, false>::in_error() const Unexecuted instantiation: hb_hashmap_t<unsigned int, hb::unique_ptr<hb_set_t>, false>::in_error() const Unexecuted instantiation: hb_hashmap_t<unsigned long, unsigned int, false>::in_error() const |
203 | | |
204 | | bool alloc (unsigned new_population = 0) |
205 | 491 | { |
206 | 491 | if (unlikely (!successful)) return false; |
207 | 491 | if (unlikely (population > 0x3FFFFFFFu || new_population > 0x3FFFFFFFu)) |
208 | 0 | { |
209 | | // Population sizes >0x3FFFFFFF will result in power |
210 | | // being larger than 31, which in turn leads to a new size |
211 | | // that overflows u32. |
212 | 0 | successful = false; |
213 | 0 | return false; |
214 | 0 | } |
215 | | |
216 | 491 | if (new_population != 0 && (new_population + new_population / 2) < mask) return true; |
217 | | |
218 | 489 | unsigned int power = hb_bit_storage (hb_max (hb_max ((unsigned) population, new_population) * 2, 4u)); |
219 | 489 | unsigned int new_size = 1u << power; |
220 | 489 | item_t *new_items = (item_t *) hb_malloc2 ((size_t) new_size, sizeof (item_t)); |
221 | 489 | if (unlikely (!new_items)) |
222 | 26 | { |
223 | 26 | successful = false; |
224 | 26 | return false; |
225 | 26 | } |
226 | 463 | if (!item_t::is_trivially_constructible) |
227 | 0 | for (auto &_ : hb_iter (new_items, new_size)) |
228 | 0 | new (&_) item_t (); |
229 | 463 | else |
230 | 463 | hb_memset (new_items, 0, (size_t) new_size * sizeof (item_t)); |
231 | | |
232 | 463 | unsigned int old_size = size (); |
233 | 463 | item_t *old_items = items; |
234 | | |
235 | | /* Switch to new, empty, array. */ |
236 | 463 | population = occupancy = 0; |
237 | 463 | mask = new_size - 1; |
238 | 463 | prime = prime_for (power); |
239 | 463 | max_chain_length = power * 2; |
240 | 463 | items = new_items; |
241 | | |
242 | | /* Insert back old items. */ |
243 | 2.12k | for (unsigned int i = 0; i < old_size; i++) |
244 | 1.66k | { |
245 | 1.66k | if (old_items[i].is_real ()) |
246 | 1.04k | { |
247 | 1.04k | set_with_hash (std::move (old_items[i].key), |
248 | 1.04k | old_items[i].hash, |
249 | 1.04k | std::move (old_items[i].value)); |
250 | 1.04k | } |
251 | 1.66k | } |
252 | 2.12k | for (unsigned int i = 0; i < old_size; i++) |
253 | 1.66k | old_items[i].~item_t (); |
254 | | |
255 | 463 | hb_free (old_items); |
256 | | |
257 | 463 | return true; |
258 | 489 | } Unexecuted instantiation: hb_hashmap_t<hb_serialize_context_t::object_t const*, unsigned int, false>::alloc(unsigned int) Unexecuted instantiation: hb_hashmap_t<unsigned int, hb_vector_t<unsigned int, false>, false>::alloc(unsigned int) hb_hashmap_t<unsigned int, unsigned int, true>::alloc(unsigned int) Line | Count | Source | 205 | 491 | { | 206 | 491 | if (unlikely (!successful)) return false; | 207 | 491 | if (unlikely (population > 0x3FFFFFFFu || new_population > 0x3FFFFFFFu)) | 208 | 0 | { | 209 | | // Population sizes >0x3FFFFFFF will result in power | 210 | | // being larger than 31, which in turn leads to a new size | 211 | | // that overflows u32. | 212 | 0 | successful = false; | 213 | 0 | return false; | 214 | 0 | } | 215 | | | 216 | 491 | if (new_population != 0 && (new_population + new_population / 2) < mask) return true; | 217 | | | 218 | 489 | unsigned int power = hb_bit_storage (hb_max (hb_max ((unsigned) population, new_population) * 2, 4u)); | 219 | 489 | unsigned int new_size = 1u << power; | 220 | 489 | item_t *new_items = (item_t *) hb_malloc2 ((size_t) new_size, sizeof (item_t)); | 221 | 489 | if (unlikely (!new_items)) | 222 | 26 | { | 223 | 26 | successful = false; | 224 | 26 | return false; | 225 | 26 | } | 226 | 463 | if (!item_t::is_trivially_constructible) | 227 | 0 | for (auto &_ : hb_iter (new_items, new_size)) | 228 | 0 | new (&_) item_t (); | 229 | 463 | else | 230 | 463 | hb_memset (new_items, 0, (size_t) new_size * sizeof (item_t)); | 231 | | | 232 | 463 | unsigned int old_size = size (); | 233 | 463 | item_t *old_items = items; | 234 | | | 235 | | /* Switch to new, empty, array. */ | 236 | 463 | population = occupancy = 0; | 237 | 463 | mask = new_size - 1; | 238 | 463 | prime = prime_for (power); | 239 | 463 | max_chain_length = power * 2; | 240 | 463 | items = new_items; | 241 | | | 242 | | /* Insert back old items. */ | 243 | 2.12k | for (unsigned int i = 0; i < old_size; i++) | 244 | 1.66k | { | 245 | 1.66k | if (old_items[i].is_real ()) | 246 | 1.04k | { | 247 | 1.04k | set_with_hash (std::move (old_items[i].key), | 248 | 1.04k | old_items[i].hash, | 249 | 1.04k | std::move (old_items[i].value)); | 250 | 1.04k | } | 251 | 1.66k | } | 252 | 2.12k | for (unsigned int i = 0; i < old_size; i++) | 253 | 1.66k | old_items[i].~item_t (); | 254 | | | 255 | 463 | hb_free (old_items); | 256 | | | 257 | 463 | return true; | 258 | 489 | } |
Unexecuted instantiation: hb_hashmap_t<unsigned int, hb::unique_ptr<hb_set_t>, false>::alloc(unsigned int) Unexecuted instantiation: hb_hashmap_t<unsigned int, Triple, false>::alloc(unsigned int) Unexecuted instantiation: hb_hashmap_t<unsigned long, hb_pair_t<unsigned int, int>, false>::alloc(unsigned int) Unexecuted instantiation: hb_hashmap_t<hb::shared_ptr<hb_map_t>, unsigned int, false>::alloc(unsigned int) Unexecuted instantiation: hb_hashmap_t<unsigned int, hb::shared_ptr<hb_set_t>, false>::alloc(unsigned int) Unexecuted instantiation: hb_hashmap_t<unsigned int, OT::Feature const*, false>::alloc(unsigned int) Unexecuted instantiation: hb_hashmap_t<hb_hashmap_t<unsigned int, Triple, false> const*, unsigned int, false>::alloc(unsigned int) Unexecuted instantiation: hb_hashmap_t<unsigned int, hb_vector_t<int, false> const*, false>::alloc(unsigned int) Unexecuted instantiation: hb_hashmap_t<hb_set_t const*, unsigned int, false>::alloc(unsigned int) Unexecuted instantiation: hb_hashmap_t<hb_array_t<OT::NumType<true, unsigned int, 4u> const>, unsigned int, false>::alloc(unsigned int) Unexecuted instantiation: hb_hashmap_t<unsigned int, hb_pair_t<unsigned int, int>, false>::alloc(unsigned int) Unexecuted instantiation: hb_hashmap_t<unsigned int, face_table_info_t, false>::alloc(unsigned int) Unexecuted instantiation: hb_hashmap_t<unsigned int, unsigned int, false>::alloc(unsigned int) Unexecuted instantiation: hb_hashmap_t<unsigned long, unsigned int, false>::alloc(unsigned int) Unexecuted instantiation: hb_hashmap_t<OT::hb_depend_context_t::recurse_key_t, bool, false>::alloc(unsigned int) Unexecuted instantiation: hb_hashmap_t<unsigned int, hb_set_t, false>::alloc(unsigned int) Unexecuted instantiation: hb_hashmap_t<OT::hb_depend_context_t::glyph_set_cache_key_t, unsigned int, false>::alloc(unsigned int) Unexecuted instantiation: hb_hashmap_t<OT::hb_depend_context_t::context_set_cache_key_t, unsigned int, false>::alloc(unsigned int) Unexecuted instantiation: hb_hashmap_t<hb_ot_name_record_ids_t, unsigned int, false>::alloc(unsigned int) Unexecuted instantiation: hb_hashmap_t<OT::SVG::svg_id_span_t, hb_pair_t<unsigned int, unsigned int>, false>::alloc(unsigned int) |
259 | | |
260 | | template <typename T> |
261 | | bool in_storage (const T &v) const |
262 | 968 | { |
263 | 968 | uintptr_t p = (uintptr_t) std::addressof (v); |
264 | 968 | return items && |
265 | 224 | (uintptr_t) items <= p && p < (uintptr_t) (items + size ()); |
266 | 968 | } bool hb_hashmap_t<unsigned int, unsigned int, true>::in_storage<unsigned int>(unsigned int const&) const Line | Count | Source | 262 | 968 | { | 263 | 968 | uintptr_t p = (uintptr_t) std::addressof (v); | 264 | 968 | return items && | 265 | 224 | (uintptr_t) items <= p && p < (uintptr_t) (items + size ()); | 266 | 968 | } |
Unexecuted instantiation: bool hb_hashmap_t<hb_serialize_context_t::object_t const*, unsigned int, false>::in_storage<hb_serialize_context_t::object_t*>(hb_serialize_context_t::object_t* const&) const Unexecuted instantiation: bool hb_hashmap_t<hb_serialize_context_t::object_t const*, unsigned int, false>::in_storage<unsigned int>(unsigned int const&) const Unexecuted instantiation: bool hb_hashmap_t<hb_serialize_context_t::object_t const*, unsigned int, false>::in_storage<hb_serialize_context_t::object_t const*>(hb_serialize_context_t::object_t const* const&) const Unexecuted instantiation: bool hb_hashmap_t<unsigned int, hb_vector_t<unsigned int, false>, false>::in_storage<unsigned int>(unsigned int const&) const Unexecuted instantiation: bool hb_hashmap_t<unsigned int, hb_vector_t<unsigned int, false>, false>::in_storage<hb_vector_t<unsigned int, false> >(hb_vector_t<unsigned int, false> const&) const Unexecuted instantiation: bool hb_hashmap_t<unsigned int, hb::unique_ptr<hb_set_t>, false>::in_storage<unsigned int>(unsigned int const&) const Unexecuted instantiation: bool hb_hashmap_t<unsigned int, hb::unique_ptr<hb_set_t>, false>::in_storage<hb::unique_ptr<hb_set_t> >(hb::unique_ptr<hb_set_t> const&) const Unexecuted instantiation: bool hb_hashmap_t<unsigned int, unsigned int, true>::in_storage<int>(int const&) const Unexecuted instantiation: bool hb_hashmap_t<unsigned int, Triple, false>::in_storage<unsigned int>(unsigned int const&) const Unexecuted instantiation: bool hb_hashmap_t<unsigned int, Triple, false>::in_storage<Triple>(Triple const&) const Unexecuted instantiation: bool hb_hashmap_t<unsigned long, hb_pair_t<unsigned int, int>, false>::in_storage<unsigned long>(unsigned long const&) const Unexecuted instantiation: bool hb_hashmap_t<unsigned long, hb_pair_t<unsigned int, int>, false>::in_storage<hb_pair_t<unsigned int, int> >(hb_pair_t<unsigned int, int> const&) const Unexecuted instantiation: bool hb_hashmap_t<hb::shared_ptr<hb_map_t>, unsigned int, false>::in_storage<hb::shared_ptr<hb_map_t> >(hb::shared_ptr<hb_map_t> const&) const Unexecuted instantiation: bool hb_hashmap_t<hb::shared_ptr<hb_map_t>, unsigned int, false>::in_storage<int>(int const&) const Unexecuted instantiation: bool hb_hashmap_t<hb::shared_ptr<hb_map_t>, unsigned int, false>::in_storage<unsigned int>(unsigned int const&) const Unexecuted instantiation: bool hb_hashmap_t<unsigned int, hb::shared_ptr<hb_set_t>, false>::in_storage<unsigned int>(unsigned int const&) const Unexecuted instantiation: bool hb_hashmap_t<unsigned int, hb::shared_ptr<hb_set_t>, false>::in_storage<hb::shared_ptr<hb_set_t> >(hb::shared_ptr<hb_set_t> const&) const Unexecuted instantiation: bool hb_hashmap_t<unsigned int, OT::Feature const*, false>::in_storage<unsigned int>(unsigned int const&) const Unexecuted instantiation: bool hb_hashmap_t<unsigned int, OT::Feature const*, false>::in_storage<OT::Feature const*>(OT::Feature const* const&) const Unexecuted instantiation: bool hb_hashmap_t<unsigned long, hb_pair_t<unsigned int, int>, false>::in_storage<hb_pair_t<unsigned int&, int&> >(hb_pair_t<unsigned int&, int&> const&) const Unexecuted instantiation: bool hb_hashmap_t<hb_hashmap_t<unsigned int, Triple, false> const*, unsigned int, false>::in_storage<hb_hashmap_t<unsigned int, Triple, false> const*>(hb_hashmap_t<unsigned int, Triple, false> const* const&) const Unexecuted instantiation: bool hb_hashmap_t<hb_hashmap_t<unsigned int, Triple, false> const*, unsigned int, false>::in_storage<unsigned int>(unsigned int const&) const Unexecuted instantiation: bool hb_hashmap_t<hb_hashmap_t<unsigned int, Triple, false> const*, unsigned int, false>::in_storage<int>(int const&) const Unexecuted instantiation: bool hb_hashmap_t<unsigned int, hb_vector_t<int, false> const*, false>::in_storage<unsigned int>(unsigned int const&) const Unexecuted instantiation: bool hb_hashmap_t<unsigned int, hb_vector_t<int, false> const*, false>::in_storage<hb_vector_t<int, false> const*>(hb_vector_t<int, false> const* const&) const Unexecuted instantiation: bool hb_hashmap_t<hb_set_t const*, unsigned int, false>::in_storage<hb_set_t const*>(hb_set_t const* const&) const Unexecuted instantiation: bool hb_hashmap_t<hb_set_t const*, unsigned int, false>::in_storage<unsigned int>(unsigned int const&) const Unexecuted instantiation: bool hb_hashmap_t<hb_array_t<OT::NumType<true, unsigned int, 4u> const>, unsigned int, false>::in_storage<hb_array_t<OT::NumType<true, unsigned int, 4u> const> >(hb_array_t<OT::NumType<true, unsigned int, 4u> const> const&) const Unexecuted instantiation: bool hb_hashmap_t<hb_array_t<OT::NumType<true, unsigned int, 4u> const>, unsigned int, false>::in_storage<unsigned int>(unsigned int const&) const Unexecuted instantiation: bool hb_hashmap_t<unsigned int, unsigned int, true>::in_storage<OT::OffsetTo<OT::ClipBox, OT::NumType<true, unsigned int, 3u>, void, true> >(OT::OffsetTo<OT::ClipBox, OT::NumType<true, unsigned int, 3u>, void, true> const&) const Unexecuted instantiation: bool hb_hashmap_t<unsigned int, hb_pair_t<unsigned int, int>, false>::in_storage<unsigned int>(unsigned int const&) const Unexecuted instantiation: bool hb_hashmap_t<unsigned int, hb_pair_t<unsigned int, int>, false>::in_storage<hb_pair_t<unsigned int, int&> >(hb_pair_t<unsigned int, int&> const&) const Unexecuted instantiation: bool hb_hashmap_t<unsigned int, hb_pair_t<unsigned int, int>, false>::in_storage<hb_pair_t<unsigned int, int> >(hb_pair_t<unsigned int, int> const&) const Unexecuted instantiation: bool hb_hashmap_t<unsigned int, face_table_info_t, false>::in_storage<unsigned int>(unsigned int const&) const Unexecuted instantiation: bool hb_hashmap_t<unsigned int, face_table_info_t, false>::in_storage<face_table_info_t>(face_table_info_t const&) const Unexecuted instantiation: bool hb_hashmap_t<unsigned int, unsigned int, false>::in_storage<unsigned int>(unsigned int const&) const Unexecuted instantiation: bool hb_hashmap_t<unsigned int, unsigned int, false>::in_storage<int>(int const&) const Unexecuted instantiation: bool hb_hashmap_t<unsigned long, unsigned int, false>::in_storage<unsigned long>(unsigned long const&) const Unexecuted instantiation: bool hb_hashmap_t<unsigned long, unsigned int, false>::in_storage<unsigned int>(unsigned int const&) const Unexecuted instantiation: bool hb_hashmap_t<OT::hb_depend_context_t::recurse_key_t, bool, false>::in_storage<OT::hb_depend_context_t::recurse_key_t>(OT::hb_depend_context_t::recurse_key_t const&) const Unexecuted instantiation: bool hb_hashmap_t<OT::hb_depend_context_t::recurse_key_t, bool, false>::in_storage<bool>(bool const&) const Unexecuted instantiation: bool hb_hashmap_t<unsigned int, hb_set_t, false>::in_storage<unsigned int>(unsigned int const&) const Unexecuted instantiation: bool hb_hashmap_t<unsigned int, hb_set_t, false>::in_storage<hb_set_t>(hb_set_t const&) const Unexecuted instantiation: bool hb_hashmap_t<OT::hb_depend_context_t::glyph_set_cache_key_t, unsigned int, false>::in_storage<OT::hb_depend_context_t::glyph_set_cache_key_t>(OT::hb_depend_context_t::glyph_set_cache_key_t const&) const Unexecuted instantiation: bool hb_hashmap_t<OT::hb_depend_context_t::glyph_set_cache_key_t, unsigned int, false>::in_storage<unsigned int>(unsigned int const&) const Unexecuted instantiation: bool hb_hashmap_t<OT::hb_depend_context_t::context_set_cache_key_t, unsigned int, false>::in_storage<OT::hb_depend_context_t::context_set_cache_key_t>(OT::hb_depend_context_t::context_set_cache_key_t const&) const Unexecuted instantiation: bool hb_hashmap_t<OT::hb_depend_context_t::context_set_cache_key_t, unsigned int, false>::in_storage<unsigned int>(unsigned int const&) const Unexecuted instantiation: bool hb_hashmap_t<hb_ot_name_record_ids_t, unsigned int, false>::in_storage<hb_ot_name_record_ids_t>(hb_ot_name_record_ids_t const&) const Unexecuted instantiation: bool hb_hashmap_t<hb_ot_name_record_ids_t, unsigned int, false>::in_storage<int>(int const&) const Unexecuted instantiation: bool hb_hashmap_t<hb_ot_name_record_ids_t, unsigned int, false>::in_storage<unsigned int>(unsigned int const&) const Unexecuted instantiation: bool hb_hashmap_t<OT::SVG::svg_id_span_t, hb_pair_t<unsigned int, unsigned int>, false>::in_storage<OT::SVG::svg_id_span_t>(OT::SVG::svg_id_span_t const&) const Unexecuted instantiation: bool hb_hashmap_t<OT::SVG::svg_id_span_t, hb_pair_t<unsigned int, unsigned int>, false>::in_storage<hb_pair_t<unsigned int, unsigned int> >(hb_pair_t<unsigned int, unsigned int> const&) const |
267 | | |
268 | | template <typename KK, typename VV> |
269 | | bool set_with_hash (KK&& key, uint32_t hash, VV&& value, bool overwrite = true) |
270 | 2.74k | { |
271 | 2.74k | if (unlikely (!successful)) return false; |
272 | 2.58k | if (unlikely ((occupancy + occupancy / 2) >= mask)) |
273 | 484 | { |
274 | | /* key or value may live in our own storage, eg. m.set (k, m.get (j)). |
275 | | * alloc() frees that storage, so copy them out first. */ |
276 | 484 | if (unlikely (in_storage (key) || in_storage (value))) |
277 | 0 | { |
278 | 0 | K key_copy; |
279 | 0 | key_copy = std::forward<KK> (key); |
280 | 0 | V value_copy; |
281 | 0 | value_copy = std::forward<VV> (value); |
282 | 0 | return set_with_hash (std::move (key_copy), hash, std::move (value_copy), overwrite); |
283 | 0 | } |
284 | 484 | if (unlikely (!alloc ())) return false; |
285 | 484 | } |
286 | | |
287 | 2.56k | hash &= 0x3FFFFFFF; // We only store lower 30bit of hash |
288 | 2.56k | unsigned int tombstone = (unsigned int) -1; |
289 | 2.56k | unsigned int i = hash % prime; |
290 | 2.56k | unsigned length = 0; |
291 | 2.56k | unsigned step = 0; |
292 | 3.85k | while (items[i].is_used ()) |
293 | 1.42k | { |
294 | 1.42k | if ((std::is_integral<K>::value || items[i].hash == hash) && |
295 | 1.42k | items[i] == key) |
296 | 128 | { |
297 | 128 | if (!overwrite) |
298 | 0 | return false; |
299 | 128 | else |
300 | 128 | break; |
301 | 128 | } |
302 | 1.29k | if (!items[i].is_real () && tombstone == (unsigned) -1) |
303 | 0 | tombstone = i; |
304 | 1.29k | i = (i + ++step) & mask; |
305 | 1.29k | length++; |
306 | 1.29k | } |
307 | | |
308 | 2.56k | item_t &item = items[tombstone == (unsigned) -1 ? i : tombstone]; |
309 | | |
310 | 2.56k | if (item.is_used ()) |
311 | 128 | { |
312 | 128 | occupancy--; |
313 | 128 | population -= item.is_real (); |
314 | 128 | } |
315 | | |
316 | 2.56k | item.key = std::forward<KK> (key); |
317 | 2.56k | item.value = std::forward<VV> (value); |
318 | 2.56k | item.hash = hash; |
319 | 2.56k | item.set_used (true); |
320 | 2.56k | item.set_real (true); |
321 | | |
322 | 2.56k | occupancy++; |
323 | 2.56k | population++; |
324 | | |
325 | 2.56k | if (unlikely (length > max_chain_length) && occupancy > mask / 8) |
326 | 7 | alloc (mask - 8); // This ensures we jump to next larger size |
327 | | |
328 | 2.56k | return true; |
329 | 2.56k | } Unexecuted instantiation: bool hb_hashmap_t<unsigned int, unsigned int, true>::set_with_hash<unsigned int const&, unsigned int const&>(unsigned int const&, unsigned int, unsigned int const&, bool) bool hb_hashmap_t<unsigned int, unsigned int, true>::set_with_hash<unsigned int, unsigned int>(unsigned int&&, unsigned int, unsigned int&&, bool) Line | Count | Source | 270 | 1.04k | { | 271 | 1.04k | if (unlikely (!successful)) return false; | 272 | 1.04k | if (unlikely ((occupancy + occupancy / 2) >= mask)) | 273 | 0 | { | 274 | | /* key or value may live in our own storage, eg. m.set (k, m.get (j)). | 275 | | * alloc() frees that storage, so copy them out first. */ | 276 | 0 | if (unlikely (in_storage (key) || in_storage (value))) | 277 | 0 | { | 278 | 0 | K key_copy; | 279 | 0 | key_copy = std::forward<KK> (key); | 280 | 0 | V value_copy; | 281 | 0 | value_copy = std::forward<VV> (value); | 282 | 0 | return set_with_hash (std::move (key_copy), hash, std::move (value_copy), overwrite); | 283 | 0 | } | 284 | 0 | if (unlikely (!alloc ())) return false; | 285 | 0 | } | 286 | | | 287 | 1.04k | hash &= 0x3FFFFFFF; // We only store lower 30bit of hash | 288 | 1.04k | unsigned int tombstone = (unsigned int) -1; | 289 | 1.04k | unsigned int i = hash % prime; | 290 | 1.04k | unsigned length = 0; | 291 | 1.04k | unsigned step = 0; | 292 | 1.29k | while (items[i].is_used ()) | 293 | 257 | { | 294 | 257 | if ((std::is_integral<K>::value || items[i].hash == hash) && | 295 | 257 | items[i] == key) | 296 | 0 | { | 297 | 0 | if (!overwrite) | 298 | 0 | return false; | 299 | 0 | else | 300 | 0 | break; | 301 | 0 | } | 302 | 257 | if (!items[i].is_real () && tombstone == (unsigned) -1) | 303 | 0 | tombstone = i; | 304 | 257 | i = (i + ++step) & mask; | 305 | 257 | length++; | 306 | 257 | } | 307 | | | 308 | 1.04k | item_t &item = items[tombstone == (unsigned) -1 ? i : tombstone]; | 309 | | | 310 | 1.04k | if (item.is_used ()) | 311 | 0 | { | 312 | 0 | occupancy--; | 313 | 0 | population -= item.is_real (); | 314 | 0 | } | 315 | | | 316 | 1.04k | item.key = std::forward<KK> (key); | 317 | 1.04k | item.value = std::forward<VV> (value); | 318 | 1.04k | item.hash = hash; | 319 | 1.04k | item.set_used (true); | 320 | 1.04k | item.set_real (true); | 321 | | | 322 | 1.04k | occupancy++; | 323 | 1.04k | population++; | 324 | | | 325 | 1.04k | if (unlikely (length > max_chain_length) && occupancy > mask / 8) | 326 | 0 | alloc (mask - 8); // This ensures we jump to next larger size | 327 | | | 328 | 1.04k | return true; | 329 | 1.04k | } |
Unexecuted instantiation: bool hb_hashmap_t<hb_serialize_context_t::object_t const*, unsigned int, false>::set_with_hash<hb_serialize_context_t::object_t*&, unsigned int&>(hb_serialize_context_t::object_t*&, unsigned int, unsigned int&, bool) Unexecuted instantiation: bool hb_hashmap_t<hb_serialize_context_t::object_t const*, unsigned int, false>::set_with_hash<hb_serialize_context_t::object_t const*, unsigned int>(hb_serialize_context_t::object_t const*&&, unsigned int, unsigned int&&, bool) Unexecuted instantiation: bool hb_hashmap_t<unsigned int, hb_vector_t<unsigned int, false>, false>::set_with_hash<unsigned int const&, hb_vector_t<unsigned int, false> >(unsigned int const&, unsigned int, hb_vector_t<unsigned int, false>&&, bool) Unexecuted instantiation: bool hb_hashmap_t<unsigned int, hb_vector_t<unsigned int, false>, false>::set_with_hash<unsigned int, hb_vector_t<unsigned int, false> >(unsigned int&&, unsigned int, hb_vector_t<unsigned int, false>&&, bool) bool hb_hashmap_t<unsigned int, unsigned int, true>::set_with_hash<unsigned int const&, unsigned int&>(unsigned int const&, unsigned int, unsigned int&, bool) Line | Count | Source | 270 | 1.70k | { | 271 | 1.70k | if (unlikely (!successful)) return false; | 272 | 1.54k | if (unlikely ((occupancy + occupancy / 2) >= mask)) | 273 | 484 | { | 274 | | /* key or value may live in our own storage, eg. m.set (k, m.get (j)). | 275 | | * alloc() frees that storage, so copy them out first. */ | 276 | 484 | if (unlikely (in_storage (key) || in_storage (value))) | 277 | 0 | { | 278 | 0 | K key_copy; | 279 | 0 | key_copy = std::forward<KK> (key); | 280 | 0 | V value_copy; | 281 | 0 | value_copy = std::forward<VV> (value); | 282 | 0 | return set_with_hash (std::move (key_copy), hash, std::move (value_copy), overwrite); | 283 | 0 | } | 284 | 484 | if (unlikely (!alloc ())) return false; | 285 | 484 | } | 286 | | | 287 | 1.52k | hash &= 0x3FFFFFFF; // We only store lower 30bit of hash | 288 | 1.52k | unsigned int tombstone = (unsigned int) -1; | 289 | 1.52k | unsigned int i = hash % prime; | 290 | 1.52k | unsigned length = 0; | 291 | 1.52k | unsigned step = 0; | 292 | 2.56k | while (items[i].is_used ()) | 293 | 1.16k | { | 294 | 1.16k | if ((std::is_integral<K>::value || items[i].hash == hash) && | 295 | 1.16k | items[i] == key) | 296 | 128 | { | 297 | 128 | if (!overwrite) | 298 | 0 | return false; | 299 | 128 | else | 300 | 128 | break; | 301 | 128 | } | 302 | 1.03k | if (!items[i].is_real () && tombstone == (unsigned) -1) | 303 | 0 | tombstone = i; | 304 | 1.03k | i = (i + ++step) & mask; | 305 | 1.03k | length++; | 306 | 1.03k | } | 307 | | | 308 | 1.52k | item_t &item = items[tombstone == (unsigned) -1 ? i : tombstone]; | 309 | | | 310 | 1.52k | if (item.is_used ()) | 311 | 128 | { | 312 | 128 | occupancy--; | 313 | 128 | population -= item.is_real (); | 314 | 128 | } | 315 | | | 316 | 1.52k | item.key = std::forward<KK> (key); | 317 | 1.52k | item.value = std::forward<VV> (value); | 318 | 1.52k | item.hash = hash; | 319 | 1.52k | item.set_used (true); | 320 | 1.52k | item.set_real (true); | 321 | | | 322 | 1.52k | occupancy++; | 323 | 1.52k | population++; | 324 | | | 325 | 1.52k | if (unlikely (length > max_chain_length) && occupancy > mask / 8) | 326 | 7 | alloc (mask - 8); // This ensures we jump to next larger size | 327 | | | 328 | 1.52k | return true; | 329 | 1.52k | } |
Unexecuted instantiation: bool hb_hashmap_t<unsigned int, unsigned int, true>::set_with_hash<unsigned int, unsigned int&>(unsigned int&&, unsigned int, unsigned int&, bool) Unexecuted instantiation: bool hb_hashmap_t<unsigned int, unsigned int, true>::set_with_hash<unsigned int const&, unsigned int>(unsigned int const&, unsigned int, unsigned int&&, bool) Unexecuted instantiation: bool hb_hashmap_t<unsigned int, hb::unique_ptr<hb_set_t>, false>::set_with_hash<unsigned int const&, hb::unique_ptr<hb_set_t> >(unsigned int const&, unsigned int, hb::unique_ptr<hb_set_t>&&, bool) Unexecuted instantiation: bool hb_hashmap_t<unsigned int, hb::unique_ptr<hb_set_t>, false>::set_with_hash<unsigned int, hb::unique_ptr<hb_set_t> >(unsigned int&&, unsigned int, hb::unique_ptr<hb_set_t>&&, bool) Unexecuted instantiation: bool hb_hashmap_t<unsigned int, unsigned int, true>::set_with_hash<unsigned int, int>(unsigned int&&, unsigned int, int&&, bool) Unexecuted instantiation: bool hb_hashmap_t<unsigned int, Triple, false>::set_with_hash<unsigned int const&, Triple>(unsigned int const&, unsigned int, Triple&&, bool) Unexecuted instantiation: bool hb_hashmap_t<unsigned int, Triple, false>::set_with_hash<unsigned int, Triple>(unsigned int&&, unsigned int, Triple&&, bool) Unexecuted instantiation: bool hb_hashmap_t<unsigned long, hb_pair_t<unsigned int, int>, false>::set_with_hash<unsigned long, hb_pair_t<unsigned int, int> >(unsigned long&&, unsigned int, hb_pair_t<unsigned int, int>&&, bool) Unexecuted instantiation: bool hb_hashmap_t<hb::shared_ptr<hb_map_t>, unsigned int, false>::set_with_hash<hb::shared_ptr<hb_map_t> const&, int>(hb::shared_ptr<hb_map_t> const&, unsigned int, int&&, bool) Unexecuted instantiation: bool hb_hashmap_t<hb::shared_ptr<hb_map_t>, unsigned int, false>::set_with_hash<hb::shared_ptr<hb_map_t>, unsigned int>(hb::shared_ptr<hb_map_t>&&, unsigned int, unsigned int&&, bool) Unexecuted instantiation: bool hb_hashmap_t<unsigned int, hb::shared_ptr<hb_set_t>, false>::set_with_hash<unsigned int const&, hb::shared_ptr<hb_set_t>&>(unsigned int const&, unsigned int, hb::shared_ptr<hb_set_t>&, bool) Unexecuted instantiation: bool hb_hashmap_t<unsigned int, hb::shared_ptr<hb_set_t>, false>::set_with_hash<unsigned int, hb::shared_ptr<hb_set_t> >(unsigned int&&, unsigned int, hb::shared_ptr<hb_set_t>&&, bool) Unexecuted instantiation: bool hb_hashmap_t<unsigned int, OT::Feature const*, false>::set_with_hash<unsigned int, OT::Feature const*>(unsigned int&&, unsigned int, OT::Feature const*&&, bool) Unexecuted instantiation: bool hb_hashmap_t<unsigned int, Triple, false>::set_with_hash<unsigned int const&, Triple const&>(unsigned int const&, unsigned int, Triple const&, bool) Unexecuted instantiation: bool hb_hashmap_t<unsigned int, Triple, false>::set_with_hash<unsigned int const&, Triple&>(unsigned int const&, unsigned int, Triple&, bool) Unexecuted instantiation: bool hb_hashmap_t<unsigned long, hb_pair_t<unsigned int, int>, false>::set_with_hash<unsigned long const&, hb_pair_t<unsigned int, int> >(unsigned long const&, unsigned int, hb_pair_t<unsigned int, int>&&, bool) Unexecuted instantiation: bool hb_hashmap_t<unsigned long, hb_pair_t<unsigned int, int>, false>::set_with_hash<unsigned long const&, hb_pair_t<unsigned int&, int&> >(unsigned long const&, unsigned int, hb_pair_t<unsigned int&, int&>&&, bool) Unexecuted instantiation: bool hb_hashmap_t<hb_hashmap_t<unsigned int, Triple, false> const*, unsigned int, false>::set_with_hash<hb_hashmap_t<unsigned int, Triple, false> const*, unsigned int>(hb_hashmap_t<unsigned int, Triple, false> const*&&, unsigned int, unsigned int&&, bool) Unexecuted instantiation: bool hb_hashmap_t<hb_hashmap_t<unsigned int, Triple, false> const*, unsigned int, false>::set_with_hash<hb_hashmap_t<unsigned int, Triple, false> const* const&, int>(hb_hashmap_t<unsigned int, Triple, false> const* const&, unsigned int, int&&, bool) Unexecuted instantiation: bool hb_hashmap_t<hb_hashmap_t<unsigned int, Triple, false> const*, unsigned int, false>::set_with_hash<hb_hashmap_t<unsigned int, Triple, false> const*, unsigned int&>(hb_hashmap_t<unsigned int, Triple, false> const*&&, unsigned int, unsigned int&, bool) Unexecuted instantiation: bool hb_hashmap_t<hb_hashmap_t<unsigned int, Triple, false> const*, unsigned int, false>::set_with_hash<hb_hashmap_t<unsigned int, Triple, false> const* const&, unsigned int&>(hb_hashmap_t<unsigned int, Triple, false> const* const&, unsigned int, unsigned int&, bool) Unexecuted instantiation: bool hb_hashmap_t<unsigned int, hb_vector_t<int, false> const*, false>::set_with_hash<unsigned int, hb_vector_t<int, false> const*>(unsigned int&&, unsigned int, hb_vector_t<int, false> const*&&, bool) Unexecuted instantiation: bool hb_hashmap_t<hb_set_t const*, unsigned int, false>::set_with_hash<hb_set_t const*, unsigned int&>(hb_set_t const*&&, unsigned int, unsigned int&, bool) Unexecuted instantiation: bool hb_hashmap_t<hb_set_t const*, unsigned int, false>::set_with_hash<hb_set_t const*, unsigned int>(hb_set_t const*&&, unsigned int, unsigned int&&, bool) Unexecuted instantiation: bool hb_hashmap_t<hb_array_t<OT::NumType<true, unsigned int, 4u> const>, unsigned int, false>::set_with_hash<hb_array_t<OT::NumType<true, unsigned int, 4u> const>, unsigned int&>(hb_array_t<OT::NumType<true, unsigned int, 4u> const>&&, unsigned int, unsigned int&, bool) Unexecuted instantiation: bool hb_hashmap_t<hb_array_t<OT::NumType<true, unsigned int, 4u> const>, unsigned int, false>::set_with_hash<hb_array_t<OT::NumType<true, unsigned int, 4u> const>, unsigned int>(hb_array_t<OT::NumType<true, unsigned int, 4u> const>&&, unsigned int, unsigned int&&, bool) Unexecuted instantiation: bool hb_hashmap_t<unsigned int, unsigned int, true>::set_with_hash<unsigned int const&, OT::OffsetTo<OT::ClipBox, OT::NumType<true, unsigned int, 3u>, void, true> const&>(unsigned int const&, unsigned int, OT::OffsetTo<OT::ClipBox, OT::NumType<true, unsigned int, 3u>, void, true> const&, bool) Unexecuted instantiation: bool hb_hashmap_t<unsigned int, hb_pair_t<unsigned int, int>, false>::set_with_hash<unsigned int&, hb_pair_t<unsigned int, int&> >(unsigned int&, unsigned int, hb_pair_t<unsigned int, int&>&&, bool) Unexecuted instantiation: bool hb_hashmap_t<unsigned int, hb_pair_t<unsigned int, int>, false>::set_with_hash<unsigned int, hb_pair_t<unsigned int, int> >(unsigned int&&, unsigned int, hb_pair_t<unsigned int, int>&&, bool) Unexecuted instantiation: bool hb_hashmap_t<unsigned int, face_table_info_t, false>::set_with_hash<unsigned int const&, face_table_info_t>(unsigned int const&, unsigned int, face_table_info_t&&, bool) Unexecuted instantiation: bool hb_hashmap_t<unsigned int, face_table_info_t, false>::set_with_hash<unsigned int, face_table_info_t>(unsigned int&&, unsigned int, face_table_info_t&&, bool) Unexecuted instantiation: bool hb_hashmap_t<unsigned int, unsigned int, false>::set_with_hash<unsigned int const&, int>(unsigned int const&, unsigned int, int&&, bool) Unexecuted instantiation: bool hb_hashmap_t<unsigned int, unsigned int, false>::set_with_hash<unsigned int, unsigned int>(unsigned int&&, unsigned int, unsigned int&&, bool) Unexecuted instantiation: bool hb_hashmap_t<unsigned long, unsigned int, false>::set_with_hash<unsigned long const&, unsigned int&>(unsigned long const&, unsigned int, unsigned int&, bool) Unexecuted instantiation: bool hb_hashmap_t<unsigned long, unsigned int, false>::set_with_hash<unsigned long, unsigned int>(unsigned long&&, unsigned int, unsigned int&&, bool) Unexecuted instantiation: bool hb_hashmap_t<OT::hb_depend_context_t::recurse_key_t, bool, false>::set_with_hash<OT::hb_depend_context_t::recurse_key_t const&, bool>(OT::hb_depend_context_t::recurse_key_t const&, unsigned int, bool&&, bool) Unexecuted instantiation: bool hb_hashmap_t<OT::hb_depend_context_t::recurse_key_t, bool, false>::set_with_hash<OT::hb_depend_context_t::recurse_key_t, bool>(OT::hb_depend_context_t::recurse_key_t&&, unsigned int, bool&&, bool) Unexecuted instantiation: bool hb_hashmap_t<unsigned int, hb_set_t, false>::set_with_hash<unsigned int const&, hb_set_t>(unsigned int const&, unsigned int, hb_set_t&&, bool) Unexecuted instantiation: bool hb_hashmap_t<unsigned int, hb_set_t, false>::set_with_hash<unsigned int, hb_set_t>(unsigned int&&, unsigned int, hb_set_t&&, bool) Unexecuted instantiation: bool hb_hashmap_t<OT::hb_depend_context_t::glyph_set_cache_key_t, unsigned int, false>::set_with_hash<OT::hb_depend_context_t::glyph_set_cache_key_t const&, unsigned int&>(OT::hb_depend_context_t::glyph_set_cache_key_t const&, unsigned int, unsigned int&, bool) Unexecuted instantiation: bool hb_hashmap_t<OT::hb_depend_context_t::glyph_set_cache_key_t, unsigned int, false>::set_with_hash<OT::hb_depend_context_t::glyph_set_cache_key_t, unsigned int>(OT::hb_depend_context_t::glyph_set_cache_key_t&&, unsigned int, unsigned int&&, bool) Unexecuted instantiation: bool hb_hashmap_t<OT::hb_depend_context_t::context_set_cache_key_t, unsigned int, false>::set_with_hash<OT::hb_depend_context_t::context_set_cache_key_t const&, unsigned int&>(OT::hb_depend_context_t::context_set_cache_key_t const&, unsigned int, unsigned int&, bool) Unexecuted instantiation: bool hb_hashmap_t<OT::hb_depend_context_t::context_set_cache_key_t, unsigned int, false>::set_with_hash<OT::hb_depend_context_t::context_set_cache_key_t, unsigned int>(OT::hb_depend_context_t::context_set_cache_key_t&&, unsigned int, unsigned int&&, bool) Unexecuted instantiation: bool hb_hashmap_t<hb_ot_name_record_ids_t, unsigned int, false>::set_with_hash<hb_ot_name_record_ids_t const&, int>(hb_ot_name_record_ids_t const&, unsigned int, int&&, bool) Unexecuted instantiation: bool hb_hashmap_t<hb_ot_name_record_ids_t, unsigned int, false>::set_with_hash<hb_ot_name_record_ids_t, unsigned int>(hb_ot_name_record_ids_t&&, unsigned int, unsigned int&&, bool) Unexecuted instantiation: bool hb_hashmap_t<unsigned long, unsigned int, false>::set_with_hash<unsigned long const&, unsigned int>(unsigned long const&, unsigned int, unsigned int&&, bool) Unexecuted instantiation: bool hb_hashmap_t<OT::SVG::svg_id_span_t, hb_pair_t<unsigned int, unsigned int>, false>::set_with_hash<OT::SVG::svg_id_span_t const&, hb_pair_t<unsigned int, unsigned int> >(OT::SVG::svg_id_span_t const&, unsigned int, hb_pair_t<unsigned int, unsigned int>&&, bool) Unexecuted instantiation: bool hb_hashmap_t<OT::SVG::svg_id_span_t, hb_pair_t<unsigned int, unsigned int>, false>::set_with_hash<OT::SVG::svg_id_span_t, hb_pair_t<unsigned int, unsigned int> >(OT::SVG::svg_id_span_t&&, unsigned int, hb_pair_t<unsigned int, unsigned int>&&, bool) |
330 | | |
331 | | template <typename VV> |
332 | 1.70k | bool set (const K &key, VV&& value, bool overwrite = true) { return set_with_hash (key, hb_hash (key), std::forward<VV> (value), overwrite); }Unexecuted instantiation: bool hb_hashmap_t<unsigned int, unsigned int, true>::set<unsigned int const&>(unsigned int const&, unsigned int const&, bool) Unexecuted instantiation: bool hb_hashmap_t<unsigned int, hb_vector_t<unsigned int, false>, false>::set<hb_vector_t<unsigned int, false> >(unsigned int const&, hb_vector_t<unsigned int, false>&&, bool) bool hb_hashmap_t<unsigned int, unsigned int, true>::set<unsigned int&>(unsigned int const&, unsigned int&, bool) Line | Count | Source | 332 | 1.70k | bool set (const K &key, VV&& value, bool overwrite = true) { return set_with_hash (key, hb_hash (key), std::forward<VV> (value), overwrite); } |
Unexecuted instantiation: bool hb_hashmap_t<unsigned int, unsigned int, true>::set<unsigned int>(unsigned int const&, unsigned int&&, bool) Unexecuted instantiation: bool hb_hashmap_t<unsigned int, hb::unique_ptr<hb_set_t>, false>::set<hb::unique_ptr<hb_set_t> >(unsigned int const&, hb::unique_ptr<hb_set_t>&&, bool) Unexecuted instantiation: bool hb_hashmap_t<unsigned int, Triple, false>::set<Triple>(unsigned int const&, Triple&&, bool) Unexecuted instantiation: bool hb_hashmap_t<hb::shared_ptr<hb_map_t>, unsigned int, false>::set<int>(hb::shared_ptr<hb_map_t> const&, int&&, bool) Unexecuted instantiation: bool hb_hashmap_t<unsigned int, hb::shared_ptr<hb_set_t>, false>::set<hb::shared_ptr<hb_set_t>&>(unsigned int const&, hb::shared_ptr<hb_set_t>&, bool) Unexecuted instantiation: bool hb_hashmap_t<unsigned int, Triple, false>::set<Triple const&>(unsigned int const&, Triple const&, bool) Unexecuted instantiation: bool hb_hashmap_t<unsigned int, Triple, false>::set<Triple&>(unsigned int const&, Triple&, bool) Unexecuted instantiation: bool hb_hashmap_t<unsigned long, hb_pair_t<unsigned int, int>, false>::set<hb_pair_t<unsigned int, int> >(unsigned long const&, hb_pair_t<unsigned int, int>&&, bool) Unexecuted instantiation: bool hb_hashmap_t<unsigned long, hb_pair_t<unsigned int, int>, false>::set<hb_pair_t<unsigned int&, int&> >(unsigned long const&, hb_pair_t<unsigned int&, int&>&&, bool) Unexecuted instantiation: bool hb_hashmap_t<hb_hashmap_t<unsigned int, Triple, false> const*, unsigned int, false>::set<int>(hb_hashmap_t<unsigned int, Triple, false> const* const&, int&&, bool) Unexecuted instantiation: bool hb_hashmap_t<hb_hashmap_t<unsigned int, Triple, false> const*, unsigned int, false>::set<unsigned int&>(hb_hashmap_t<unsigned int, Triple, false> const* const&, unsigned int&, bool) Unexecuted instantiation: bool hb_hashmap_t<unsigned int, unsigned int, true>::set<OT::OffsetTo<OT::ClipBox, OT::NumType<true, unsigned int, 3u>, void, true> const&>(unsigned int const&, OT::OffsetTo<OT::ClipBox, OT::NumType<true, unsigned int, 3u>, void, true> const&, bool) Unexecuted instantiation: bool hb_hashmap_t<unsigned int, face_table_info_t, false>::set<face_table_info_t>(unsigned int const&, face_table_info_t&&, bool) Unexecuted instantiation: bool hb_hashmap_t<unsigned int, unsigned int, false>::set<int>(unsigned int const&, int&&, bool) Unexecuted instantiation: bool hb_hashmap_t<unsigned long, unsigned int, false>::set<unsigned int&>(unsigned long const&, unsigned int&, bool) Unexecuted instantiation: bool hb_hashmap_t<OT::hb_depend_context_t::recurse_key_t, bool, false>::set<bool>(OT::hb_depend_context_t::recurse_key_t const&, bool&&, bool) Unexecuted instantiation: bool hb_hashmap_t<unsigned int, hb_set_t, false>::set<hb_set_t>(unsigned int const&, hb_set_t&&, bool) Unexecuted instantiation: bool hb_hashmap_t<OT::hb_depend_context_t::glyph_set_cache_key_t, unsigned int, false>::set<unsigned int&>(OT::hb_depend_context_t::glyph_set_cache_key_t const&, unsigned int&, bool) Unexecuted instantiation: bool hb_hashmap_t<OT::hb_depend_context_t::context_set_cache_key_t, unsigned int, false>::set<unsigned int&>(OT::hb_depend_context_t::context_set_cache_key_t const&, unsigned int&, bool) Unexecuted instantiation: bool hb_hashmap_t<hb_ot_name_record_ids_t, unsigned int, false>::set<int>(hb_ot_name_record_ids_t const&, int&&, bool) Unexecuted instantiation: bool hb_hashmap_t<unsigned long, unsigned int, false>::set<unsigned int>(unsigned long const&, unsigned int&&, bool) Unexecuted instantiation: bool hb_hashmap_t<OT::SVG::svg_id_span_t, hb_pair_t<unsigned int, unsigned int>, false>::set<hb_pair_t<unsigned int, unsigned int> >(OT::SVG::svg_id_span_t const&, hb_pair_t<unsigned int, unsigned int>&&, bool) |
333 | | template <typename VV> |
334 | | bool set (K &&key, VV&& value, bool overwrite = true) |
335 | 0 | { |
336 | 0 | uint32_t hash = hb_hash (key); |
337 | 0 | return set_with_hash (std::move (key), hash, std::forward<VV> (value), overwrite); |
338 | 0 | } Unexecuted instantiation: bool hb_hashmap_t<unsigned int, unsigned int, true>::set<unsigned int&>(unsigned int&&, unsigned int&, bool) Unexecuted instantiation: bool hb_hashmap_t<unsigned int, unsigned int, true>::set<int>(unsigned int&&, int&&, bool) Unexecuted instantiation: bool hb_hashmap_t<unsigned int, unsigned int, true>::set<unsigned int>(unsigned int&&, unsigned int&&, bool) Unexecuted instantiation: bool hb_hashmap_t<unsigned long, hb_pair_t<unsigned int, int>, false>::set<hb_pair_t<unsigned int, int> >(unsigned long&&, hb_pair_t<unsigned int, int>&&, bool) Unexecuted instantiation: bool hb_hashmap_t<unsigned int, OT::Feature const*, false>::set<OT::Feature const*>(unsigned int&&, OT::Feature const*&&, bool) Unexecuted instantiation: bool hb_hashmap_t<hb_hashmap_t<unsigned int, Triple, false> const*, unsigned int, false>::set<unsigned int>(hb_hashmap_t<unsigned int, Triple, false> const*&&, unsigned int&&, bool) Unexecuted instantiation: bool hb_hashmap_t<hb_hashmap_t<unsigned int, Triple, false> const*, unsigned int, false>::set<unsigned int&>(hb_hashmap_t<unsigned int, Triple, false> const*&&, unsigned int&, bool) Unexecuted instantiation: bool hb_hashmap_t<unsigned int, hb_vector_t<int, false> const*, false>::set<hb_vector_t<int, false> const*>(unsigned int&&, hb_vector_t<int, false> const*&&, bool) Unexecuted instantiation: bool hb_hashmap_t<unsigned int, hb::unique_ptr<hb_set_t>, false>::set<hb::unique_ptr<hb_set_t> >(unsigned int&&, hb::unique_ptr<hb_set_t>&&, bool) Unexecuted instantiation: bool hb_hashmap_t<hb_set_t const*, unsigned int, false>::set<unsigned int&>(hb_set_t const*&&, unsigned int&, bool) Unexecuted instantiation: bool hb_hashmap_t<hb_array_t<OT::NumType<true, unsigned int, 4u> const>, unsigned int, false>::set<unsigned int&>(hb_array_t<OT::NumType<true, unsigned int, 4u> const>&&, unsigned int&, bool) |
339 | | bool add (const K &key) |
340 | | { |
341 | | uint32_t hash = hb_hash (key); |
342 | | return set_with_hash (key, hash, item_t::default_value ()); |
343 | | } |
344 | | |
345 | | const V& get_with_hash (const K &key, uint32_t hash) const |
346 | 3.46k | { |
347 | 3.46k | if (!items) return item_t::default_value (); |
348 | 3.46k | auto *item = fetch_item (key, hash); |
349 | 3.46k | if (item) |
350 | 3.32k | return item->value; |
351 | 142 | return item_t::default_value (); |
352 | 3.46k | } Unexecuted instantiation: hb_hashmap_t<hb_serialize_context_t::object_t const*, unsigned int, false>::get_with_hash(hb_serialize_context_t::object_t const* const&, unsigned int) const hb_hashmap_t<unsigned int, unsigned int, true>::get_with_hash(unsigned int const&, unsigned int) const Line | Count | Source | 346 | 3.46k | { | 347 | 3.46k | if (!items) return item_t::default_value (); | 348 | 3.46k | auto *item = fetch_item (key, hash); | 349 | 3.46k | if (item) | 350 | 3.32k | return item->value; | 351 | 142 | return item_t::default_value (); | 352 | 3.46k | } |
Unexecuted instantiation: hb_hashmap_t<unsigned int, hb::unique_ptr<hb_set_t>, false>::get_with_hash(unsigned int const&, unsigned int) const Unexecuted instantiation: hb_hashmap_t<unsigned int, hb::shared_ptr<hb_set_t>, false>::get_with_hash(unsigned int const&, unsigned int) const Unexecuted instantiation: hb_hashmap_t<unsigned int, TripleDistances, false>::get_with_hash(unsigned int const&, unsigned int) const Unexecuted instantiation: hb_hashmap_t<unsigned int, Triple, false>::get_with_hash(unsigned int const&, unsigned int) const Unexecuted instantiation: hb_hashmap_t<unsigned int, face_table_info_t, false>::get_with_hash(unsigned int const&, unsigned int) const Unexecuted instantiation: hb_hashmap_t<hb_ot_name_record_ids_t, hb_array_t<char const>, false>::get_with_hash(hb_ot_name_record_ids_t const&, unsigned int) const |
353 | | const V& get (const K &key) const |
354 | 3.56k | { |
355 | 3.56k | if (!items) return item_t::default_value (); |
356 | 3.46k | return get_with_hash (key, hb_hash (key)); |
357 | 3.56k | } hb_hashmap_t<unsigned int, unsigned int, true>::get(unsigned int const&) const Line | Count | Source | 354 | 3.56k | { | 355 | 3.56k | if (!items) return item_t::default_value (); | 356 | 3.46k | return get_with_hash (key, hb_hash (key)); | 357 | 3.56k | } |
Unexecuted instantiation: hb_hashmap_t<unsigned int, hb::unique_ptr<hb_set_t>, false>::get(unsigned int const&) const Unexecuted instantiation: hb_hashmap_t<unsigned int, hb::shared_ptr<hb_set_t>, false>::get(unsigned int const&) const Unexecuted instantiation: hb_hashmap_t<unsigned int, TripleDistances, false>::get(unsigned int const&) const Unexecuted instantiation: hb_hashmap_t<unsigned int, Triple, false>::get(unsigned int const&) const Unexecuted instantiation: hb_hashmap_t<unsigned int, face_table_info_t, false>::get(unsigned int const&) const Unexecuted instantiation: hb_hashmap_t<hb_ot_name_record_ids_t, hb_array_t<char const>, false>::get(hb_ot_name_record_ids_t const&) const |
358 | | |
359 | | void del (const K &key) |
360 | 0 | { |
361 | 0 | if (!items) return; |
362 | 0 | auto *item = fetch_item (key, hb_hash (key)); |
363 | 0 | if (item) |
364 | 0 | { |
365 | 0 | item->set_real (false); |
366 | 0 | population--; |
367 | 0 | } |
368 | 0 | } Unexecuted instantiation: hb_hashmap_t<hb_serialize_context_t::object_t const*, unsigned int, false>::del(hb_serialize_context_t::object_t const* const&) Unexecuted instantiation: hb_hashmap_t<unsigned int, unsigned int, true>::del(unsigned int const&) Unexecuted instantiation: hb_hashmap_t<unsigned int, Triple, false>::del(unsigned int const&) Unexecuted instantiation: hb_hashmap_t<hb_hashmap_t<unsigned int, Triple, false> const*, unsigned int, false>::del(hb_hashmap_t<unsigned int, Triple, false> const* const&) Unexecuted instantiation: hb_hashmap_t<hb_set_t const*, unsigned int, false>::del(hb_set_t const* const&) |
369 | | |
370 | | /* Has interface. */ |
371 | 0 | const V& operator [] (K k) const { return get (k); }Unexecuted instantiation: hb_hashmap_t<unsigned int, unsigned int, true>::operator[](unsigned int) const Unexecuted instantiation: hb_hashmap_t<unsigned int, face_table_info_t, false>::operator[](unsigned int) const |
372 | | template <typename VV=V> |
373 | | bool has (const K &key, VV **vp = nullptr) const |
374 | 0 | { |
375 | 0 | if (!items) return false; |
376 | 0 | return has_with_hash (key, hb_hash (key), vp); |
377 | 0 | } Unexecuted instantiation: bool hb_hashmap_t<unsigned int, hb_vector_t<unsigned int, false>, false>::has<hb_vector_t<unsigned int, false> >(unsigned int const&, hb_vector_t<unsigned int, false>**) const Unexecuted instantiation: bool hb_hashmap_t<unsigned int, unsigned int, true>::has<unsigned int>(unsigned int const&, unsigned int**) const Unexecuted instantiation: bool hb_hashmap_t<unsigned int, unsigned int, true>::has<unsigned int const>(unsigned int const&, unsigned int const**) const Unexecuted instantiation: bool hb_hashmap_t<unsigned int, hb::shared_ptr<hb_set_t>, false>::has<hb::shared_ptr<hb_set_t> >(unsigned int const&, hb::shared_ptr<hb_set_t>**) const Unexecuted instantiation: bool hb_hashmap_t<unsigned int, OT::Feature const*, false>::has<OT::Feature const*>(unsigned int const&, OT::Feature const***) const Unexecuted instantiation: bool hb_hashmap_t<unsigned int, hb::unique_ptr<hb_set_t>, false>::has<hb::unique_ptr<hb_set_t> >(unsigned int const&, hb::unique_ptr<hb_set_t>**) const Unexecuted instantiation: bool hb_hashmap_t<unsigned int, Triple, false>::has<Triple>(unsigned int const&, Triple**) const Unexecuted instantiation: bool hb_hashmap_t<unsigned int, TripleDistances, false>::has<TripleDistances>(unsigned int const&, TripleDistances**) const Unexecuted instantiation: bool hb_hashmap_t<unsigned long, hb_pair_t<unsigned int, int>, false>::has<hb_pair_t<unsigned int, int> >(unsigned long const&, hb_pair_t<unsigned int, int>**) const Unexecuted instantiation: bool hb_hashmap_t<unsigned int, hb_pair_t<unsigned int, int>, false>::has<hb_pair_t<unsigned int, int> >(unsigned int const&, hb_pair_t<unsigned int, int>**) const Unexecuted instantiation: bool hb_hashmap_t<hb::shared_ptr<hb_map_t>, unsigned int, false>::has<unsigned int>(hb::shared_ptr<hb_map_t> const&, unsigned int**) const Unexecuted instantiation: bool hb_hashmap_t<unsigned int, hb_pair_t<void const*, void const*>, false>::has<hb_pair_t<void const*, void const*> >(unsigned int const&, hb_pair_t<void const*, void const*>**) const Unexecuted instantiation: bool hb_hashmap_t<hb_vector_t<OT::HBFixed<OT::NumType<true, short, 2u>, 14u>, false> const*, unsigned int, false>::has<unsigned int>(hb_vector_t<OT::HBFixed<OT::NumType<true, short, 2u>, 14u>, false> const* const&, unsigned int**) const Unexecuted instantiation: bool hb_hashmap_t<hb_hashmap_t<unsigned int, Triple, false> const*, unsigned int, false>::has<unsigned int>(hb_hashmap_t<unsigned int, Triple, false> const* const&, unsigned int**) const Unexecuted instantiation: bool hb_hashmap_t<hb_set_t const*, unsigned int, false>::has<unsigned int>(hb_set_t const* const&, unsigned int**) const Unexecuted instantiation: bool hb_hashmap_t<hb_array_t<OT::NumType<true, unsigned int, 4u> const>, unsigned int, false>::has<unsigned int>(hb_array_t<OT::NumType<true, unsigned int, 4u> const> const&, unsigned int**) const Unexecuted instantiation: bool hb_hashmap_t<unsigned int, face_table_info_t, false>::has<face_table_info_t>(unsigned int const&, face_table_info_t**) const Unexecuted instantiation: bool hb_hashmap_t<unsigned int, unsigned int, false>::has<unsigned int>(unsigned int const&, unsigned int**) const Unexecuted instantiation: bool hb_hashmap_t<unsigned long, unsigned int, false>::has<unsigned int>(unsigned long const&, unsigned int**) const Unexecuted instantiation: bool hb_hashmap_t<OT::hb_depend_context_t::recurse_key_t, bool, false>::has<bool>(OT::hb_depend_context_t::recurse_key_t const&, bool**) const Unexecuted instantiation: bool hb_hashmap_t<unsigned int, hb_set_t, false>::has<hb_set_t>(unsigned int const&, hb_set_t**) const Unexecuted instantiation: bool hb_hashmap_t<OT::hb_depend_context_t::glyph_set_cache_key_t, unsigned int, false>::has<unsigned int>(OT::hb_depend_context_t::glyph_set_cache_key_t const&, unsigned int**) const Unexecuted instantiation: bool hb_hashmap_t<OT::hb_depend_context_t::context_set_cache_key_t, unsigned int, false>::has<unsigned int>(OT::hb_depend_context_t::context_set_cache_key_t const&, unsigned int**) const Unexecuted instantiation: bool hb_hashmap_t<hb_ot_name_record_ids_t, hb_array_t<char const>, false>::has<hb_array_t<char const> >(hb_ot_name_record_ids_t const&, hb_array_t<char const>**) const Unexecuted instantiation: bool hb_hashmap_t<hb_ot_name_record_ids_t, unsigned int, false>::has<unsigned int>(hb_ot_name_record_ids_t const&, unsigned int**) const Unexecuted instantiation: bool hb_hashmap_t<OT::SVG::svg_id_span_t, hb_pair_t<unsigned int, unsigned int>, false>::has<hb_pair_t<unsigned int, unsigned int> >(OT::SVG::svg_id_span_t const&, hb_pair_t<unsigned int, unsigned int>**) const |
378 | | template <typename VV=V> |
379 | | bool has_with_hash (const K &key, uint32_t hash, VV **vp = nullptr) const |
380 | 0 | { |
381 | 0 | if (!items) return false; |
382 | 0 | auto *item = fetch_item (key, hash); |
383 | 0 | if (item) |
384 | 0 | { |
385 | 0 | if (vp) *vp = std::addressof (item->value); |
386 | 0 | return true; |
387 | 0 | } |
388 | 0 | return false; |
389 | 0 | } Unexecuted instantiation: bool hb_hashmap_t<unsigned int, hb_vector_t<unsigned int, false>, false>::has_with_hash<hb_vector_t<unsigned int, false> >(unsigned int const&, unsigned int, hb_vector_t<unsigned int, false>**) const Unexecuted instantiation: bool hb_hashmap_t<unsigned int, unsigned int, true>::has_with_hash<unsigned int>(unsigned int const&, unsigned int, unsigned int**) const Unexecuted instantiation: bool hb_hashmap_t<unsigned int, unsigned int, true>::has_with_hash<unsigned int const>(unsigned int const&, unsigned int, unsigned int const**) const Unexecuted instantiation: bool hb_hashmap_t<unsigned int, hb::shared_ptr<hb_set_t>, false>::has_with_hash<hb::shared_ptr<hb_set_t> >(unsigned int const&, unsigned int, hb::shared_ptr<hb_set_t>**) const Unexecuted instantiation: bool hb_hashmap_t<unsigned int, OT::Feature const*, false>::has_with_hash<OT::Feature const*>(unsigned int const&, unsigned int, OT::Feature const***) const Unexecuted instantiation: bool hb_hashmap_t<unsigned int, hb::unique_ptr<hb_set_t>, false>::has_with_hash<hb::unique_ptr<hb_set_t> >(unsigned int const&, unsigned int, hb::unique_ptr<hb_set_t>**) const Unexecuted instantiation: bool hb_hashmap_t<unsigned int, Triple, false>::has_with_hash<Triple>(unsigned int const&, unsigned int, Triple**) const Unexecuted instantiation: bool hb_hashmap_t<unsigned int, TripleDistances, false>::has_with_hash<TripleDistances>(unsigned int const&, unsigned int, TripleDistances**) const Unexecuted instantiation: bool hb_hashmap_t<unsigned long, hb_pair_t<unsigned int, int>, false>::has_with_hash<hb_pair_t<unsigned int, int> >(unsigned long const&, unsigned int, hb_pair_t<unsigned int, int>**) const Unexecuted instantiation: bool hb_hashmap_t<unsigned int, hb_pair_t<unsigned int, int>, false>::has_with_hash<hb_pair_t<unsigned int, int> >(unsigned int const&, unsigned int, hb_pair_t<unsigned int, int>**) const Unexecuted instantiation: bool hb_hashmap_t<hb::shared_ptr<hb_map_t>, unsigned int, false>::has_with_hash<unsigned int>(hb::shared_ptr<hb_map_t> const&, unsigned int, unsigned int**) const Unexecuted instantiation: bool hb_hashmap_t<unsigned int, hb_pair_t<void const*, void const*>, false>::has_with_hash<hb_pair_t<void const*, void const*> >(unsigned int const&, unsigned int, hb_pair_t<void const*, void const*>**) const Unexecuted instantiation: bool hb_hashmap_t<hb_vector_t<OT::HBFixed<OT::NumType<true, short, 2u>, 14u>, false> const*, unsigned int, false>::has_with_hash<unsigned int>(hb_vector_t<OT::HBFixed<OT::NumType<true, short, 2u>, 14u>, false> const* const&, unsigned int, unsigned int**) const Unexecuted instantiation: bool hb_hashmap_t<hb_hashmap_t<unsigned int, Triple, false> const*, unsigned int, false>::has_with_hash<unsigned int>(hb_hashmap_t<unsigned int, Triple, false> const* const&, unsigned int, unsigned int**) const Unexecuted instantiation: bool hb_hashmap_t<hb_set_t const*, unsigned int, false>::has_with_hash<unsigned int>(hb_set_t const* const&, unsigned int, unsigned int**) const Unexecuted instantiation: bool hb_hashmap_t<hb_array_t<OT::NumType<true, unsigned int, 4u> const>, unsigned int, false>::has_with_hash<unsigned int>(hb_array_t<OT::NumType<true, unsigned int, 4u> const> const&, unsigned int, unsigned int**) const Unexecuted instantiation: bool hb_hashmap_t<unsigned int, face_table_info_t, false>::has_with_hash<face_table_info_t>(unsigned int const&, unsigned int, face_table_info_t**) const Unexecuted instantiation: bool hb_hashmap_t<unsigned int, unsigned int, false>::has_with_hash<unsigned int>(unsigned int const&, unsigned int, unsigned int**) const Unexecuted instantiation: bool hb_hashmap_t<unsigned long, unsigned int, false>::has_with_hash<unsigned int>(unsigned long const&, unsigned int, unsigned int**) const Unexecuted instantiation: bool hb_hashmap_t<OT::hb_depend_context_t::recurse_key_t, bool, false>::has_with_hash<bool>(OT::hb_depend_context_t::recurse_key_t const&, unsigned int, bool**) const Unexecuted instantiation: bool hb_hashmap_t<unsigned int, hb_set_t, false>::has_with_hash<hb_set_t>(unsigned int const&, unsigned int, hb_set_t**) const Unexecuted instantiation: bool hb_hashmap_t<OT::hb_depend_context_t::glyph_set_cache_key_t, unsigned int, false>::has_with_hash<unsigned int>(OT::hb_depend_context_t::glyph_set_cache_key_t const&, unsigned int, unsigned int**) const Unexecuted instantiation: bool hb_hashmap_t<OT::hb_depend_context_t::context_set_cache_key_t, unsigned int, false>::has_with_hash<unsigned int>(OT::hb_depend_context_t::context_set_cache_key_t const&, unsigned int, unsigned int**) const Unexecuted instantiation: bool hb_hashmap_t<hb_ot_name_record_ids_t, hb_array_t<char const>, false>::has_with_hash<hb_array_t<char const> >(hb_ot_name_record_ids_t const&, unsigned int, hb_array_t<char const>**) const Unexecuted instantiation: bool hb_hashmap_t<hb_ot_name_record_ids_t, unsigned int, false>::has_with_hash<unsigned int>(hb_ot_name_record_ids_t const&, unsigned int, unsigned int**) const Unexecuted instantiation: bool hb_hashmap_t<OT::SVG::svg_id_span_t, hb_pair_t<unsigned int, unsigned int>, false>::has_with_hash<hb_pair_t<unsigned int, unsigned int> >(OT::SVG::svg_id_span_t const&, unsigned int, hb_pair_t<unsigned int, unsigned int>**) const |
390 | | item_t *fetch_item (const K &key, uint32_t hash) const |
391 | 3.46k | { |
392 | 3.46k | hash &= 0x3FFFFFFF; // We only store lower 30bit of hash |
393 | 3.46k | unsigned int i = hash % prime; |
394 | 3.46k | unsigned step = 0; |
395 | 4.10k | while (items[i].is_used ()) |
396 | 3.95k | { |
397 | 3.95k | if ((std::is_integral<K>::value || items[i].hash == hash) && |
398 | 3.95k | items[i] == key) |
399 | 3.32k | { |
400 | 3.32k | if (items[i].is_real ()) |
401 | 3.32k | return &items[i]; |
402 | 0 | else |
403 | 0 | return nullptr; |
404 | 3.32k | } |
405 | 631 | i = (i + ++step) & mask; |
406 | 631 | } |
407 | 142 | return nullptr; |
408 | 3.46k | } Unexecuted instantiation: hb_hashmap_t<hb_serialize_context_t::object_t const*, unsigned int, false>::fetch_item(hb_serialize_context_t::object_t const* const&, unsigned int) const Unexecuted instantiation: hb_hashmap_t<unsigned int, hb_vector_t<unsigned int, false>, false>::fetch_item(unsigned int const&, unsigned int) const hb_hashmap_t<unsigned int, unsigned int, true>::fetch_item(unsigned int const&, unsigned int) const Line | Count | Source | 391 | 3.46k | { | 392 | 3.46k | hash &= 0x3FFFFFFF; // We only store lower 30bit of hash | 393 | 3.46k | unsigned int i = hash % prime; | 394 | 3.46k | unsigned step = 0; | 395 | 4.10k | while (items[i].is_used ()) | 396 | 3.95k | { | 397 | 3.95k | if ((std::is_integral<K>::value || items[i].hash == hash) && | 398 | 3.95k | items[i] == key) | 399 | 3.32k | { | 400 | 3.32k | if (items[i].is_real ()) | 401 | 3.32k | return &items[i]; | 402 | 0 | else | 403 | 0 | return nullptr; | 404 | 3.32k | } | 405 | 631 | i = (i + ++step) & mask; | 406 | 631 | } | 407 | 142 | return nullptr; | 408 | 3.46k | } |
Unexecuted instantiation: hb_hashmap_t<unsigned int, hb::shared_ptr<hb_set_t>, false>::fetch_item(unsigned int const&, unsigned int) const Unexecuted instantiation: hb_hashmap_t<unsigned int, OT::Feature const*, false>::fetch_item(unsigned int const&, unsigned int) const Unexecuted instantiation: hb_hashmap_t<unsigned int, hb::unique_ptr<hb_set_t>, false>::fetch_item(unsigned int const&, unsigned int) const Unexecuted instantiation: hb_hashmap_t<unsigned int, Triple, false>::fetch_item(unsigned int const&, unsigned int) const Unexecuted instantiation: hb_hashmap_t<unsigned int, TripleDistances, false>::fetch_item(unsigned int const&, unsigned int) const Unexecuted instantiation: hb_hashmap_t<unsigned long, hb_pair_t<unsigned int, int>, false>::fetch_item(unsigned long const&, unsigned int) const Unexecuted instantiation: hb_hashmap_t<unsigned int, hb_pair_t<unsigned int, int>, false>::fetch_item(unsigned int const&, unsigned int) const Unexecuted instantiation: hb_hashmap_t<hb::shared_ptr<hb_map_t>, unsigned int, false>::fetch_item(hb::shared_ptr<hb_map_t> const&, unsigned int) const Unexecuted instantiation: hb_hashmap_t<unsigned int, hb_pair_t<void const*, void const*>, false>::fetch_item(unsigned int const&, unsigned int) const Unexecuted instantiation: hb_hashmap_t<hb_vector_t<OT::HBFixed<OT::NumType<true, short, 2u>, 14u>, false> const*, unsigned int, false>::fetch_item(hb_vector_t<OT::HBFixed<OT::NumType<true, short, 2u>, 14u>, false> const* const&, unsigned int) const Unexecuted instantiation: hb_hashmap_t<hb_hashmap_t<unsigned int, Triple, false> const*, unsigned int, false>::fetch_item(hb_hashmap_t<unsigned int, Triple, false> const* const&, unsigned int) const Unexecuted instantiation: hb_hashmap_t<hb_set_t const*, unsigned int, false>::fetch_item(hb_set_t const* const&, unsigned int) const Unexecuted instantiation: hb_hashmap_t<hb_array_t<OT::NumType<true, unsigned int, 4u> const>, unsigned int, false>::fetch_item(hb_array_t<OT::NumType<true, unsigned int, 4u> const> const&, unsigned int) const Unexecuted instantiation: hb_hashmap_t<unsigned int, face_table_info_t, false>::fetch_item(unsigned int const&, unsigned int) const Unexecuted instantiation: hb_hashmap_t<unsigned int, unsigned int, false>::fetch_item(unsigned int const&, unsigned int) const Unexecuted instantiation: hb_hashmap_t<unsigned long, unsigned int, false>::fetch_item(unsigned long const&, unsigned int) const Unexecuted instantiation: hb_hashmap_t<OT::hb_depend_context_t::recurse_key_t, bool, false>::fetch_item(OT::hb_depend_context_t::recurse_key_t const&, unsigned int) const Unexecuted instantiation: hb_hashmap_t<unsigned int, hb_set_t, false>::fetch_item(unsigned int const&, unsigned int) const Unexecuted instantiation: hb_hashmap_t<OT::hb_depend_context_t::glyph_set_cache_key_t, unsigned int, false>::fetch_item(OT::hb_depend_context_t::glyph_set_cache_key_t const&, unsigned int) const Unexecuted instantiation: hb_hashmap_t<OT::hb_depend_context_t::context_set_cache_key_t, unsigned int, false>::fetch_item(OT::hb_depend_context_t::context_set_cache_key_t const&, unsigned int) const Unexecuted instantiation: hb_hashmap_t<hb_ot_name_record_ids_t, hb_array_t<char const>, false>::fetch_item(hb_ot_name_record_ids_t const&, unsigned int) const Unexecuted instantiation: hb_hashmap_t<hb_ot_name_record_ids_t, unsigned int, false>::fetch_item(hb_ot_name_record_ids_t const&, unsigned int) const Unexecuted instantiation: hb_hashmap_t<OT::SVG::svg_id_span_t, hb_pair_t<unsigned int, unsigned int>, false>::fetch_item(OT::SVG::svg_id_span_t const&, unsigned int) const |
409 | | /* Projection. */ |
410 | | const V& operator () (K k) const { return get (k); } |
411 | | |
412 | 687 | unsigned size () const { return mask ? mask + 1 : 0; }hb_hashmap_t<unsigned int, unsigned int, true>::size() const Line | Count | Source | 412 | 687 | unsigned size () const { return mask ? mask + 1 : 0; } |
Unexecuted instantiation: hb_hashmap_t<hb_serialize_context_t::object_t const*, unsigned int, false>::size() const Unexecuted instantiation: hb_hashmap_t<hb_ot_name_record_ids_t, hb_array_t<char const>, false>::size() const Unexecuted instantiation: hb_hashmap_t<unsigned int, hb_vector_t<unsigned int, false>, false>::size() const Unexecuted instantiation: hb_hashmap_t<unsigned int, hb::unique_ptr<hb_set_t>, false>::size() const Unexecuted instantiation: hb_hashmap_t<unsigned int, Triple, false>::size() const Unexecuted instantiation: hb_hashmap_t<unsigned long, hb_pair_t<unsigned int, int>, false>::size() const Unexecuted instantiation: hb_hashmap_t<hb::shared_ptr<hb_map_t>, unsigned int, false>::size() const Unexecuted instantiation: hb_hashmap_t<unsigned int, hb::shared_ptr<hb_set_t>, false>::size() const Unexecuted instantiation: hb_hashmap_t<unsigned int, OT::Feature const*, false>::size() const Unexecuted instantiation: hb_hashmap_t<hb_hashmap_t<unsigned int, Triple, false> const*, unsigned int, false>::size() const Unexecuted instantiation: hb_hashmap_t<unsigned int, hb_vector_t<int, false> const*, false>::size() const Unexecuted instantiation: hb_hashmap_t<unsigned int, hb_pair_t<unsigned int, int>, false>::size() const Unexecuted instantiation: hb_hashmap_t<hb_set_t const*, unsigned int, false>::size() const Unexecuted instantiation: hb_hashmap_t<hb_array_t<OT::NumType<true, unsigned int, 4u> const>, unsigned int, false>::size() const Unexecuted instantiation: hb_hashmap_t<unsigned int, face_table_info_t, false>::size() const Unexecuted instantiation: hb_hashmap_t<unsigned int, unsigned int, false>::size() const Unexecuted instantiation: hb_hashmap_t<unsigned long, unsigned int, false>::size() const Unexecuted instantiation: hb_hashmap_t<OT::hb_depend_context_t::recurse_key_t, bool, false>::size() const Unexecuted instantiation: hb_hashmap_t<unsigned int, hb_set_t, false>::size() const Unexecuted instantiation: hb_hashmap_t<OT::hb_depend_context_t::glyph_set_cache_key_t, unsigned int, false>::size() const Unexecuted instantiation: hb_hashmap_t<OT::hb_depend_context_t::context_set_cache_key_t, unsigned int, false>::size() const Unexecuted instantiation: hb_hashmap_t<hb_ot_name_record_ids_t, unsigned int, false>::size() const Unexecuted instantiation: hb_hashmap_t<OT::SVG::svg_id_span_t, hb_pair_t<unsigned int, unsigned int>, false>::size() const |
413 | | |
414 | | void clear () |
415 | 0 | { |
416 | | /* Early-out on already-empty. Protects the Null singleton |
417 | | * (zero-initialized) from any writes. Any non-empty hashmap |
418 | | * is a real heap instance with writable items, so clearing |
419 | | * under !successful is safe. */ |
420 | 0 | if (!population && !occupancy) return; |
421 | | |
422 | 0 | for (auto &_ : hb_iter (items, size ())) |
423 | 0 | { |
424 | | /* Reconstruct items. */ |
425 | 0 | _.~item_t (); |
426 | 0 | new (&_) item_t (); |
427 | 0 | } |
428 | |
|
429 | 0 | population = occupancy = 0; |
430 | 0 | } Unexecuted instantiation: hb_hashmap_t<unsigned int, unsigned int, true>::clear() Unexecuted instantiation: hb_hashmap_t<unsigned int, Triple, false>::clear() Unexecuted instantiation: hb_hashmap_t<unsigned long, hb_pair_t<unsigned int, int>, false>::clear() Unexecuted instantiation: hb_hashmap_t<OT::hb_depend_context_t::recurse_key_t, bool, false>::clear() Unexecuted instantiation: hb_hashmap_t<unsigned long, unsigned int, false>::clear() |
431 | | |
432 | 0 | bool is_empty () const { return population == 0; }Unexecuted instantiation: hb_hashmap_t<unsigned int, unsigned int, true>::is_empty() const Unexecuted instantiation: hb_hashmap_t<unsigned int, Triple, false>::is_empty() const Unexecuted instantiation: hb_hashmap_t<unsigned int, hb::shared_ptr<hb_set_t>, false>::is_empty() const Unexecuted instantiation: hb_hashmap_t<unsigned long, hb_pair_t<unsigned int, int>, false>::is_empty() const Unexecuted instantiation: hb_hashmap_t<hb_hashmap_t<unsigned int, Triple, false> const*, unsigned int, false>::is_empty() const Unexecuted instantiation: hb_hashmap_t<unsigned int, hb_pair_t<unsigned int, int>, false>::is_empty() const Unexecuted instantiation: hb_hashmap_t<hb_ot_name_record_ids_t, hb_array_t<char const>, false>::is_empty() const |
433 | 0 | explicit operator bool () const { return !is_empty (); }Unexecuted instantiation: hb_hashmap_t<unsigned long, hb_pair_t<unsigned int, int>, false>::operator bool() const Unexecuted instantiation: hb_hashmap_t<hb_hashmap_t<unsigned int, Triple, false> const*, unsigned int, false>::operator bool() const Unexecuted instantiation: hb_hashmap_t<unsigned int, hb_pair_t<unsigned int, int>, false>::operator bool() const Unexecuted instantiation: hb_hashmap_t<unsigned int, unsigned int, true>::operator bool() const |
434 | | |
435 | | uint32_t hash () const |
436 | 0 | { |
437 | 0 | return |
438 | 0 | + iter_items () |
439 | 0 | | hb_reduce ([] (uint32_t h, const item_t &_) { return h ^ _.total_hash (); }, (uint32_t) 0u) |
440 | 0 | ; |
441 | 0 | } Unexecuted instantiation: hb_hashmap_t<unsigned int, unsigned int, true>::hash() const Unexecuted instantiation: hb_hashmap_t<unsigned int, Triple, false>::hash() const |
442 | | |
443 | | bool is_equal (const hb_hashmap_t &other) const |
444 | 0 | { |
445 | 0 | if (population != other.population) return false; |
446 | | |
447 | 0 | for (auto pair : iter ()) |
448 | 0 | if (other.get (pair.first) != pair.second) |
449 | 0 | return false; |
450 | | |
451 | 0 | return true; |
452 | 0 | } Unexecuted instantiation: hb_hashmap_t<unsigned int, unsigned int, true>::is_equal(hb_hashmap_t<unsigned int, unsigned int, true> const&) const Unexecuted instantiation: hb_hashmap_t<unsigned int, Triple, false>::is_equal(hb_hashmap_t<unsigned int, Triple, false> const&) const |
453 | 0 | bool operator == (const hb_hashmap_t &other) const { return is_equal (other); }Unexecuted instantiation: hb_hashmap_t<unsigned int, unsigned int, true>::operator==(hb_hashmap_t<unsigned int, unsigned int, true> const&) const Unexecuted instantiation: hb_hashmap_t<unsigned int, Triple, false>::operator==(hb_hashmap_t<unsigned int, Triple, false> const&) const |
454 | | bool operator != (const hb_hashmap_t &other) const { return !is_equal (other); } |
455 | | |
456 | 0 | unsigned int get_population () const { return population; }Unexecuted instantiation: hb_hashmap_t<unsigned int, unsigned int, true>::get_population() const Unexecuted instantiation: hb_hashmap_t<unsigned int, Triple, false>::get_population() const Unexecuted instantiation: hb_hashmap_t<hb_hashmap_t<unsigned int, Triple, false> const*, unsigned int, false>::get_population() const Unexecuted instantiation: hb_hashmap_t<unsigned int, face_table_info_t, false>::get_population() const Unexecuted instantiation: hb_hashmap_t<unsigned long, unsigned int, false>::get_population() const Unexecuted instantiation: hb_hashmap_t<OT::hb_depend_context_t::recurse_key_t, bool, false>::get_population() const Unexecuted instantiation: hb_hashmap_t<hb_ot_name_record_ids_t, hb_array_t<char const>, false>::get_population() const |
457 | | |
458 | | void update (const hb_hashmap_t &other) |
459 | 0 | { |
460 | 0 | if (unlikely (!successful)) return; |
461 | | /* other.iter () walks other's items array, which set () may free |
462 | | * if it grows the table. Merging into ourselves changes nothing. */ |
463 | 0 | if (unlikely (&other == this)) return; |
464 | | |
465 | 0 | hb_copy (other, *this); |
466 | 0 | } |
467 | | |
468 | | /* |
469 | | * Iterator |
470 | | */ |
471 | | |
472 | | auto iter_items () const HB_AUTO_RETURN |
473 | | ( |
474 | | + hb_iter (items, this->size ()) |
475 | | | hb_filter (&item_t::is_real) |
476 | | ) |
477 | | auto iter_ref () const HB_AUTO_RETURN |
478 | | ( |
479 | | + this->iter_items () |
480 | | | hb_map (&item_t::get_pair_ref) |
481 | | ) |
482 | | auto iter () const HB_AUTO_RETURN |
483 | | ( |
484 | | + this->iter_items () |
485 | | | hb_map (&item_t::get_pair) |
486 | | ) |
487 | | auto keys_ref () const HB_AUTO_RETURN |
488 | | ( |
489 | | + this->iter_items () |
490 | | | hb_map (&item_t::get_key) |
491 | | ) |
492 | | auto keys () const HB_AUTO_RETURN |
493 | | ( |
494 | | + this->keys_ref () |
495 | | | hb_map (hb_ridentity) |
496 | | ) |
497 | | auto values_ref () const HB_AUTO_RETURN |
498 | | ( |
499 | | + this->iter_items () |
500 | | | hb_map (&item_t::get_value) |
501 | | ) |
502 | | auto values () const HB_AUTO_RETURN |
503 | | ( |
504 | | + this->values_ref () |
505 | | | hb_map (hb_ridentity) |
506 | | ) |
507 | | |
508 | | /* C iterator. */ |
509 | | bool next (int *idx, |
510 | | K *key, |
511 | | V *value) const |
512 | 0 | { |
513 | 0 | unsigned i = (unsigned) (*idx + 1); |
514 | |
|
515 | 0 | unsigned count = size (); |
516 | 0 | while (i < count && !items[i].is_real ()) |
517 | 0 | i++; |
518 | |
|
519 | 0 | if (i >= count) |
520 | 0 | { |
521 | 0 | *idx = -1; |
522 | 0 | return false; |
523 | 0 | } |
524 | | |
525 | 0 | *key = items[i].key; |
526 | 0 | *value = items[i].value; |
527 | |
|
528 | 0 | *idx = (signed) i; |
529 | 0 | return true; |
530 | 0 | } |
531 | | |
532 | | /* Sink interface. */ |
533 | | hb_hashmap_t& operator << (const hb_pair_t<K, V>& v) |
534 | 0 | { set (v.first, v.second); return *this; }Unexecuted instantiation: hb_hashmap_t<unsigned int, unsigned int, true>::operator<<(hb_pair_t<unsigned int, unsigned int> const&) Unexecuted instantiation: hb_hashmap_t<unsigned int, Triple, false>::operator<<(hb_pair_t<unsigned int, Triple> const&) |
535 | | template <typename V2 = V, |
536 | | hb_enable_if (!hb_is_trivially_copyable (V2))> |
537 | | hb_hashmap_t& operator << (const hb_pair_t<K, V&&>& v) |
538 | | { set (v.first, std::move (v.second)); return *this; } |
539 | | template <typename K2 = K, |
540 | | hb_enable_if (!hb_is_trivially_copyable (K2))> |
541 | | hb_hashmap_t& operator << (const hb_pair_t<K&&, V>& v) |
542 | | { set (std::move (v.first), v.second); return *this; } |
543 | | template <typename K2 = K, typename V2 = V, |
544 | | hb_enable_if (!hb_is_trivially_copyable (K2) && |
545 | | !hb_is_trivially_copyable (V2))> |
546 | | hb_hashmap_t& operator << (const hb_pair_t<K&&, V&&>& v) |
547 | | { set (std::move (v.first), std::move (v.second)); return *this; } |
548 | | |
549 | | static unsigned int prime_for (unsigned int shift) |
550 | 463 | { |
551 | | /* Following comment and table copied from glib. */ |
552 | | /* Each table size has an associated prime modulo (the first prime |
553 | | * lower than the table size) used to find the initial bucket. Probing |
554 | | * then works modulo 2^n. The prime modulo is necessary to get a |
555 | | * good distribution with poor hash functions. |
556 | | */ |
557 | | /* Not declaring static to make all kinds of compilers happy... */ |
558 | 463 | /*static*/ const unsigned int prime_mod [32] = |
559 | 463 | { |
560 | 463 | 1, /* For 1 << 0 */ |
561 | 463 | 2, |
562 | 463 | 3, |
563 | 463 | 7, |
564 | 463 | 13, |
565 | 463 | 31, |
566 | 463 | 61, |
567 | 463 | 127, |
568 | 463 | 251, |
569 | 463 | 509, |
570 | 463 | 1021, |
571 | 463 | 2039, |
572 | 463 | 4093, |
573 | 463 | 8191, |
574 | 463 | 16381, |
575 | 463 | 32749, |
576 | 463 | 65521, /* For 1 << 16 */ |
577 | 463 | 131071, |
578 | 463 | 262139, |
579 | 463 | 524287, |
580 | 463 | 1048573, |
581 | 463 | 2097143, |
582 | 463 | 4194301, |
583 | 463 | 8388593, |
584 | 463 | 16777213, |
585 | 463 | 33554393, |
586 | 463 | 67108859, |
587 | 463 | 134217689, |
588 | 463 | 268435399, |
589 | 463 | 536870909, |
590 | 463 | 1073741789, |
591 | 463 | 2147483647 /* For 1 << 31 */ |
592 | 463 | }; |
593 | | |
594 | 463 | if (unlikely (shift >= ARRAY_LENGTH (prime_mod))) |
595 | 0 | return prime_mod[ARRAY_LENGTH (prime_mod) - 1]; |
596 | | |
597 | 463 | return prime_mod[shift]; |
598 | 463 | } Unexecuted instantiation: hb_hashmap_t<hb_serialize_context_t::object_t const*, unsigned int, false>::prime_for(unsigned int) Unexecuted instantiation: hb_hashmap_t<unsigned int, hb_vector_t<unsigned int, false>, false>::prime_for(unsigned int) hb_hashmap_t<unsigned int, unsigned int, true>::prime_for(unsigned int) Line | Count | Source | 550 | 463 | { | 551 | | /* Following comment and table copied from glib. */ | 552 | | /* Each table size has an associated prime modulo (the first prime | 553 | | * lower than the table size) used to find the initial bucket. Probing | 554 | | * then works modulo 2^n. The prime modulo is necessary to get a | 555 | | * good distribution with poor hash functions. | 556 | | */ | 557 | | /* Not declaring static to make all kinds of compilers happy... */ | 558 | 463 | /*static*/ const unsigned int prime_mod [32] = | 559 | 463 | { | 560 | 463 | 1, /* For 1 << 0 */ | 561 | 463 | 2, | 562 | 463 | 3, | 563 | 463 | 7, | 564 | 463 | 13, | 565 | 463 | 31, | 566 | 463 | 61, | 567 | 463 | 127, | 568 | 463 | 251, | 569 | 463 | 509, | 570 | 463 | 1021, | 571 | 463 | 2039, | 572 | 463 | 4093, | 573 | 463 | 8191, | 574 | 463 | 16381, | 575 | 463 | 32749, | 576 | 463 | 65521, /* For 1 << 16 */ | 577 | 463 | 131071, | 578 | 463 | 262139, | 579 | 463 | 524287, | 580 | 463 | 1048573, | 581 | 463 | 2097143, | 582 | 463 | 4194301, | 583 | 463 | 8388593, | 584 | 463 | 16777213, | 585 | 463 | 33554393, | 586 | 463 | 67108859, | 587 | 463 | 134217689, | 588 | 463 | 268435399, | 589 | 463 | 536870909, | 590 | 463 | 1073741789, | 591 | 463 | 2147483647 /* For 1 << 31 */ | 592 | 463 | }; | 593 | | | 594 | 463 | if (unlikely (shift >= ARRAY_LENGTH (prime_mod))) | 595 | 0 | return prime_mod[ARRAY_LENGTH (prime_mod) - 1]; | 596 | | | 597 | 463 | return prime_mod[shift]; | 598 | 463 | } |
Unexecuted instantiation: hb_hashmap_t<unsigned int, hb::unique_ptr<hb_set_t>, false>::prime_for(unsigned int) Unexecuted instantiation: hb_hashmap_t<unsigned int, Triple, false>::prime_for(unsigned int) Unexecuted instantiation: hb_hashmap_t<unsigned long, hb_pair_t<unsigned int, int>, false>::prime_for(unsigned int) Unexecuted instantiation: hb_hashmap_t<hb::shared_ptr<hb_map_t>, unsigned int, false>::prime_for(unsigned int) Unexecuted instantiation: hb_hashmap_t<unsigned int, hb::shared_ptr<hb_set_t>, false>::prime_for(unsigned int) Unexecuted instantiation: hb_hashmap_t<unsigned int, OT::Feature const*, false>::prime_for(unsigned int) Unexecuted instantiation: hb_hashmap_t<hb_hashmap_t<unsigned int, Triple, false> const*, unsigned int, false>::prime_for(unsigned int) Unexecuted instantiation: hb_hashmap_t<unsigned int, hb_vector_t<int, false> const*, false>::prime_for(unsigned int) Unexecuted instantiation: hb_hashmap_t<hb_set_t const*, unsigned int, false>::prime_for(unsigned int) Unexecuted instantiation: hb_hashmap_t<hb_array_t<OT::NumType<true, unsigned int, 4u> const>, unsigned int, false>::prime_for(unsigned int) Unexecuted instantiation: hb_hashmap_t<unsigned int, hb_pair_t<unsigned int, int>, false>::prime_for(unsigned int) Unexecuted instantiation: hb_hashmap_t<unsigned int, face_table_info_t, false>::prime_for(unsigned int) Unexecuted instantiation: hb_hashmap_t<unsigned int, unsigned int, false>::prime_for(unsigned int) Unexecuted instantiation: hb_hashmap_t<unsigned long, unsigned int, false>::prime_for(unsigned int) Unexecuted instantiation: hb_hashmap_t<OT::hb_depend_context_t::recurse_key_t, bool, false>::prime_for(unsigned int) Unexecuted instantiation: hb_hashmap_t<unsigned int, hb_set_t, false>::prime_for(unsigned int) Unexecuted instantiation: hb_hashmap_t<OT::hb_depend_context_t::glyph_set_cache_key_t, unsigned int, false>::prime_for(unsigned int) Unexecuted instantiation: hb_hashmap_t<OT::hb_depend_context_t::context_set_cache_key_t, unsigned int, false>::prime_for(unsigned int) Unexecuted instantiation: hb_hashmap_t<hb_ot_name_record_ids_t, unsigned int, false>::prime_for(unsigned int) Unexecuted instantiation: hb_hashmap_t<OT::SVG::svg_id_span_t, hb_pair_t<unsigned int, unsigned int>, false>::prime_for(unsigned int) |
599 | | }; |
600 | | |
601 | | /* |
602 | | * hb_map_t |
603 | | */ |
604 | | |
605 | | struct hb_map_t : hb_hashmap_t<hb_codepoint_t, |
606 | | hb_codepoint_t, |
607 | | true> |
608 | | { |
609 | | using hashmap = hb_hashmap_t<hb_codepoint_t, |
610 | | hb_codepoint_t, |
611 | | true>; |
612 | | |
613 | | ~hb_map_t () = default; |
614 | 17.7k | hb_map_t () : hashmap () {} |
615 | 0 | hb_map_t (const hb_map_t &o) : hashmap ((hashmap &) o) {} |
616 | 0 | hb_map_t (hb_map_t &&o) noexcept : hashmap (std::move ((hashmap &) o)) {} |
617 | 0 | hb_map_t& operator= (const hb_map_t&) = default; |
618 | | hb_map_t& operator= (hb_map_t&&) = default; |
619 | 0 | hb_map_t (std::initializer_list<hb_codepoint_pair_t> lst) : hashmap (lst) {} |
620 | | template <typename Iterable, |
621 | | hb_requires (hb_is_iterable (Iterable))> |
622 | | hb_map_t (const Iterable &o) : hashmap (o) {} |
623 | | }; |
624 | | |
625 | | |
626 | | #endif /* HB_MAP_HH */ |