/src/harfbuzz/src/hb-vector.hh
Line | Count | Source (jump to first uncovered line) |
1 | | /* |
2 | | * Copyright © 2017,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_VECTOR_HH |
28 | | #define HB_VECTOR_HH |
29 | | |
30 | | #include "hb.hh" |
31 | | #include "hb-array.hh" |
32 | | #include "hb-meta.hh" |
33 | | #include "hb-null.hh" |
34 | | |
35 | | |
36 | | template <typename Type, |
37 | | bool sorted=false> |
38 | | struct hb_vector_t |
39 | | { |
40 | | typedef Type item_t; |
41 | | static constexpr unsigned item_size = hb_static_size (Type); |
42 | | using array_t = typename std::conditional<sorted, hb_sorted_array_t<Type>, hb_array_t<Type>>::type; |
43 | | using c_array_t = typename std::conditional<sorted, hb_sorted_array_t<const Type>, hb_array_t<const Type>>::type; |
44 | | |
45 | 24.3M | hb_vector_t () = default; hb_vector_t<hb_aat_map_builder_t::feature_range_t, true>::hb_vector_t() Line | Count | Source | 45 | 278k | hb_vector_t () = default; |
hb_vector_t<hb_aat_map_builder_t::feature_info_t, true>::hb_vector_t() Line | Count | Source | 45 | 557k | hb_vector_t () = default; |
hb_vector_t<hb_vector_t<hb_aat_map_t::range_flags_t, true>, false>::hb_vector_t() Line | Count | Source | 45 | 278k | hb_vector_t () = default; |
hb_vector_t<hb_aat_map_t::range_flags_t, true>::hb_vector_t() Line | Count | Source | 45 | 410k | hb_vector_t () = default; |
hb_vector_t<hb_aat_map_builder_t::feature_event_t, false>::hb_vector_t() Line | Count | Source | 45 | 278k | hb_vector_t () = default; |
hb_vector_t<unsigned int, false>::hb_vector_t() Line | Count | Source | 45 | 1.09M | hb_vector_t () = default; |
hb_vector_t<hb_bit_set_t::page_map_t, true>::hb_vector_t() Line | Count | Source | 45 | 1.20M | hb_vector_t () = default; |
hb_vector_t<hb_bit_page_t, false>::hb_vector_t() Line | Count | Source | 45 | 1.20M | hb_vector_t () = default; |
hb_vector_t<int, false>::hb_vector_t() Line | Count | Source | 45 | 974k | hb_vector_t () = default; |
hb_vector_t<OT::contour_point_t, false>::hb_vector_t() Line | Count | Source | 45 | 2.65M | hb_vector_t () = default; |
hb_vector_t<CFF::cff1_top_dict_val_t, false>::hb_vector_t() Line | Count | Source | 45 | 393k | hb_vector_t () = default; |
hb_vector_t<CFF::cff1_font_dict_values_t, false>::hb_vector_t() Line | Count | Source | 45 | 393k | hb_vector_t () = default; |
hb_vector_t<CFF::cff1_private_dict_values_base_t<CFF::dict_val_t>, false>::hb_vector_t() Line | Count | Source | 45 | 393k | hb_vector_t () = default; |
hb_vector_t<CFF::dict_val_t, false>::hb_vector_t() Line | Count | Source | 45 | 2.79M | hb_vector_t () = default; |
hb_vector_t<CFF::op_str_t, false>::hb_vector_t() Line | Count | Source | 45 | 4.09M | hb_vector_t () = default; |
hb_vector_t<CFF::cff2_font_dict_values_t, false>::hb_vector_t() Line | Count | Source | 45 | 353k | hb_vector_t () = default; |
hb_vector_t<CFF::cff2_private_dict_values_base_t<CFF::dict_val_t>, false>::hb_vector_t() Line | Count | Source | 45 | 353k | hb_vector_t () = default; |
hb_vector_t<hb_transform_t, false>::hb_vector_t() Line | Count | Source | 45 | 100k | hb_vector_t () = default; |
hb_vector_t<hb_bounds_t, false>::hb_vector_t() Line | Count | Source | 45 | 200k | hb_vector_t () = default; |
Unexecuted instantiation: hb_vector_t<hb_set_t, false>::hb_vector_t() hb_vector_t<hb_ot_name_entry_t, false>::hb_vector_t() Line | Count | Source | 45 | 399k | hb_vector_t () = default; |
hb_vector_t<hb_ot_map_t::feature_map_t, true>::hb_vector_t() Line | Count | Source | 45 | 610k | hb_vector_t () = default; |
hb_vector_t<hb_ot_map_t::lookup_map_t, false>::hb_vector_t() Line | Count | Source | 45 | 1.22M | hb_vector_t () = default; |
hb_vector_t<hb_ot_map_t::stage_map_t, false>::hb_vector_t() Line | Count | Source | 45 | 1.22M | hb_vector_t () = default; |
hb_vector_t<char, false>::hb_vector_t() Line | Count | Source | 45 | 10.4k | hb_vector_t () = default; |
hb_vector_t<float, false>::hb_vector_t() Line | Count | Source | 45 | 995k | hb_vector_t () = default; |
hb_vector_t<hb_ot_map_builder_t::feature_info_t, false>::hb_vector_t() Line | Count | Source | 45 | 605k | hb_vector_t () = default; |
hb_vector_t<hb_ot_map_builder_t::stage_info_t, false>::hb_vector_t() Line | Count | Source | 45 | 1.21M | hb_vector_t () = default; |
hb_vector_t<hb_pool_t<hb_serialize_context_t::object_t, 32u>::chunk_t*, false>::hb_vector_t() Line | Count | Source | 45 | 25.0k | hb_vector_t () = default; |
hb_vector_t<hb_serialize_context_t::object_t*, false>::hb_vector_t() Line | Count | Source | 45 | 25.0k | hb_vector_t () = default; |
|
46 | | hb_vector_t (std::initializer_list<Type> lst) : hb_vector_t () |
47 | | { |
48 | | alloc (lst.size (), true); |
49 | | for (auto&& item : lst) |
50 | | push (item); |
51 | | } |
52 | | template <typename Iterable, |
53 | | hb_requires (hb_is_iterable (Iterable))> |
54 | | hb_vector_t (const Iterable &o) : hb_vector_t () |
55 | 639k | { |
56 | 639k | auto iter = hb_iter (o); |
57 | 639k | if (iter.is_random_access_iterator) |
58 | 639k | alloc (hb_len (iter), true); |
59 | 639k | hb_copy (iter, *this); |
60 | 639k | } |
61 | | hb_vector_t (const hb_vector_t &o) : hb_vector_t () |
62 | | { |
63 | | alloc (o.length, true); |
64 | | if (unlikely (in_error ())) return; |
65 | | copy_vector (o); |
66 | | } |
67 | | hb_vector_t (hb_vector_t &&o) |
68 | | { |
69 | | allocated = o.allocated; |
70 | | length = o.length; |
71 | | arrayZ = o.arrayZ; |
72 | | o.init (); |
73 | | } |
74 | 24.3M | ~hb_vector_t () { fini (); }hb_vector_t<hb_vector_t<hb_aat_map_t::range_flags_t, true>, false>::~hb_vector_t() Line | Count | Source | 74 | 278k | ~hb_vector_t () { fini (); } |
hb_vector_t<hb_aat_map_t::range_flags_t, true>::~hb_vector_t() Line | Count | Source | 74 | 410k | ~hb_vector_t () { fini (); } |
hb_vector_t<hb_aat_map_builder_t::feature_info_t, true>::~hb_vector_t() Line | Count | Source | 74 | 557k | ~hb_vector_t () { fini (); } |
hb_vector_t<hb_aat_map_builder_t::feature_range_t, true>::~hb_vector_t() Line | Count | Source | 74 | 278k | ~hb_vector_t () { fini (); } |
hb_vector_t<hb_aat_map_builder_t::feature_event_t, false>::~hb_vector_t() Line | Count | Source | 74 | 278k | ~hb_vector_t () { fini (); } |
hb_vector_t<unsigned int, false>::~hb_vector_t() Line | Count | Source | 74 | 1.09M | ~hb_vector_t () { fini (); } |
hb_vector_t<hb_bit_page_t, false>::~hb_vector_t() Line | Count | Source | 74 | 1.20M | ~hb_vector_t () { fini (); } |
hb_vector_t<hb_bit_set_t::page_map_t, true>::~hb_vector_t() Line | Count | Source | 74 | 1.20M | ~hb_vector_t () { fini (); } |
hb_vector_t<int, false>::~hb_vector_t() Line | Count | Source | 74 | 974k | ~hb_vector_t () { fini (); } |
hb_vector_t<hb_ot_name_entry_t, false>::~hb_vector_t() Line | Count | Source | 74 | 399k | ~hb_vector_t () { fini (); } |
hb_vector_t<CFF::op_str_t, false>::~hb_vector_t() Line | Count | Source | 74 | 4.09M | ~hb_vector_t () { fini (); } |
hb_vector_t<CFF::dict_val_t, false>::~hb_vector_t() Line | Count | Source | 74 | 2.79M | ~hb_vector_t () { fini (); } |
hb_vector_t<CFF::cff1_private_dict_values_base_t<CFF::dict_val_t>, false>::~hb_vector_t() Line | Count | Source | 74 | 393k | ~hb_vector_t () { fini (); } |
hb_vector_t<CFF::cff1_font_dict_values_t, false>::~hb_vector_t() Line | Count | Source | 74 | 393k | ~hb_vector_t () { fini (); } |
hb_vector_t<CFF::cff1_top_dict_val_t, false>::~hb_vector_t() Line | Count | Source | 74 | 393k | ~hb_vector_t () { fini (); } |
hb_vector_t<CFF::cff2_private_dict_values_base_t<CFF::dict_val_t>, false>::~hb_vector_t() Line | Count | Source | 74 | 353k | ~hb_vector_t () { fini (); } |
hb_vector_t<CFF::cff2_font_dict_values_t, false>::~hb_vector_t() Line | Count | Source | 74 | 353k | ~hb_vector_t () { fini (); } |
hb_vector_t<OT::contour_point_t, false>::~hb_vector_t() Line | Count | Source | 74 | 2.65M | ~hb_vector_t () { fini (); } |
hb_vector_t<hb_bounds_t, false>::~hb_vector_t() Line | Count | Source | 74 | 200k | ~hb_vector_t () { fini (); } |
hb_vector_t<hb_transform_t, false>::~hb_vector_t() Line | Count | Source | 74 | 100k | ~hb_vector_t () { fini (); } |
Unexecuted instantiation: hb_vector_t<hb_set_t, false>::~hb_vector_t() hb_vector_t<hb_ot_map_t::stage_map_t, false>::~hb_vector_t() Line | Count | Source | 74 | 1.21M | ~hb_vector_t () { fini (); } |
hb_vector_t<hb_ot_map_t::lookup_map_t, false>::~hb_vector_t() Line | Count | Source | 74 | 1.21M | ~hb_vector_t () { fini (); } |
hb_vector_t<hb_ot_map_t::feature_map_t, true>::~hb_vector_t() Line | Count | Source | 74 | 605k | ~hb_vector_t () { fini (); } |
hb_vector_t<char, false>::~hb_vector_t() Line | Count | Source | 74 | 10.4k | ~hb_vector_t () { fini (); } |
hb_vector_t<float, false>::~hb_vector_t() Line | Count | Source | 74 | 995k | ~hb_vector_t () { fini (); } |
hb_vector_t<hb_ot_map_builder_t::stage_info_t, false>::~hb_vector_t() Line | Count | Source | 74 | 1.21M | ~hb_vector_t () { fini (); } |
hb_vector_t<hb_ot_map_builder_t::feature_info_t, false>::~hb_vector_t() Line | Count | Source | 74 | 605k | ~hb_vector_t () { fini (); } |
hb_vector_t<hb_serialize_context_t::object_t*, false>::~hb_vector_t() Line | Count | Source | 74 | 25.0k | ~hb_vector_t () { fini (); } |
hb_vector_t<hb_pool_t<hb_serialize_context_t::object_t, 32u>::chunk_t*, false>::~hb_vector_t() Line | Count | Source | 74 | 25.0k | ~hb_vector_t () { fini (); } |
|
75 | | |
76 | | public: |
77 | | int allocated = 0; /* == -1 means allocation failed. */ |
78 | | unsigned int length = 0; |
79 | | public: |
80 | | Type *arrayZ = nullptr; |
81 | | |
82 | | void init () |
83 | 54.7M | { |
84 | 54.7M | allocated = length = 0; |
85 | 54.7M | arrayZ = nullptr; |
86 | 54.7M | } hb_vector_t<hb_aat_map_t::range_flags_t, true>::init() Line | Count | Source | 83 | 410k | { | 84 | 410k | allocated = length = 0; | 85 | 410k | arrayZ = nullptr; | 86 | 410k | } |
hb_vector_t<hb_vector_t<hb_aat_map_t::range_flags_t, true>, false>::init() Line | Count | Source | 83 | 278k | { | 84 | 278k | allocated = length = 0; | 85 | 278k | arrayZ = nullptr; | 86 | 278k | } |
hb_vector_t<hb_aat_map_builder_t::feature_info_t, true>::init() Line | Count | Source | 83 | 557k | { | 84 | 557k | allocated = length = 0; | 85 | 557k | arrayZ = nullptr; | 86 | 557k | } |
hb_vector_t<hb_aat_map_builder_t::feature_range_t, true>::init() Line | Count | Source | 83 | 278k | { | 84 | 278k | allocated = length = 0; | 85 | 278k | arrayZ = nullptr; | 86 | 278k | } |
hb_vector_t<hb_user_data_array_t::hb_user_data_item_t, false>::init() Line | Count | Source | 83 | 806k | { | 84 | 806k | allocated = length = 0; | 85 | 806k | arrayZ = nullptr; | 86 | 806k | } |
hb_vector_t<hb_ot_map_t::feature_map_t, true>::init() Line | Count | Source | 83 | 1.21M | { | 84 | 1.21M | allocated = length = 0; | 85 | 1.21M | arrayZ = nullptr; | 86 | 1.21M | } |
hb_vector_t<hb_ot_map_t::lookup_map_t, false>::init() Line | Count | Source | 83 | 2.42M | { | 84 | 2.42M | allocated = length = 0; | 85 | 2.42M | arrayZ = nullptr; | 86 | 2.42M | } |
hb_vector_t<hb_ot_map_t::stage_map_t, false>::init() Line | Count | Source | 83 | 2.42M | { | 84 | 2.42M | allocated = length = 0; | 85 | 2.42M | arrayZ = nullptr; | 86 | 2.42M | } |
hb_vector_t<hb_bit_set_t::page_map_t, true>::init() Line | Count | Source | 83 | 3.62M | { | 84 | 3.62M | allocated = length = 0; | 85 | 3.62M | arrayZ = nullptr; | 86 | 3.62M | } |
hb_vector_t<hb_bit_page_t, false>::init() Line | Count | Source | 83 | 3.62M | { | 84 | 3.62M | allocated = length = 0; | 85 | 3.62M | arrayZ = nullptr; | 86 | 3.62M | } |
hb_vector_t<unsigned int, false>::init() Line | Count | Source | 83 | 1.09M | { | 84 | 1.09M | allocated = length = 0; | 85 | 1.09M | arrayZ = nullptr; | 86 | 1.09M | } |
hb_vector_t<hb_serialize_context_t::object_t::link_t, false>::init() Line | Count | Source | 83 | 646k | { | 84 | 646k | allocated = length = 0; | 85 | 646k | arrayZ = nullptr; | 86 | 646k | } |
hb_vector_t<hb_pool_t<hb_serialize_context_t::object_t, 32u>::chunk_t*, false>::init() Line | Count | Source | 83 | 25.0k | { | 84 | 25.0k | allocated = length = 0; | 85 | 25.0k | arrayZ = nullptr; | 86 | 25.0k | } |
hb_vector_t<hb_serialize_context_t::object_t*, false>::init() Line | Count | Source | 83 | 75.0k | { | 84 | 75.0k | allocated = length = 0; | 85 | 75.0k | arrayZ = nullptr; | 86 | 75.0k | } |
Unexecuted instantiation: hb_vector_t<hb_vector_t<unsigned int, false>, false>::init() Unexecuted instantiation: hb_vector_t<hb_pair_t<unsigned int, unsigned int>, true>::init() Unexecuted instantiation: hb_vector_t<hb_inc_bimap_t, false>::init() hb_vector_t<int, false>::init() Line | Count | Source | 83 | 974k | { | 84 | 974k | allocated = length = 0; | 85 | 974k | arrayZ = nullptr; | 86 | 974k | } |
Unexecuted instantiation: hb_vector_t<unsigned int, true>::init() Unexecuted instantiation: hb_vector_t<OT::VarData::serialize(hb_serialize_context_t*, OT::VarData const*, hb_inc_bimap_t const&, hb_bimap_t const&)::delta_size_t, false>::init() Unexecuted instantiation: hb_vector_t<hb_set_t, false>::init() hb_vector_t<OT::hb_accelerate_subtables_context_t::hb_applicable_t, false>::init() Line | Count | Source | 83 | 4.70M | { | 84 | 4.70M | allocated = length = 0; | 85 | 4.70M | arrayZ = nullptr; | 86 | 4.70M | } |
hb_vector_t<hb_aat_map_builder_t::feature_event_t, false>::init() Line | Count | Source | 83 | 278k | { | 84 | 278k | allocated = length = 0; | 85 | 278k | arrayZ = nullptr; | 86 | 278k | } |
Unexecuted instantiation: hb_vector_t<hb_pair_t<unsigned int, unsigned int>, false>::init() hb_vector_t<hb_transform_t, false>::init() Line | Count | Source | 83 | 100k | { | 84 | 100k | allocated = length = 0; | 85 | 100k | arrayZ = nullptr; | 86 | 100k | } |
hb_vector_t<hb_bounds_t, false>::init() Line | Count | Source | 83 | 200k | { | 84 | 200k | allocated = length = 0; | 85 | 200k | arrayZ = nullptr; | 86 | 200k | } |
Unexecuted instantiation: hb_vector_t<OT::LayerRecord, false>::init() Unexecuted instantiation: hb_vector_t<hb_set_t*, false>::init() Unexecuted instantiation: hb_vector_t<OT::index_map_subset_plan_t, false>::init() Unexecuted instantiation: hb_vector_t<OT::DeltaSetIndexMap const*, false>::init() hb_vector_t<OT::contour_point_t, false>::init() Line | Count | Source | 83 | 2.65M | { | 84 | 2.65M | allocated = length = 0; | 85 | 2.65M | arrayZ = nullptr; | 86 | 2.65M | } |
Unexecuted instantiation: hb_vector_t<unsigned char, false>::init() Unexecuted instantiation: hb_vector_t<OT::glyf_impl::SubsetGlyph, false>::init() Unexecuted instantiation: hb_vector_t<hb_variation_t, false>::init() Unexecuted instantiation: hb_vector_t<hb_pair_t<unsigned int, OT::IndexSubtableRecord const*>, false>::init() Unexecuted instantiation: hb_vector_t<OT::IndexSubtableRecord, false>::init() hb_vector_t<char, false>::init() Line | Count | Source | 83 | 10.4k | { | 84 | 10.4k | allocated = length = 0; | 85 | 10.4k | arrayZ = nullptr; | 86 | 10.4k | } |
Unexecuted instantiation: hb_vector_t<OT::OffsetTo<OT::SBIXStrike, OT::IntType<unsigned int, 4u>, true>*, false>::init() hb_vector_t<hb_ot_name_entry_t, false>::init() Line | Count | Source | 83 | 399k | { | 84 | 399k | allocated = length = 0; | 85 | 399k | arrayZ = nullptr; | 86 | 399k | } |
hb_vector_t<OT::cff1::accelerator_t::gname_t, true>::init() Line | Count | Source | 83 | 44.8k | { | 84 | 44.8k | allocated = length = 0; | 85 | 44.8k | arrayZ = nullptr; | 86 | 44.8k | } |
hb_vector_t<CFF::cff1_top_dict_val_t, false>::init() Line | Count | Source | 83 | 1.58M | { | 84 | 1.58M | allocated = length = 0; | 85 | 1.58M | arrayZ = nullptr; | 86 | 1.58M | } |
hb_vector_t<CFF::op_str_t, false>::init() Line | Count | Source | 83 | 7.50M | { | 84 | 7.50M | allocated = length = 0; | 85 | 7.50M | arrayZ = nullptr; | 86 | 7.50M | } |
hb_vector_t<CFF::cff1_font_dict_values_t, false>::init() Line | Count | Source | 83 | 1.54M | { | 84 | 1.54M | allocated = length = 0; | 85 | 1.54M | arrayZ = nullptr; | 86 | 1.54M | } |
hb_vector_t<CFF::dict_val_t, false>::init() Line | Count | Source | 83 | 5.51M | { | 84 | 5.51M | allocated = length = 0; | 85 | 5.51M | arrayZ = nullptr; | 86 | 5.51M | } |
hb_vector_t<CFF::cff1_private_dict_values_base_t<CFF::dict_val_t>, false>::init() Line | Count | Source | 83 | 1.54M | { | 84 | 1.54M | allocated = length = 0; | 85 | 1.54M | arrayZ = nullptr; | 86 | 1.54M | } |
hb_vector_t<CFF::cff2_font_dict_values_t, false>::init() Line | Count | Source | 83 | 1.38M | { | 84 | 1.38M | allocated = length = 0; | 85 | 1.38M | arrayZ = nullptr; | 86 | 1.38M | } |
hb_vector_t<CFF::cff2_private_dict_values_base_t<CFF::dict_val_t>, false>::init() Line | Count | Source | 83 | 1.38M | { | 84 | 1.38M | allocated = length = 0; | 85 | 1.38M | arrayZ = nullptr; | 86 | 1.38M | } |
Unexecuted instantiation: hb_vector_t<hb_array_t<unsigned char const>, false>::init() Unexecuted instantiation: hb_vector_t<hb_ot_name_record_ids_t, false>::init() hb_vector_t<float, false>::init() Line | Count | Source | 83 | 1.99M | { | 84 | 1.99M | allocated = length = 0; | 85 | 1.99M | arrayZ = nullptr; | 86 | 1.99M | } |
hb_vector_t<hb_ot_map_builder_t::feature_info_t, false>::init() Line | Count | Source | 83 | 1.81M | { | 84 | 1.81M | allocated = length = 0; | 85 | 1.81M | arrayZ = nullptr; | 86 | 1.81M | } |
hb_vector_t<hb_ot_map_builder_t::stage_info_t, false>::init() Line | Count | Source | 83 | 3.63M | { | 84 | 3.63M | allocated = length = 0; | 85 | 3.63M | arrayZ = nullptr; | 86 | 3.63M | } |
|
87 | | void init0 () |
88 | 3.02M | { |
89 | 3.02M | } hb_vector_t<hb_ot_map_t::feature_map_t, true>::init0() Line | Count | Source | 88 | 605k | { | 89 | 605k | } |
hb_vector_t<hb_ot_map_t::lookup_map_t, false>::init0() Line | Count | Source | 88 | 1.21M | { | 89 | 1.21M | } |
hb_vector_t<hb_ot_map_t::stage_map_t, false>::init0() Line | Count | Source | 88 | 1.21M | { | 89 | 1.21M | } |
|
90 | | |
91 | | void fini () |
92 | 39.3M | { |
93 | 39.3M | shrink_vector (0); |
94 | 39.3M | hb_free (arrayZ); |
95 | 39.3M | init (); |
96 | 39.3M | } hb_vector_t<hb_vector_t<hb_aat_map_t::range_flags_t, true>, false>::fini() Line | Count | Source | 92 | 278k | { | 93 | 278k | shrink_vector (0); | 94 | 278k | hb_free (arrayZ); | 95 | 278k | init (); | 96 | 278k | } |
hb_vector_t<hb_aat_map_t::range_flags_t, true>::fini() Line | Count | Source | 92 | 410k | { | 93 | 410k | shrink_vector (0); | 94 | 410k | hb_free (arrayZ); | 95 | 410k | init (); | 96 | 410k | } |
hb_vector_t<hb_aat_map_builder_t::feature_info_t, true>::fini() Line | Count | Source | 92 | 557k | { | 93 | 557k | shrink_vector (0); | 94 | 557k | hb_free (arrayZ); | 95 | 557k | init (); | 96 | 557k | } |
hb_vector_t<hb_aat_map_builder_t::feature_range_t, true>::fini() Line | Count | Source | 92 | 278k | { | 93 | 278k | shrink_vector (0); | 94 | 278k | hb_free (arrayZ); | 95 | 278k | init (); | 96 | 278k | } |
hb_vector_t<hb_user_data_array_t::hb_user_data_item_t, false>::fini() Line | Count | Source | 92 | 403k | { | 93 | 403k | shrink_vector (0); | 94 | 403k | hb_free (arrayZ); | 95 | 403k | init (); | 96 | 403k | } |
hb_vector_t<hb_ot_map_t::feature_map_t, true>::fini() Line | Count | Source | 92 | 1.21M | { | 93 | 1.21M | shrink_vector (0); | 94 | 1.21M | hb_free (arrayZ); | 95 | 1.21M | init (); | 96 | 1.21M | } |
hb_vector_t<hb_ot_map_t::lookup_map_t, false>::fini() Line | Count | Source | 92 | 2.42M | { | 93 | 2.42M | shrink_vector (0); | 94 | 2.42M | hb_free (arrayZ); | 95 | 2.42M | init (); | 96 | 2.42M | } |
hb_vector_t<hb_ot_map_t::stage_map_t, false>::fini() Line | Count | Source | 92 | 2.42M | { | 93 | 2.42M | shrink_vector (0); | 94 | 2.42M | hb_free (arrayZ); | 95 | 2.42M | init (); | 96 | 2.42M | } |
hb_vector_t<hb_bit_set_t::page_map_t, true>::fini() Line | Count | Source | 92 | 2.41M | { | 93 | 2.41M | shrink_vector (0); | 94 | 2.41M | hb_free (arrayZ); | 95 | 2.41M | init (); | 96 | 2.41M | } |
hb_vector_t<hb_bit_page_t, false>::fini() Line | Count | Source | 92 | 2.41M | { | 93 | 2.41M | shrink_vector (0); | 94 | 2.41M | hb_free (arrayZ); | 95 | 2.41M | init (); | 96 | 2.41M | } |
hb_vector_t<unsigned int, false>::fini() Line | Count | Source | 92 | 1.09M | { | 93 | 1.09M | shrink_vector (0); | 94 | 1.09M | hb_free (arrayZ); | 95 | 1.09M | init (); | 96 | 1.09M | } |
hb_vector_t<hb_serialize_context_t::object_t::link_t, false>::fini() Line | Count | Source | 92 | 646k | { | 93 | 646k | shrink_vector (0); | 94 | 646k | hb_free (arrayZ); | 95 | 646k | init (); | 96 | 646k | } |
hb_vector_t<hb_pool_t<hb_serialize_context_t::object_t, 32u>::chunk_t*, false>::fini() Line | Count | Source | 92 | 25.0k | { | 93 | 25.0k | shrink_vector (0); | 94 | 25.0k | hb_free (arrayZ); | 95 | 25.0k | init (); | 96 | 25.0k | } |
hb_vector_t<hb_serialize_context_t::object_t*, false>::fini() Line | Count | Source | 92 | 75.0k | { | 93 | 75.0k | shrink_vector (0); | 94 | 75.0k | hb_free (arrayZ); | 95 | 75.0k | init (); | 96 | 75.0k | } |
Unexecuted instantiation: hb_vector_t<hb_vector_t<unsigned int, false>, false>::fini() Unexecuted instantiation: hb_vector_t<hb_pair_t<unsigned int, unsigned int>, true>::fini() Unexecuted instantiation: hb_vector_t<hb_inc_bimap_t, false>::fini() hb_vector_t<int, false>::fini() Line | Count | Source | 92 | 974k | { | 93 | 974k | shrink_vector (0); | 94 | 974k | hb_free (arrayZ); | 95 | 974k | init (); | 96 | 974k | } |
Unexecuted instantiation: hb_vector_t<unsigned int, true>::fini() Unexecuted instantiation: hb_vector_t<OT::VarData::serialize(hb_serialize_context_t*, OT::VarData const*, hb_inc_bimap_t const&, hb_bimap_t const&)::delta_size_t, false>::fini() Unexecuted instantiation: hb_vector_t<hb_set_t, false>::fini() hb_vector_t<OT::hb_accelerate_subtables_context_t::hb_applicable_t, false>::fini() Line | Count | Source | 92 | 2.35M | { | 93 | 2.35M | shrink_vector (0); | 94 | 2.35M | hb_free (arrayZ); | 95 | 2.35M | init (); | 96 | 2.35M | } |
hb_vector_t<hb_aat_map_builder_t::feature_event_t, false>::fini() Line | Count | Source | 92 | 278k | { | 93 | 278k | shrink_vector (0); | 94 | 278k | hb_free (arrayZ); | 95 | 278k | init (); | 96 | 278k | } |
Unexecuted instantiation: hb_vector_t<hb_pair_t<unsigned int, unsigned int>, false>::fini() hb_vector_t<hb_transform_t, false>::fini() Line | Count | Source | 92 | 100k | { | 93 | 100k | shrink_vector (0); | 94 | 100k | hb_free (arrayZ); | 95 | 100k | init (); | 96 | 100k | } |
hb_vector_t<hb_bounds_t, false>::fini() Line | Count | Source | 92 | 200k | { | 93 | 200k | shrink_vector (0); | 94 | 200k | hb_free (arrayZ); | 95 | 200k | init (); | 96 | 200k | } |
Unexecuted instantiation: hb_vector_t<OT::LayerRecord, false>::fini() Unexecuted instantiation: hb_vector_t<hb_set_t*, false>::fini() Unexecuted instantiation: hb_vector_t<OT::index_map_subset_plan_t, false>::fini() Unexecuted instantiation: hb_vector_t<OT::DeltaSetIndexMap const*, false>::fini() hb_vector_t<OT::contour_point_t, false>::fini() Line | Count | Source | 92 | 2.65M | { | 93 | 2.65M | shrink_vector (0); | 94 | 2.65M | hb_free (arrayZ); | 95 | 2.65M | init (); | 96 | 2.65M | } |
Unexecuted instantiation: hb_vector_t<unsigned char, false>::fini() Unexecuted instantiation: hb_vector_t<OT::glyf_impl::SubsetGlyph, false>::fini() Unexecuted instantiation: hb_vector_t<hb_variation_t, false>::fini() Unexecuted instantiation: hb_vector_t<hb_pair_t<unsigned int, OT::IndexSubtableRecord const*>, false>::fini() Unexecuted instantiation: hb_vector_t<OT::IndexSubtableRecord, false>::fini() hb_vector_t<char, false>::fini() Line | Count | Source | 92 | 10.4k | { | 93 | 10.4k | shrink_vector (0); | 94 | 10.4k | hb_free (arrayZ); | 95 | 10.4k | init (); | 96 | 10.4k | } |
Unexecuted instantiation: hb_vector_t<OT::OffsetTo<OT::SBIXStrike, OT::IntType<unsigned int, 4u>, true>*, false>::fini() hb_vector_t<hb_ot_name_entry_t, false>::fini() Line | Count | Source | 92 | 399k | { | 93 | 399k | shrink_vector (0); | 94 | 399k | hb_free (arrayZ); | 95 | 399k | init (); | 96 | 399k | } |
hb_vector_t<OT::cff1::accelerator_t::gname_t, true>::fini() Line | Count | Source | 92 | 22.4k | { | 93 | 22.4k | shrink_vector (0); | 94 | 22.4k | hb_free (arrayZ); | 95 | 22.4k | init (); | 96 | 22.4k | } |
hb_vector_t<CFF::cff1_top_dict_val_t, false>::fini() Line | Count | Source | 92 | 1.14M | { | 93 | 1.14M | shrink_vector (0); | 94 | 1.14M | hb_free (arrayZ); | 95 | 1.14M | init (); | 96 | 1.14M | } |
hb_vector_t<CFF::cff1_font_dict_values_t, false>::fini() Line | Count | Source | 92 | 1.14M | { | 93 | 1.14M | shrink_vector (0); | 94 | 1.14M | hb_free (arrayZ); | 95 | 1.14M | init (); | 96 | 1.14M | } |
hb_vector_t<CFF::op_str_t, false>::fini() Line | Count | Source | 92 | 4.77M | { | 93 | 4.77M | shrink_vector (0); | 94 | 4.77M | hb_free (arrayZ); | 95 | 4.77M | init (); | 96 | 4.77M | } |
hb_vector_t<CFF::cff1_private_dict_values_base_t<CFF::dict_val_t>, false>::fini() Line | Count | Source | 92 | 1.14M | { | 93 | 1.14M | shrink_vector (0); | 94 | 1.14M | hb_free (arrayZ); | 95 | 1.14M | init (); | 96 | 1.14M | } |
hb_vector_t<CFF::dict_val_t, false>::fini() Line | Count | Source | 92 | 2.79M | { | 93 | 2.79M | shrink_vector (0); | 94 | 2.79M | hb_free (arrayZ); | 95 | 2.79M | init (); | 96 | 2.79M | } |
hb_vector_t<CFF::cff2_font_dict_values_t, false>::fini() Line | Count | Source | 92 | 1.03M | { | 93 | 1.03M | shrink_vector (0); | 94 | 1.03M | hb_free (arrayZ); | 95 | 1.03M | init (); | 96 | 1.03M | } |
hb_vector_t<CFF::cff2_private_dict_values_base_t<CFF::dict_val_t>, false>::fini() Line | Count | Source | 92 | 1.03M | { | 93 | 1.03M | shrink_vector (0); | 94 | 1.03M | hb_free (arrayZ); | 95 | 1.03M | init (); | 96 | 1.03M | } |
Unexecuted instantiation: hb_vector_t<hb_array_t<unsigned char const>, false>::fini() Unexecuted instantiation: hb_vector_t<hb_ot_name_record_ids_t, false>::fini() hb_vector_t<float, false>::fini() Line | Count | Source | 92 | 995k | { | 93 | 995k | shrink_vector (0); | 94 | 995k | hb_free (arrayZ); | 95 | 995k | init (); | 96 | 995k | } |
hb_vector_t<hb_ot_map_builder_t::feature_info_t, false>::fini() Line | Count | Source | 92 | 1.21M | { | 93 | 1.21M | shrink_vector (0); | 94 | 1.21M | hb_free (arrayZ); | 95 | 1.21M | init (); | 96 | 1.21M | } |
hb_vector_t<hb_ot_map_builder_t::stage_info_t, false>::fini() Line | Count | Source | 92 | 2.42M | { | 93 | 2.42M | shrink_vector (0); | 94 | 2.42M | hb_free (arrayZ); | 95 | 2.42M | init (); | 96 | 2.42M | } |
|
97 | | |
98 | | void reset () |
99 | 1.63M | { |
100 | 1.63M | if (unlikely (in_error ())) |
101 | | /* Big Hack! We don't know the true allocated size before |
102 | | * an allocation failure happened. But we know it was at |
103 | | * least as big as length. Restore it to that and continue |
104 | | * as if error did not happen. */ |
105 | 0 | allocated = length; |
106 | 1.63M | resize (0); |
107 | 1.63M | } Unexecuted instantiation: hb_vector_t<hb_bit_set_t::page_map_t, true>::reset() Unexecuted instantiation: hb_vector_t<hb_bit_page_t, false>::reset() Unexecuted instantiation: hb_vector_t<hb_set_t, false>::reset() Unexecuted instantiation: hb_vector_t<unsigned int, true>::reset() hb_vector_t<hb_aat_map_builder_t::feature_info_t, true>::reset() Line | Count | Source | 99 | 272k | { | 100 | 272k | if (unlikely (in_error ())) | 101 | | /* Big Hack! We don't know the true allocated size before | 102 | | * an allocation failure happened. But we know it was at | 103 | | * least as big as length. Restore it to that and continue | 104 | | * as if error did not happen. */ | 105 | 0 | allocated = length; | 106 | 272k | resize (0); | 107 | 272k | } |
hb_vector_t<OT::contour_point_t, false>::reset() Line | Count | Source | 99 | 1.36M | { | 100 | 1.36M | if (unlikely (in_error ())) | 101 | | /* Big Hack! We don't know the true allocated size before | 102 | | * an allocation failure happened. But we know it was at | 103 | | * least as big as length. Restore it to that and continue | 104 | | * as if error did not happen. */ | 105 | 0 | allocated = length; | 106 | 1.36M | resize (0); | 107 | 1.36M | } |
|
108 | | |
109 | | friend void swap (hb_vector_t& a, hb_vector_t& b) |
110 | 2.59M | { |
111 | 2.59M | hb_swap (a.allocated, b.allocated); |
112 | 2.59M | hb_swap (a.length, b.length); |
113 | 2.59M | hb_swap (a.arrayZ, b.arrayZ); |
114 | 2.59M | } Unexecuted instantiation: swap(hb_vector_t<hb_aat_map_t::range_flags_t, true>&, hb_vector_t<hb_aat_map_t::range_flags_t, true>&) Unexecuted instantiation: swap(hb_vector_t<hb_bit_set_t::page_map_t, true>&, hb_vector_t<hb_bit_set_t::page_map_t, true>&) Unexecuted instantiation: swap(hb_vector_t<hb_bit_page_t, false>&, hb_vector_t<hb_bit_page_t, false>&) Unexecuted instantiation: swap(hb_vector_t<hb_serialize_context_t::object_t::link_t, false>&, hb_vector_t<hb_serialize_context_t::object_t::link_t, false>&) Unexecuted instantiation: swap(hb_vector_t<unsigned int, false>&, hb_vector_t<unsigned int, false>&) Unexecuted instantiation: swap(hb_vector_t<CFF::dict_val_t, false>&, hb_vector_t<CFF::dict_val_t, false>&) swap(hb_vector_t<CFF::op_str_t, false>&, hb_vector_t<CFF::op_str_t, false>&) Line | Count | Source | 110 | 2.59M | { | 111 | 2.59M | hb_swap (a.allocated, b.allocated); | 112 | 2.59M | hb_swap (a.length, b.length); | 113 | 2.59M | hb_swap (a.arrayZ, b.arrayZ); | 114 | 2.59M | } |
|
115 | | |
116 | | hb_vector_t& operator = (const hb_vector_t &o) |
117 | 272k | { |
118 | 272k | reset (); |
119 | 272k | alloc (o.length, true); |
120 | 272k | if (unlikely (in_error ())) return *this; |
121 | | |
122 | 272k | copy_vector (o); |
123 | | |
124 | 272k | return *this; |
125 | 272k | } Unexecuted instantiation: hb_vector_t<hb_bit_set_t::page_map_t, true>::operator=(hb_vector_t<hb_bit_set_t::page_map_t, true> const&) Unexecuted instantiation: hb_vector_t<hb_bit_page_t, false>::operator=(hb_vector_t<hb_bit_page_t, false> const&) hb_vector_t<hb_aat_map_builder_t::feature_info_t, true>::operator=(hb_vector_t<hb_aat_map_builder_t::feature_info_t, true> const&) Line | Count | Source | 117 | 272k | { | 118 | 272k | reset (); | 119 | 272k | alloc (o.length, true); | 120 | 272k | if (unlikely (in_error ())) return *this; | 121 | | | 122 | 272k | copy_vector (o); | 123 | | | 124 | 272k | return *this; | 125 | 272k | } |
|
126 | | hb_vector_t& operator = (hb_vector_t &&o) |
127 | 2.59M | { |
128 | 2.59M | hb_swap (*this, o); |
129 | 2.59M | return *this; |
130 | 2.59M | } Unexecuted instantiation: hb_vector_t<hb_aat_map_t::range_flags_t, true>::operator=(hb_vector_t<hb_aat_map_t::range_flags_t, true>&&) Unexecuted instantiation: hb_vector_t<unsigned int, false>::operator=(hb_vector_t<unsigned int, false>&&) Unexecuted instantiation: hb_vector_t<CFF::dict_val_t, false>::operator=(hb_vector_t<CFF::dict_val_t, false>&&) hb_vector_t<CFF::op_str_t, false>::operator=(hb_vector_t<CFF::op_str_t, false>&&) Line | Count | Source | 127 | 2.59M | { | 128 | 2.59M | hb_swap (*this, o); | 129 | 2.59M | return *this; | 130 | 2.59M | } |
|
131 | | |
132 | | hb_bytes_t as_bytes () const |
133 | 690k | { return hb_bytes_t ((const char *) arrayZ, get_size ()); } |
134 | | |
135 | | bool operator == (const hb_vector_t &o) const { return as_array () == o.as_array (); } |
136 | | bool operator != (const hb_vector_t &o) const { return !(*this == o); } |
137 | | uint32_t hash () const { return as_array ().hash (); } |
138 | | |
139 | | Type& operator [] (int i_) |
140 | 244M | { |
141 | 244M | unsigned int i = (unsigned int) i_; |
142 | 244M | if (unlikely (i >= length)) |
143 | 31.7M | return Crap (Type); |
144 | 213M | return arrayZ[i]; |
145 | 244M | } hb_vector_t<hb_vector_t<hb_aat_map_t::range_flags_t, true>, false>::operator[](int) Line | Count | Source | 140 | 410k | { | 141 | 410k | unsigned int i = (unsigned int) i_; | 142 | 410k | if (unlikely (i >= length)) | 143 | 0 | return Crap (Type); | 144 | 410k | return arrayZ[i]; | 145 | 410k | } |
hb_vector_t<hb_user_data_array_t::hb_user_data_item_t, false>::operator[](int) Line | Count | Source | 140 | 397k | { | 141 | 397k | unsigned int i = (unsigned int) i_; | 142 | 397k | if (unlikely (i >= length)) | 143 | 0 | return Crap (Type); | 144 | 397k | return arrayZ[i]; | 145 | 397k | } |
hb_vector_t<hb_bit_set_t::page_map_t, true>::operator[](int) Line | Count | Source | 140 | 26.9M | { | 141 | 26.9M | unsigned int i = (unsigned int) i_; | 142 | 26.9M | if (unlikely (i >= length)) | 143 | 0 | return Crap (Type); | 144 | 26.9M | return arrayZ[i]; | 145 | 26.9M | } |
hb_vector_t<unsigned int, false>::operator[](int) Line | Count | Source | 140 | 1.90M | { | 141 | 1.90M | unsigned int i = (unsigned int) i_; | 142 | 1.90M | if (unlikely (i >= length)) | 143 | 0 | return Crap (Type); | 144 | 1.90M | return arrayZ[i]; | 145 | 1.90M | } |
hb_vector_t<hb_bit_page_t, false>::operator[](int) Line | Count | Source | 140 | 783k | { | 141 | 783k | unsigned int i = (unsigned int) i_; | 142 | 783k | if (unlikely (i >= length)) | 143 | 0 | return Crap (Type); | 144 | 783k | return arrayZ[i]; | 145 | 783k | } |
hb_vector_t<hb_serialize_context_t::object_t*, false>::operator[](int) Line | Count | Source | 140 | 334k | { | 141 | 334k | unsigned int i = (unsigned int) i_; | 142 | 334k | if (unlikely (i >= length)) | 143 | 0 | return Crap (Type); | 144 | 334k | return arrayZ[i]; | 145 | 334k | } |
Unexecuted instantiation: hb_vector_t<hb_vector_t<unsigned int, false>, false>::operator[](int) Unexecuted instantiation: hb_vector_t<hb_pair_t<unsigned int, unsigned int>, true>::operator[](int) Unexecuted instantiation: hb_vector_t<OT::VarData::serialize(hb_serialize_context_t*, OT::VarData const*, hb_inc_bimap_t const&, hb_bimap_t const&)::delta_size_t, false>::operator[](int) Unexecuted instantiation: hb_vector_t<hb_set_t, false>::operator[](int) hb_vector_t<OT::hb_accelerate_subtables_context_t::hb_applicable_t, false>::operator[](int) Line | Count | Source | 140 | 5.51M | { | 141 | 5.51M | unsigned int i = (unsigned int) i_; | 142 | 5.51M | if (unlikely (i >= length)) | 143 | 0 | return Crap (Type); | 144 | 5.51M | return arrayZ[i]; | 145 | 5.51M | } |
Unexecuted instantiation: hb_vector_t<hb_aat_map_builder_t::feature_range_t, true>::operator[](int) hb_vector_t<hb_aat_map_builder_t::feature_event_t, false>::operator[](int) Line | Count | Source | 140 | 272k | { | 141 | 272k | unsigned int i = (unsigned int) i_; | 142 | 272k | if (unlikely (i >= length)) | 143 | 0 | return Crap (Type); | 144 | 272k | return arrayZ[i]; | 145 | 272k | } |
Unexecuted instantiation: hb_vector_t<hb_aat_map_builder_t::feature_info_t, true>::operator[](int) hb_vector_t<hb_aat_map_t::range_flags_t, true>::operator[](int) Line | Count | Source | 140 | 410k | { | 141 | 410k | unsigned int i = (unsigned int) i_; | 142 | 410k | if (unlikely (i >= length)) | 143 | 12.9k | return Crap (Type); | 144 | 397k | return arrayZ[i]; | 145 | 410k | } |
hb_vector_t<hb_bounds_t, false>::operator[](int) Line | Count | Source | 140 | 52.0M | { | 141 | 52.0M | unsigned int i = (unsigned int) i_; | 142 | 52.0M | if (unlikely (i >= length)) | 143 | 3.77M | return Crap (Type); | 144 | 48.2M | return arrayZ[i]; | 145 | 52.0M | } |
hb_vector_t<hb_transform_t, false>::operator[](int) Line | Count | Source | 140 | 8.08M | { | 141 | 8.08M | unsigned int i = (unsigned int) i_; | 142 | 8.08M | if (unlikely (i >= length)) | 143 | 272k | return Crap (Type); | 144 | 7.81M | return arrayZ[i]; | 145 | 8.08M | } |
Unexecuted instantiation: hb_vector_t<OT::LayerRecord, false>::operator[](int) Unexecuted instantiation: hb_vector_t<hb_set_t*, false>::operator[](int) Unexecuted instantiation: hb_vector_t<OT::index_map_subset_plan_t, false>::operator[](int) Unexecuted instantiation: hb_vector_t<hb_inc_bimap_t, false>::operator[](int) hb_vector_t<OT::contour_point_t, false>::operator[](int) Line | Count | Source | 140 | 92.4M | { | 141 | 92.4M | unsigned int i = (unsigned int) i_; | 142 | 92.4M | if (unlikely (i >= length)) | 143 | 27.7M | return Crap (Type); | 144 | 64.7M | return arrayZ[i]; | 145 | 92.4M | } |
hb_vector_t<int, false>::operator[](int) Line | Count | Source | 140 | 9.85M | { | 141 | 9.85M | unsigned int i = (unsigned int) i_; | 142 | 9.85M | if (unlikely (i >= length)) | 143 | 26.6k | return Crap (Type); | 144 | 9.83M | return arrayZ[i]; | 145 | 9.85M | } |
Unexecuted instantiation: hb_vector_t<OT::glyf_impl::SubsetGlyph, false>::operator[](int) Unexecuted instantiation: hb_vector_t<hb_pair_t<unsigned int, OT::IndexSubtableRecord const*>, false>::operator[](int) Unexecuted instantiation: hb_vector_t<OT::IndexSubtableRecord, false>::operator[](int) Unexecuted instantiation: hb_vector_t<OT::OffsetTo<OT::SBIXStrike, OT::IntType<unsigned int, 4u>, true>*, false>::operator[](int) Unexecuted instantiation: hb_vector_t<hb_array_t<unsigned char const>, false>::operator[](int) hb_vector_t<CFF::cff1_private_dict_values_base_t<CFF::dict_val_t>, false>::operator[](int) Line | Count | Source | 140 | 517k | { | 141 | 517k | unsigned int i = (unsigned int) i_; | 142 | 517k | if (unlikely (i >= length)) | 143 | 0 | return Crap (Type); | 144 | 517k | return arrayZ[i]; | 145 | 517k | } |
hb_vector_t<CFF::cff2_private_dict_values_base_t<CFF::dict_val_t>, false>::operator[](int) Line | Count | Source | 140 | 5.15M | { | 141 | 5.15M | unsigned int i = (unsigned int) i_; | 142 | 5.15M | if (unlikely (i >= length)) | 143 | 0 | return Crap (Type); | 144 | 5.15M | return arrayZ[i]; | 145 | 5.15M | } |
hb_vector_t<hb_ot_name_entry_t, false>::operator[](int) Line | Count | Source | 140 | 17.6M | { | 141 | 17.6M | unsigned int i = (unsigned int) i_; | 142 | 17.6M | if (unlikely (i >= length)) | 143 | 0 | return Crap (Type); | 144 | 17.6M | return arrayZ[i]; | 145 | 17.6M | } |
hb_vector_t<float, false>::operator[](int) Line | Count | Source | 140 | 1.39k | { | 141 | 1.39k | unsigned int i = (unsigned int) i_; | 142 | 1.39k | if (unlikely (i >= length)) | 143 | 392 | return Crap (Type); | 144 | 998 | return arrayZ[i]; | 145 | 1.39k | } |
hb_vector_t<hb_ot_map_builder_t::feature_info_t, false>::operator[](int) Line | Count | Source | 140 | 16.6M | { | 141 | 16.6M | unsigned int i = (unsigned int) i_; | 142 | 16.6M | if (unlikely (i >= length)) | 143 | 0 | return Crap (Type); | 144 | 16.6M | return arrayZ[i]; | 145 | 16.6M | } |
hb_vector_t<hb_ot_map_builder_t::stage_info_t, false>::operator[](int) Line | Count | Source | 140 | 5.61M | { | 141 | 5.61M | unsigned int i = (unsigned int) i_; | 142 | 5.61M | if (unlikely (i >= length)) | 143 | 0 | return Crap (Type); | 144 | 5.61M | return arrayZ[i]; | 145 | 5.61M | } |
|
146 | | const Type& operator [] (int i_) const |
147 | 289M | { |
148 | 289M | unsigned int i = (unsigned int) i_; |
149 | 289M | if (unlikely (i >= length)) |
150 | 299k | return Null (Type); |
151 | 288M | return arrayZ[i]; |
152 | 289M | } hb_vector_t<hb_vector_t<hb_aat_map_t::range_flags_t, true>, false>::operator[](int) const Line | Count | Source | 147 | 440k | { | 148 | 440k | unsigned int i = (unsigned int) i_; | 149 | 440k | if (unlikely (i >= length)) | 150 | 33.1k | return Null (Type); | 151 | 407k | return arrayZ[i]; | 152 | 440k | } |
Unexecuted instantiation: hb_vector_t<hb_aat_map_t::range_flags_t, true>::operator[](int) const hb_vector_t<hb_ot_map_t::stage_map_t, false>::operator[](int) const Line | Count | Source | 147 | 16.5M | { | 148 | 16.5M | unsigned int i = (unsigned int) i_; | 149 | 16.5M | if (unlikely (i >= length)) | 150 | 0 | return Null (Type); | 151 | 16.5M | return arrayZ[i]; | 152 | 16.5M | } |
Unexecuted instantiation: hb_vector_t<hb_bit_page_t, false>::operator[](int) const Unexecuted instantiation: hb_vector_t<hb_bit_set_t::page_map_t, true>::operator[](int) const hb_vector_t<unsigned int, false>::operator[](int) const Line | Count | Source | 147 | 259M | { | 148 | 259M | unsigned int i = (unsigned int) i_; | 149 | 259M | if (unlikely (i >= length)) | 150 | 0 | return Null (Type); | 151 | 259M | return arrayZ[i]; | 152 | 259M | } |
Unexecuted instantiation: hb_vector_t<hb_vector_t<unsigned int, false>, false>::operator[](int) const hb_vector_t<OT::hb_accelerate_subtables_context_t::hb_applicable_t, false>::operator[](int) const Line | Count | Source | 147 | 172k | { | 148 | 172k | unsigned int i = (unsigned int) i_; | 149 | 172k | if (unlikely (i >= length)) | 150 | 0 | return Null (Type); | 151 | 172k | return arrayZ[i]; | 152 | 172k | } |
Unexecuted instantiation: hb_vector_t<hb_pair_t<unsigned int, unsigned int>, false>::operator[](int) const Unexecuted instantiation: hb_vector_t<hb_inc_bimap_t, false>::operator[](int) const Unexecuted instantiation: hb_vector_t<OT::contour_point_t, false>::operator[](int) const Unexecuted instantiation: hb_vector_t<hb_pair_t<unsigned int, OT::IndexSubtableRecord const*>, false>::operator[](int) const Unexecuted instantiation: hb_vector_t<CFF::code_pair_t, false>::operator[](int) const Unexecuted instantiation: hb_vector_t<CFF::op_str_t, false>::operator[](int) const Unexecuted instantiation: hb_vector_t<hb_ot_name_record_ids_t, false>::operator[](int) const hb_vector_t<hb_ot_map_t::lookup_map_t, false>::operator[](int) const Line | Count | Source | 147 | 10.9M | { | 148 | 10.9M | unsigned int i = (unsigned int) i_; | 149 | 10.9M | if (unlikely (i >= length)) | 150 | 0 | return Null (Type); | 151 | 10.9M | return arrayZ[i]; | 152 | 10.9M | } |
hb_vector_t<CFF::cff1_private_dict_values_base_t<CFF::dict_val_t>, false>::operator[](int) const Line | Count | Source | 147 | 99.0k | { | 148 | 99.0k | unsigned int i = (unsigned int) i_; | 149 | 99.0k | if (unlikely (i >= length)) | 150 | 661 | return Null (Type); | 151 | 98.4k | return arrayZ[i]; | 152 | 99.0k | } |
hb_vector_t<CFF::cff2_private_dict_values_base_t<CFF::dict_val_t>, false>::operator[](int) const Line | Count | Source | 147 | 1.99M | { | 148 | 1.99M | unsigned int i = (unsigned int) i_; | 149 | 1.99M | if (unlikely (i >= length)) | 150 | 266k | return Null (Type); | 151 | 1.72M | return arrayZ[i]; | 152 | 1.99M | } |
|
153 | | |
154 | 60.9M | Type& tail () { return (*this)[length - 1]; }hb_vector_t<hb_user_data_array_t::hb_user_data_item_t, false>::tail() Line | Count | Source | 154 | 397k | Type& tail () { return (*this)[length - 1]; } |
Unexecuted instantiation: hb_vector_t<hb_serialize_context_t::object_t*, false>::tail() Unexecuted instantiation: hb_vector_t<hb_set_t, false>::tail() hb_vector_t<hb_aat_map_t::range_flags_t, true>::tail() Line | Count | Source | 154 | 410k | Type& tail () { return (*this)[length - 1]; } |
hb_vector_t<hb_bounds_t, false>::tail() Line | Count | Source | 154 | 52.0M | Type& tail () { return (*this)[length - 1]; } |
hb_vector_t<hb_transform_t, false>::tail() Line | Count | Source | 154 | 8.08M | Type& tail () { return (*this)[length - 1]; } |
Unexecuted instantiation: hb_vector_t<OT::IndexSubtableRecord, false>::tail() |
155 | | const Type& tail () const { return (*this)[length - 1]; } |
156 | | |
157 | 0 | explicit operator bool () const { return length; }Unexecuted instantiation: hb_vector_t<unsigned int, true>::operator bool() const Unexecuted instantiation: hb_vector_t<hb_pair_t<unsigned int, unsigned int>, true>::operator bool() const Unexecuted instantiation: hb_vector_t<hb_set_t, false>::operator bool() const Unexecuted instantiation: hb_vector_t<int, false>::operator bool() const |
158 | 690k | unsigned get_size () const { return length * item_size; } |
159 | | |
160 | | /* Sink interface. */ |
161 | | template <typename T> |
162 | 1.32G | hb_vector_t& operator << (T&& v) { push (std::forward<T> (v)); return *this; }Unexecuted instantiation: hb_vector_t<unsigned int, true>& hb_vector_t<unsigned int, true>::operator<< <unsigned int const&>(unsigned int const&) Unexecuted instantiation: hb_vector_t<unsigned int, true>& hb_vector_t<unsigned int, true>::operator<< <unsigned int>(unsigned int&&) Unexecuted instantiation: hb_vector_t<hb_pair_t<unsigned int, unsigned int>, false>& hb_vector_t<hb_pair_t<unsigned int, unsigned int>, false>::operator<< <hb_pair_t<unsigned int, unsigned int> const&>(hb_pair_t<unsigned int, unsigned int> const&) hb_vector_t<int, false>& hb_vector_t<int, false>::operator<< <int&>(int&) Line | Count | Source | 162 | 1.32G | hb_vector_t& operator << (T&& v) { push (std::forward<T> (v)); return *this; } |
|
163 | | |
164 | 11.4M | array_t as_array () { return hb_array (arrayZ, length); }hb_vector_t<hb_user_data_array_t::hb_user_data_item_t, false>::as_array() Line | Count | Source | 164 | 1.19M | array_t as_array () { return hb_array (arrayZ, length); } |
hb_vector_t<unsigned int, false>::as_array() Line | Count | Source | 164 | 264k | array_t as_array () { return hb_array (arrayZ, length); } |
Unexecuted instantiation: hb_vector_t<hb_serialize_context_t::object_t::link_t, false>::as_array() Unexecuted instantiation: hb_vector_t<hb_inc_bimap_t, false>::as_array() hb_vector_t<hb_aat_map_builder_t::feature_event_t, false>::as_array() Line | Count | Source | 164 | 278k | array_t as_array () { return hb_array (arrayZ, length); } |
hb_vector_t<hb_aat_map_builder_t::feature_info_t, true>::as_array() Line | Count | Source | 164 | 272k | array_t as_array () { return hb_array (arrayZ, length); } |
Unexecuted instantiation: hb_vector_t<OT::DeltaSetIndexMap const*, false>::as_array() Unexecuted instantiation: hb_vector_t<OT::index_map_subset_plan_t, false>::as_array() hb_vector_t<OT::contour_point_t, false>::as_array() Line | Count | Source | 164 | 7.54M | array_t as_array () { return hb_array (arrayZ, length); } |
hb_vector_t<int, false>::as_array() Line | Count | Source | 164 | 639k | array_t as_array () { return hb_array (arrayZ, length); } |
Unexecuted instantiation: hb_vector_t<OT::glyf_impl::SubsetGlyph, false>::as_array() hb_vector_t<OT::cff1::accelerator_t::gname_t, true>::as_array() Line | Count | Source | 164 | 44.8k | array_t as_array () { return hb_array (arrayZ, length); } |
hb_vector_t<hb_ot_name_entry_t, false>::as_array() Line | Count | Source | 164 | 399k | array_t as_array () { return hb_array (arrayZ, length); } |
hb_vector_t<hb_ot_map_builder_t::feature_info_t, false>::as_array() Line | Count | Source | 164 | 599k | array_t as_array () { return hb_array (arrayZ, length); } |
hb_vector_t<hb_ot_map_t::lookup_map_t, false>::as_array() Line | Count | Source | 164 | 225k | array_t as_array () { return hb_array (arrayZ, length); } |
|
165 | 246M | c_array_t as_array () const { return hb_array (arrayZ, length); }hb_vector_t<hb_aat_map_builder_t::feature_info_t, true>::as_array() const Line | Count | Source | 165 | 4.37M | c_array_t as_array () const { return hb_array (arrayZ, length); } |
hb_vector_t<hb_aat_map_t::range_flags_t, true>::as_array() const Line | Count | Source | 165 | 581k | c_array_t as_array () const { return hb_array (arrayZ, length); } |
hb_vector_t<hb_ot_map_t::feature_map_t, true>::as_array() const Line | Count | Source | 165 | 6.43M | c_array_t as_array () const { return hb_array (arrayZ, length); } |
hb_vector_t<hb_ot_map_t::lookup_map_t, false>::as_array() const Line | Count | Source | 165 | 26.9k | c_array_t as_array () const { return hb_array (arrayZ, length); } |
hb_vector_t<hb_bit_set_t::page_map_t, true>::as_array() const Line | Count | Source | 165 | 13.0M | c_array_t as_array () const { return hb_array (arrayZ, length); } |
Unexecuted instantiation: hb_vector_t<hb_serialize_context_t::object_t::link_t, false>::as_array() const hb_vector_t<hb_pool_t<hb_serialize_context_t::object_t, 32u>::chunk_t*, false>::as_array() const Line | Count | Source | 165 | 25.0k | c_array_t as_array () const { return hb_array (arrayZ, length); } |
hb_vector_t<hb_serialize_context_t::object_t*, false>::as_array() const Line | Count | Source | 165 | 70.0k | c_array_t as_array () const { return hb_array (arrayZ, length); } |
Unexecuted instantiation: hb_vector_t<unsigned int, false>::as_array() const Unexecuted instantiation: hb_vector_t<unsigned int, true>::as_array() const Unexecuted instantiation: hb_vector_t<hb_pair_t<unsigned int, unsigned int>, true>::as_array() const Unexecuted instantiation: hb_vector_t<hb_inc_bimap_t, false>::as_array() const hb_vector_t<OT::hb_accelerate_subtables_context_t::hb_applicable_t, false>::as_array() const Line | Count | Source | 165 | 221M | c_array_t as_array () const { return hb_array (arrayZ, length); } |
Unexecuted instantiation: hb_vector_t<hb_pair_t<unsigned int, unsigned int>, false>::as_array() const Unexecuted instantiation: hb_vector_t<OT::LayerRecord, false>::as_array() const Unexecuted instantiation: hb_vector_t<hb_array_t<unsigned char const>, false>::as_array() const |
166 | | |
167 | | /* Iterator. */ |
168 | | typedef c_array_t iter_t; |
169 | | typedef array_t writer_t; |
170 | 222M | iter_t iter () const { return as_array (); }hb_vector_t<hb_aat_map_t::range_flags_t, true>::iter() const Line | Count | Source | 170 | 581k | iter_t iter () const { return as_array (); } |
Unexecuted instantiation: hb_vector_t<hb_serialize_context_t::object_t::link_t, false>::iter() const hb_vector_t<hb_pool_t<hb_serialize_context_t::object_t, 32u>::chunk_t*, false>::iter() const Line | Count | Source | 170 | 25.0k | iter_t iter () const { return as_array (); } |
hb_vector_t<hb_serialize_context_t::object_t*, false>::iter() const Line | Count | Source | 170 | 70.0k | iter_t iter () const { return as_array (); } |
Unexecuted instantiation: hb_vector_t<unsigned int, true>::iter() const Unexecuted instantiation: hb_vector_t<hb_pair_t<unsigned int, unsigned int>, true>::iter() const Unexecuted instantiation: hb_vector_t<hb_inc_bimap_t, false>::iter() const hb_vector_t<OT::hb_accelerate_subtables_context_t::hb_applicable_t, false>::iter() const Line | Count | Source | 170 | 221M | iter_t iter () const { return as_array (); } |
Unexecuted instantiation: hb_vector_t<hb_pair_t<unsigned int, unsigned int>, false>::iter() const Unexecuted instantiation: hb_vector_t<unsigned int, false>::iter() const Unexecuted instantiation: hb_vector_t<hb_array_t<unsigned char const>, false>::iter() const |
171 | 264k | writer_t writer () { return as_array (); }hb_vector_t<unsigned int, false>::writer() Line | Count | Source | 171 | 264k | writer_t writer () { return as_array (); } |
Unexecuted instantiation: hb_vector_t<hb_serialize_context_t::object_t::link_t, false>::writer() Unexecuted instantiation: hb_vector_t<OT::glyf_impl::SubsetGlyph, false>::writer() |
172 | 0 | operator iter_t () const { return iter (); } |
173 | 122k | operator writer_t () { return writer (); } |
174 | | |
175 | | /* Faster range-based for loop. */ |
176 | 5.75M | Type *begin () const { return arrayZ; }Unexecuted instantiation: hb_vector_t<hb_bit_set_t::page_map_t, true>::begin() const hb_vector_t<hb_serialize_context_t::object_t::link_t, false>::begin() const Line | Count | Source | 176 | 294k | Type *begin () const { return arrayZ; } |
hb_vector_t<OT::hb_accelerate_subtables_context_t::hb_applicable_t, false>::begin() const Line | Count | Source | 176 | 2.35M | Type *begin () const { return arrayZ; } |
hb_vector_t<hb_vector_t<hb_aat_map_t::range_flags_t, true>, false>::begin() const Line | Count | Source | 176 | 278k | Type *begin () const { return arrayZ; } |
Unexecuted instantiation: hb_vector_t<unsigned int, false>::begin() const hb_vector_t<hb_ot_map_t::feature_map_t, true>::begin() const Line | Count | Source | 176 | 2.83M | Type *begin () const { return arrayZ; } |
|
177 | 5.75M | Type *end () const { return arrayZ + length; }Unexecuted instantiation: hb_vector_t<hb_bit_set_t::page_map_t, true>::end() const hb_vector_t<hb_serialize_context_t::object_t::link_t, false>::end() const Line | Count | Source | 177 | 294k | Type *end () const { return arrayZ + length; } |
hb_vector_t<OT::hb_accelerate_subtables_context_t::hb_applicable_t, false>::end() const Line | Count | Source | 177 | 2.35M | Type *end () const { return arrayZ + length; } |
hb_vector_t<hb_vector_t<hb_aat_map_t::range_flags_t, true>, false>::end() const Line | Count | Source | 177 | 278k | Type *end () const { return arrayZ + length; } |
Unexecuted instantiation: hb_vector_t<unsigned int, false>::end() const hb_vector_t<hb_ot_map_t::feature_map_t, true>::end() const Line | Count | Source | 177 | 2.83M | Type *end () const { return arrayZ + length; } |
|
178 | | |
179 | | |
180 | | hb_sorted_array_t<Type> as_sorted_array () |
181 | | { return hb_sorted_array (arrayZ, length); } |
182 | | hb_sorted_array_t<const Type> as_sorted_array () const |
183 | | { return hb_sorted_array (arrayZ, length); } |
184 | | |
185 | | template <typename T> explicit operator T * () { return arrayZ; } |
186 | 2.78M | template <typename T> explicit operator const T * () const { return arrayZ; } |
187 | | |
188 | | Type * operator + (unsigned int i) { return arrayZ + i; } |
189 | | const Type * operator + (unsigned int i) const { return arrayZ + i; } |
190 | | |
191 | | Type *push () |
192 | 69.3M | { |
193 | 69.3M | if (unlikely (!resize (length + 1))) |
194 | 847k | return &Crap (Type); |
195 | 68.4M | return std::addressof (arrayZ[length - 1]); |
196 | 69.3M | } hb_vector_t<hb_serialize_context_t::object_t::link_t, false>::push() Line | Count | Source | 192 | 293k | { | 193 | 293k | if (unlikely (!resize (length + 1))) | 194 | 1.81k | return &Crap (Type); | 195 | 291k | return std::addressof (arrayZ[length - 1]); | 196 | 293k | } |
Unexecuted instantiation: hb_vector_t<hb_vector_t<unsigned int, false>, false>::push() Unexecuted instantiation: hb_vector_t<hb_inc_bimap_t, false>::push() Unexecuted instantiation: hb_vector_t<hb_set_t, false>::push() hb_vector_t<OT::hb_accelerate_subtables_context_t::hb_applicable_t, false>::push() Line | Count | Source | 192 | 2.91M | { | 193 | 2.91M | if (unlikely (!resize (length + 1))) | 194 | 115k | return &Crap (Type); | 195 | 2.79M | return std::addressof (arrayZ[length - 1]); | 196 | 2.91M | } |
Unexecuted instantiation: hb_vector_t<hb_aat_map_builder_t::feature_range_t, true>::push() hb_vector_t<hb_aat_map_builder_t::feature_event_t, false>::push() Line | Count | Source | 192 | 278k | { | 193 | 278k | if (unlikely (!resize (length + 1))) | 194 | 6.35k | return &Crap (Type); | 195 | 272k | return std::addressof (arrayZ[length - 1]); | 196 | 278k | } |
hb_vector_t<CFF::cff1_font_dict_values_t, false>::push() Line | Count | Source | 192 | 122k | { | 193 | 122k | if (unlikely (!resize (length + 1))) | 194 | 24 | return &Crap (Type); | 195 | 122k | return std::addressof (arrayZ[length - 1]); | 196 | 122k | } |
hb_vector_t<CFF::cff2_font_dict_values_t, false>::push() Line | Count | Source | 192 | 1.02M | { | 193 | 1.02M | if (unlikely (!resize (length + 1))) | 194 | 127 | return &Crap (Type); | 195 | 1.02M | return std::addressof (arrayZ[length - 1]); | 196 | 1.02M | } |
hb_vector_t<hb_ot_name_entry_t, false>::push() Line | Count | Source | 192 | 6.42M | { | 193 | 6.42M | if (unlikely (!resize (length + 1))) | 194 | 17.7k | return &Crap (Type); | 195 | 6.40M | return std::addressof (arrayZ[length - 1]); | 196 | 6.42M | } |
hb_vector_t<hb_ot_map_builder_t::feature_info_t, false>::push() Line | Count | Source | 192 | 17.3M | { | 193 | 17.3M | if (unlikely (!resize (length + 1))) | 194 | 330k | return &Crap (Type); | 195 | 16.9M | return std::addressof (arrayZ[length - 1]); | 196 | 17.3M | } |
hb_vector_t<hb_ot_map_t::lookup_map_t, false>::push() Line | Count | Source | 192 | 33.7M | { | 193 | 33.7M | if (unlikely (!resize (length + 1))) | 194 | 310k | return &Crap (Type); | 195 | 33.4M | return std::addressof (arrayZ[length - 1]); | 196 | 33.7M | } |
hb_vector_t<hb_ot_map_builder_t::stage_info_t, false>::push() Line | Count | Source | 192 | 2.83M | { | 193 | 2.83M | if (unlikely (!resize (length + 1))) | 194 | 27.1k | return &Crap (Type); | 195 | 2.80M | return std::addressof (arrayZ[length - 1]); | 196 | 2.83M | } |
hb_vector_t<hb_ot_map_t::feature_map_t, true>::push() Line | Count | Source | 192 | 1.48M | { | 193 | 1.48M | if (unlikely (!resize (length + 1))) | 194 | 10.7k | return &Crap (Type); | 195 | 1.47M | return std::addressof (arrayZ[length - 1]); | 196 | 1.48M | } |
hb_vector_t<hb_ot_map_t::stage_map_t, false>::push() Line | Count | Source | 192 | 2.80M | { | 193 | 2.80M | if (unlikely (!resize (length + 1))) | 194 | 26.4k | return &Crap (Type); | 195 | 2.77M | return std::addressof (arrayZ[length - 1]); | 196 | 2.80M | } |
|
197 | | template <typename T, |
198 | | typename T2 = Type, |
199 | | hb_enable_if (!std::is_copy_constructible<T2>::value && |
200 | | std::is_copy_assignable<T>::value)> |
201 | | Type *push (T&& v) |
202 | | { |
203 | | Type *p = push (); |
204 | | if (p == &Crap (Type)) |
205 | | // If push failed to allocate then don't copy v, since this may cause |
206 | | // the created copy to leak memory since we won't have stored a |
207 | | // reference to it. |
208 | | return p; |
209 | | *p = std::forward<T> (v); |
210 | | return p; |
211 | | } |
212 | | template <typename T, |
213 | | typename T2 = Type, |
214 | | hb_enable_if (std::is_copy_constructible<T2>::value)> |
215 | | Type *push (T&& v) |
216 | 1.41G | { |
217 | 1.41G | if (unlikely (!alloc (length + 1))) |
218 | | // If push failed to allocate then don't copy v, since this may cause |
219 | | // the created copy to leak memory since we won't have stored a |
220 | | // reference to it. |
221 | 4.20M | return &Crap (Type); |
222 | | |
223 | | /* Emplace. */ |
224 | 1.41G | length++; |
225 | 1.41G | Type *p = std::addressof (arrayZ[length - 1]); |
226 | 1.41G | return new (p) Type (std::forward<T> (v)); |
227 | 1.41G | } hb_aat_map_t::range_flags_t* hb_vector_t<hb_aat_map_t::range_flags_t, true>::push<hb_aat_map_t::range_flags_t, hb_aat_map_t::range_flags_t, (void*)0>(hb_aat_map_t::range_flags_t&&) Line | Count | Source | 216 | 410k | { | 217 | 410k | if (unlikely (!alloc (length + 1))) | 218 | | // If push failed to allocate then don't copy v, since this may cause | 219 | | // the created copy to leak memory since we won't have stored a | 220 | | // reference to it. | 221 | 12.9k | return &Crap (Type); | 222 | | | 223 | | /* Emplace. */ | 224 | 397k | length++; | 225 | 397k | Type *p = std::addressof (arrayZ[length - 1]); | 226 | 397k | return new (p) Type (std::forward<T> (v)); | 227 | 410k | } |
hb_user_data_array_t::hb_user_data_item_t* hb_vector_t<hb_user_data_array_t::hb_user_data_item_t, false>::push<hb_user_data_array_t::hb_user_data_item_t&, hb_user_data_array_t::hb_user_data_item_t, (void*)0>(hb_user_data_array_t::hb_user_data_item_t&) Line | Count | Source | 216 | 411k | { | 217 | 411k | if (unlikely (!alloc (length + 1))) | 218 | | // If push failed to allocate then don't copy v, since this may cause | 219 | | // the created copy to leak memory since we won't have stored a | 220 | | // reference to it. | 221 | 14.3k | return &Crap (Type); | 222 | | | 223 | | /* Emplace. */ | 224 | 397k | length++; | 225 | 397k | Type *p = std::addressof (arrayZ[length - 1]); | 226 | 397k | return new (p) Type (std::forward<T> (v)); | 227 | 411k | } |
Unexecuted instantiation: hb_serialize_context_t::object_t::link_t* hb_vector_t<hb_serialize_context_t::object_t::link_t, false>::push<hb_link_t&, hb_serialize_context_t::object_t::link_t, (void*)0>(hb_link_t&) hb_serialize_context_t::object_t** hb_vector_t<hb_serialize_context_t::object_t*, false>::push<decltype(nullptr), hb_serialize_context_t::object_t*, (void*)0>(decltype(nullptr)&&) Line | Count | Source | 216 | 25.0k | { | 217 | 25.0k | if (unlikely (!alloc (length + 1))) | 218 | | // If push failed to allocate then don't copy v, since this may cause | 219 | | // the created copy to leak memory since we won't have stored a | 220 | | // reference to it. | 221 | 792 | return &Crap (Type); | 222 | | | 223 | | /* Emplace. */ | 224 | 24.2k | length++; | 225 | 24.2k | Type *p = std::addressof (arrayZ[length - 1]); | 226 | 24.2k | return new (p) Type (std::forward<T> (v)); | 227 | 25.0k | } |
hb_serialize_context_t::object_t** hb_vector_t<hb_serialize_context_t::object_t*, false>::push<hb_serialize_context_t::object_t*&, hb_serialize_context_t::object_t*, (void*)0>(hb_serialize_context_t::object_t*&) Line | Count | Source | 216 | 216k | { | 217 | 216k | if (unlikely (!alloc (length + 1))) | 218 | | // If push failed to allocate then don't copy v, since this may cause | 219 | | // the created copy to leak memory since we won't have stored a | 220 | | // reference to it. | 221 | 962 | return &Crap (Type); | 222 | | | 223 | | /* Emplace. */ | 224 | 215k | length++; | 225 | 215k | Type *p = std::addressof (arrayZ[length - 1]); | 226 | 215k | return new (p) Type (std::forward<T> (v)); | 227 | 216k | } |
Unexecuted instantiation: hb_serialize_context_t::object_t::link_t* hb_vector_t<hb_serialize_context_t::object_t::link_t, false>::push<hb_serialize_context_t::object_t::link_t const&, hb_serialize_context_t::object_t::link_t, (void*)0>(hb_serialize_context_t::object_t::link_t const&) unsigned int* hb_vector_t<unsigned int, false>::push<unsigned int&, unsigned int, (void*)0>(unsigned int&) Line | Count | Source | 216 | 10.3k | { | 217 | 10.3k | if (unlikely (!alloc (length + 1))) | 218 | | // If push failed to allocate then don't copy v, since this may cause | 219 | | // the created copy to leak memory since we won't have stored a | 220 | | // reference to it. | 221 | 726 | return &Crap (Type); | 222 | | | 223 | | /* Emplace. */ | 224 | 9.63k | length++; | 225 | 9.63k | Type *p = std::addressof (arrayZ[length - 1]); | 226 | 9.63k | return new (p) Type (std::forward<T> (v)); | 227 | 10.3k | } |
Unexecuted instantiation: unsigned int* hb_vector_t<unsigned int, true>::push<unsigned int const&, unsigned int, (void*)0>(unsigned int const&) hb_pool_t<hb_serialize_context_t::object_t, 32u>::chunk_t** hb_vector_t<hb_pool_t<hb_serialize_context_t::object_t, 32u>::chunk_t*, false>::push<hb_pool_t<hb_serialize_context_t::object_t, 32u>::chunk_t*&, hb_pool_t<hb_serialize_context_t::object_t, 32u>::chunk_t*, (void*)0>(hb_pool_t<hb_serialize_context_t::object_t, 32u>::chunk_t*&) Line | Count | Source | 216 | 28.8k | { | 217 | 28.8k | if (unlikely (!alloc (length + 1))) | 218 | | // If push failed to allocate then don't copy v, since this may cause | 219 | | // the created copy to leak memory since we won't have stored a | 220 | | // reference to it. | 221 | 0 | return &Crap (Type); | 222 | | | 223 | | /* Emplace. */ | 224 | 28.8k | length++; | 225 | 28.8k | Type *p = std::addressof (arrayZ[length - 1]); | 226 | 28.8k | return new (p) Type (std::forward<T> (v)); | 227 | 28.8k | } |
Unexecuted instantiation: hb_pair_t<unsigned int, unsigned int>* hb_vector_t<hb_pair_t<unsigned int, unsigned int>, true>::push<hb_pair_t<unsigned int&, unsigned int&>, hb_pair_t<unsigned int, unsigned int>, (void*)0>(hb_pair_t<unsigned int&, unsigned int&>&&) Unexecuted instantiation: unsigned int* hb_vector_t<unsigned int, false>::push<unsigned int, unsigned int, (void*)0>(unsigned int&&) Unexecuted instantiation: unsigned int* hb_vector_t<unsigned int, true>::push<unsigned int, unsigned int, (void*)0>(unsigned int&&) Unexecuted instantiation: hb_aat_map_builder_t::feature_info_t* hb_vector_t<hb_aat_map_builder_t::feature_info_t, true>::push<hb_aat_map_builder_t::feature_info_t&, hb_aat_map_builder_t::feature_info_t, (void*)0>(hb_aat_map_builder_t::feature_info_t&) Unexecuted instantiation: hb_pair_t<unsigned int, unsigned int>* hb_vector_t<hb_pair_t<unsigned int, unsigned int>, false>::push<hb_pair_t<unsigned int, unsigned int>&, hb_pair_t<unsigned int, unsigned int>, (void*)0>(hb_pair_t<unsigned int, unsigned int>&) Unexecuted instantiation: hb_pair_t<unsigned int, unsigned int>* hb_vector_t<hb_pair_t<unsigned int, unsigned int>, false>::push<hb_pair_t<unsigned int, unsigned int> const&, hb_pair_t<unsigned int, unsigned int>, (void*)0>(hb_pair_t<unsigned int, unsigned int> const&) hb_transform_t* hb_vector_t<hb_transform_t, false>::push<hb_transform_t, hb_transform_t, (void*)0>(hb_transform_t&&) Line | Count | Source | 216 | 100k | { | 217 | 100k | if (unlikely (!alloc (length + 1))) | 218 | | // If push failed to allocate then don't copy v, since this may cause | 219 | | // the created copy to leak memory since we won't have stored a | 220 | | // reference to it. | 221 | 2.55k | return &Crap (Type); | 222 | | | 223 | | /* Emplace. */ | 224 | 97.7k | length++; | 225 | 97.7k | Type *p = std::addressof (arrayZ[length - 1]); | 226 | 97.7k | return new (p) Type (std::forward<T> (v)); | 227 | 100k | } |
hb_bounds_t* hb_vector_t<hb_bounds_t, false>::push<hb_bounds_t, hb_bounds_t, (void*)0>(hb_bounds_t&&) Line | Count | Source | 216 | 50.8M | { | 217 | 50.8M | if (unlikely (!alloc (length + 1))) | 218 | | // If push failed to allocate then don't copy v, since this may cause | 219 | | // the created copy to leak memory since we won't have stored a | 220 | | // reference to it. | 221 | 3.69M | return &Crap (Type); | 222 | | | 223 | | /* Emplace. */ | 224 | 47.1M | length++; | 225 | 47.1M | Type *p = std::addressof (arrayZ[length - 1]); | 226 | 47.1M | return new (p) Type (std::forward<T> (v)); | 227 | 50.8M | } |
hb_transform_t* hb_vector_t<hb_transform_t, false>::push<hb_transform_t&, hb_transform_t, (void*)0>(hb_transform_t&) Line | Count | Source | 216 | 5.94M | { | 217 | 5.94M | if (unlikely (!alloc (length + 1))) | 218 | | // If push failed to allocate then don't copy v, since this may cause | 219 | | // the created copy to leak memory since we won't have stored a | 220 | | // reference to it. | 221 | 212k | return &Crap (Type); | 222 | | | 223 | | /* Emplace. */ | 224 | 5.73M | length++; | 225 | 5.73M | Type *p = std::addressof (arrayZ[length - 1]); | 226 | 5.73M | return new (p) Type (std::forward<T> (v)); | 227 | 5.94M | } |
Unexecuted instantiation: OT::DeltaSetIndexMap const** hb_vector_t<OT::DeltaSetIndexMap const*, false>::push<OT::DeltaSetIndexMap const*, OT::DeltaSetIndexMap const*, (void*)0>(OT::DeltaSetIndexMap const*&&) Unexecuted instantiation: unsigned char* hb_vector_t<unsigned char, false>::push<unsigned char&, unsigned char, (void*)0>(unsigned char&) int* hb_vector_t<int, false>::push<int&, int, (void*)0>(int&) Line | Count | Source | 216 | 1.32G | { | 217 | 1.32G | if (unlikely (!alloc (length + 1))) | 218 | | // If push failed to allocate then don't copy v, since this may cause | 219 | | // the created copy to leak memory since we won't have stored a | 220 | | // reference to it. | 221 | 90.7k | return &Crap (Type); | 222 | | | 223 | | /* Emplace. */ | 224 | 1.32G | length++; | 225 | 1.32G | Type *p = std::addressof (arrayZ[length - 1]); | 226 | 1.32G | return new (p) Type (std::forward<T> (v)); | 227 | 1.32G | } |
Unexecuted instantiation: hb_variation_t* hb_vector_t<hb_variation_t, false>::push<hb_variation_t&, hb_variation_t, (void*)0>(hb_variation_t&) Unexecuted instantiation: hb_pair_t<unsigned int, OT::IndexSubtableRecord const*>* hb_vector_t<hb_pair_t<unsigned int, OT::IndexSubtableRecord const*>, false>::push<hb_pair_t<unsigned int, OT::IndexSubtableRecord const*>, hb_pair_t<unsigned int, OT::IndexSubtableRecord const*>, (void*)0>(hb_pair_t<unsigned int, OT::IndexSubtableRecord const*>&&) Unexecuted instantiation: unsigned int* hb_vector_t<unsigned int, false>::push<OT::IntType<unsigned short, 2u> const&, unsigned int, (void*)0>(OT::IntType<unsigned short, 2u> const&) Unexecuted instantiation: OT::OffsetTo<OT::SBIXStrike, OT::IntType<unsigned int, 4u>, true>** hb_vector_t<OT::OffsetTo<OT::SBIXStrike, OT::IntType<unsigned int, 4u>, true>*, false>::push<OT::OffsetTo<OT::SBIXStrike, OT::IntType<unsigned int, 4u>, true>*&, OT::OffsetTo<OT::SBIXStrike, OT::IntType<unsigned int, 4u>, true>*, (void*)0>(OT::OffsetTo<OT::SBIXStrike, OT::IntType<unsigned int, 4u>, true>*&) Unexecuted instantiation: unsigned int* hb_vector_t<unsigned int, false>::push<OT::IntType<unsigned char, 1u> const&, unsigned int, (void*)0>(OT::IntType<unsigned char, 1u> const&) CFF::cff1_top_dict_val_t* hb_vector_t<CFF::cff1_top_dict_val_t, false>::push<CFF::cff1_top_dict_val_t const&, CFF::cff1_top_dict_val_t, (void*)0>(CFF::cff1_top_dict_val_t const&) Line | Count | Source | 216 | 399k | { | 217 | 399k | if (unlikely (!alloc (length + 1))) | 218 | | // If push failed to allocate then don't copy v, since this may cause | 219 | | // the created copy to leak memory since we won't have stored a | 220 | | // reference to it. | 221 | 3.56k | return &Crap (Type); | 222 | | | 223 | | /* Emplace. */ | 224 | 396k | length++; | 225 | 396k | Type *p = std::addressof (arrayZ[length - 1]); | 226 | 396k | return new (p) Type (std::forward<T> (v)); | 227 | 399k | } |
CFF::op_str_t* hb_vector_t<CFF::op_str_t, false>::push<CFF::op_str_t const&, CFF::op_str_t, (void*)0>(CFF::op_str_t const&) Line | Count | Source | 216 | 206k | { | 217 | 206k | if (unlikely (!alloc (length + 1))) | 218 | | // If push failed to allocate then don't copy v, since this may cause | 219 | | // the created copy to leak memory since we won't have stored a | 220 | | // reference to it. | 221 | 1.75k | return &Crap (Type); | 222 | | | 223 | | /* Emplace. */ | 224 | 204k | length++; | 225 | 204k | Type *p = std::addressof (arrayZ[length - 1]); | 226 | 204k | return new (p) Type (std::forward<T> (v)); | 227 | 206k | } |
CFF::dict_val_t* hb_vector_t<CFF::dict_val_t, false>::push<CFF::dict_val_t const&, CFF::dict_val_t, (void*)0>(CFF::dict_val_t const&) Line | Count | Source | 216 | 542k | { | 217 | 542k | if (unlikely (!alloc (length + 1))) | 218 | | // If push failed to allocate then don't copy v, since this may cause | 219 | | // the created copy to leak memory since we won't have stored a | 220 | | // reference to it. | 221 | 5.54k | return &Crap (Type); | 222 | | | 223 | | /* Emplace. */ | 224 | 536k | length++; | 225 | 536k | Type *p = std::addressof (arrayZ[length - 1]); | 226 | 536k | return new (p) Type (std::forward<T> (v)); | 227 | 542k | } |
OT::cff1::accelerator_t::gname_t* hb_vector_t<OT::cff1::accelerator_t::gname_t, true>::push<OT::cff1::accelerator_t::gname_t&, OT::cff1::accelerator_t::gname_t, (void*)0>(OT::cff1::accelerator_t::gname_t&) Line | Count | Source | 216 | 6.13M | { | 217 | 6.13M | if (unlikely (!alloc (length + 1))) | 218 | | // If push failed to allocate then don't copy v, since this may cause | 219 | | // the created copy to leak memory since we won't have stored a | 220 | | // reference to it. | 221 | 0 | return &Crap (Type); | 222 | | | 223 | | /* Emplace. */ | 224 | 6.13M | length++; | 225 | 6.13M | Type *p = std::addressof (arrayZ[length - 1]); | 226 | 6.13M | return new (p) Type (std::forward<T> (v)); | 227 | 6.13M | } |
Unexecuted instantiation: hb_ot_name_record_ids_t* hb_vector_t<hb_ot_name_record_ids_t, false>::push<hb_ot_name_record_ids_t const&, hb_ot_name_record_ids_t, (void*)0>(hb_ot_name_record_ids_t const&) unsigned int* hb_vector_t<unsigned int, false>::push<long, unsigned int, (void*)0>(long&&) Line | Count | Source | 216 | 25.3M | { | 217 | 25.3M | if (unlikely (!alloc (length + 1))) | 218 | | // If push failed to allocate then don't copy v, since this may cause | 219 | | // the created copy to leak memory since we won't have stored a | 220 | | // reference to it. | 221 | 159k | return &Crap (Type); | 222 | | | 223 | | /* Emplace. */ | 224 | 25.1M | length++; | 225 | 25.1M | Type *p = std::addressof (arrayZ[length - 1]); | 226 | 25.1M | return new (p) Type (std::forward<T> (v)); | 227 | 25.3M | } |
Unexecuted instantiation: unsigned int* hb_vector_t<unsigned int, true>::push<unsigned int&, unsigned int, (void*)0>(unsigned int&) |
228 | | |
229 | 1.54G | bool in_error () const { return allocated < 0; }hb_vector_t<hb_vector_t<hb_aat_map_t::range_flags_t, true>, false>::in_error() const Line | Count | Source | 229 | 489k | bool in_error () const { return allocated < 0; } |
hb_vector_t<hb_aat_map_t::range_flags_t, true>::in_error() const Line | Count | Source | 229 | 821k | bool in_error () const { return allocated < 0; } |
hb_vector_t<hb_user_data_array_t::hb_user_data_item_t, false>::in_error() const Line | Count | Source | 229 | 1.22M | bool in_error () const { return allocated < 0; } |
hb_vector_t<hb_bit_page_t, false>::in_error() const Line | Count | Source | 229 | 10.9M | bool in_error () const { return allocated < 0; } |
hb_vector_t<hb_bit_set_t::page_map_t, true>::in_error() const Line | Count | Source | 229 | 10.9M | bool in_error () const { return allocated < 0; } |
hb_vector_t<hb_serialize_context_t::object_t*, false>::in_error() const Line | Count | Source | 229 | 517k | bool in_error () const { return allocated < 0; } |
hb_vector_t<hb_serialize_context_t::object_t::link_t, false>::in_error() const Line | Count | Source | 229 | 694k | bool in_error () const { return allocated < 0; } |
hb_vector_t<unsigned int, false>::in_error() const Line | Count | Source | 229 | 26.0M | bool in_error () const { return allocated < 0; } |
Unexecuted instantiation: hb_vector_t<hb_vector_t<unsigned int, false>, false>::in_error() const Unexecuted instantiation: hb_vector_t<unsigned int, true>::in_error() const hb_vector_t<hb_pool_t<hb_serialize_context_t::object_t, 32u>::chunk_t*, false>::in_error() const Line | Count | Source | 229 | 84.2k | bool in_error () const { return allocated < 0; } |
Unexecuted instantiation: hb_vector_t<hb_pair_t<unsigned int, unsigned int>, true>::in_error() const Unexecuted instantiation: hb_vector_t<OT::VarData::serialize(hb_serialize_context_t*, OT::VarData const*, hb_inc_bimap_t const&, hb_bimap_t const&)::delta_size_t, false>::in_error() const Unexecuted instantiation: hb_vector_t<hb_inc_bimap_t, false>::in_error() const Unexecuted instantiation: hb_vector_t<hb_set_t, false>::in_error() const hb_vector_t<OT::hb_accelerate_subtables_context_t::hb_applicable_t, false>::in_error() const Line | Count | Source | 229 | 6.72M | bool in_error () const { return allocated < 0; } |
Unexecuted instantiation: hb_vector_t<hb_aat_map_builder_t::feature_range_t, true>::in_error() const hb_vector_t<hb_aat_map_builder_t::feature_event_t, false>::in_error() const Line | Count | Source | 229 | 557k | bool in_error () const { return allocated < 0; } |
hb_vector_t<hb_aat_map_builder_t::feature_info_t, true>::in_error() const Line | Count | Source | 229 | 1.08M | bool in_error () const { return allocated < 0; } |
Unexecuted instantiation: hb_vector_t<hb_pair_t<unsigned int, unsigned int>, false>::in_error() const hb_vector_t<hb_transform_t, false>::in_error() const Line | Count | Source | 229 | 6.16M | bool in_error () const { return allocated < 0; } |
hb_vector_t<hb_bounds_t, false>::in_error() const Line | Count | Source | 229 | 51.1M | bool in_error () const { return allocated < 0; } |
Unexecuted instantiation: hb_vector_t<OT::LayerRecord, false>::in_error() const Unexecuted instantiation: hb_vector_t<OT::index_map_subset_plan_t, false>::in_error() const Unexecuted instantiation: hb_vector_t<hb_set_t*, false>::in_error() const Unexecuted instantiation: hb_vector_t<OT::DeltaSetIndexMap const*, false>::in_error() const hb_vector_t<OT::contour_point_t, false>::in_error() const Line | Count | Source | 229 | 14.2M | bool in_error () const { return allocated < 0; } |
hb_vector_t<int, false>::in_error() const Line | Count | Source | 229 | 1.32G | bool in_error () const { return allocated < 0; } |
Unexecuted instantiation: hb_vector_t<unsigned char, false>::in_error() const Unexecuted instantiation: hb_vector_t<OT::glyf_impl::SubsetGlyph, false>::in_error() const Unexecuted instantiation: hb_vector_t<hb_variation_t, false>::in_error() const hb_vector_t<char, false>::in_error() const Line | Count | Source | 229 | 20.8k | bool in_error () const { return allocated < 0; } |
Unexecuted instantiation: hb_vector_t<OT::IndexSubtableRecord, false>::in_error() const Unexecuted instantiation: hb_vector_t<hb_pair_t<unsigned int, OT::IndexSubtableRecord const*>, false>::in_error() const Unexecuted instantiation: hb_vector_t<OT::OffsetTo<OT::SBIXStrike, OT::IntType<unsigned int, 4u>, true>*, false>::in_error() const Unexecuted instantiation: hb_vector_t<hb_array_t<unsigned char const>, false>::in_error() const hb_vector_t<CFF::cff1_top_dict_val_t, false>::in_error() const Line | Count | Source | 229 | 470k | bool in_error () const { return allocated < 0; } |
hb_vector_t<CFF::op_str_t, false>::in_error() const Line | Count | Source | 229 | 297k | bool in_error () const { return allocated < 0; } |
hb_vector_t<CFF::dict_val_t, false>::in_error() const Line | Count | Source | 229 | 645k | bool in_error () const { return allocated < 0; } |
hb_vector_t<CFF::cff1_private_dict_values_base_t<CFF::dict_val_t>, false>::in_error() const Line | Count | Source | 229 | 65.4k | bool in_error () const { return allocated < 0; } |
hb_vector_t<CFF::cff1_font_dict_values_t, false>::in_error() const Line | Count | Source | 229 | 250k | bool in_error () const { return allocated < 0; } |
hb_vector_t<OT::cff1::accelerator_t::gname_t, true>::in_error() const Line | Count | Source | 229 | 6.23M | bool in_error () const { return allocated < 0; } |
hb_vector_t<CFF::cff2_private_dict_values_base_t<CFF::dict_val_t>, false>::in_error() const Line | Count | Source | 229 | 50.7k | bool in_error () const { return allocated < 0; } |
hb_vector_t<CFF::cff2_font_dict_values_t, false>::in_error() const Line | Count | Source | 229 | 1.05M | bool in_error () const { return allocated < 0; } |
Unexecuted instantiation: hb_vector_t<hb_ot_name_record_ids_t, false>::in_error() const hb_vector_t<hb_ot_name_entry_t, false>::in_error() const Line | Count | Source | 229 | 7.30M | bool in_error () const { return allocated < 0; } |
hb_vector_t<float, false>::in_error() const Line | Count | Source | 229 | 2.48k | bool in_error () const { return allocated < 0; } |
Unexecuted instantiation: hb_vector_t<CFF::number_t, false>::in_error() const hb_vector_t<hb_ot_map_builder_t::feature_info_t, false>::in_error() const Line | Count | Source | 229 | 19.2M | bool in_error () const { return allocated < 0; } |
hb_vector_t<hb_ot_map_t::lookup_map_t, false>::in_error() const Line | Count | Source | 229 | 34.6M | bool in_error () const { return allocated < 0; } |
hb_vector_t<hb_ot_map_builder_t::stage_info_t, false>::in_error() const Line | Count | Source | 229 | 4.12M | bool in_error () const { return allocated < 0; } |
hb_vector_t<hb_ot_map_t::feature_map_t, true>::in_error() const Line | Count | Source | 229 | 2.09M | bool in_error () const { return allocated < 0; } |
hb_vector_t<hb_ot_map_t::stage_map_t, false>::in_error() const Line | Count | Source | 229 | 4.08M | bool in_error () const { return allocated < 0; } |
|
230 | | |
231 | | template <typename T = Type, |
232 | | hb_enable_if (hb_is_trivially_copy_assignable(T))> |
233 | | Type * |
234 | | realloc_vector (unsigned new_allocated) |
235 | 14.4M | { |
236 | 14.4M | if (!new_allocated) |
237 | 0 | { |
238 | 0 | hb_free (arrayZ); |
239 | 0 | return nullptr; |
240 | 0 | } |
241 | 14.4M | return (Type *) hb_realloc (arrayZ, new_allocated * sizeof (Type)); |
242 | 14.4M | } hb_aat_map_t::range_flags_t* hb_vector_t<hb_aat_map_t::range_flags_t, true>::realloc_vector<hb_aat_map_t::range_flags_t, (void*)0>(unsigned int) Line | Count | Source | 235 | 410k | { | 236 | 410k | if (!new_allocated) | 237 | 0 | { | 238 | 0 | hb_free (arrayZ); | 239 | 0 | return nullptr; | 240 | 0 | } | 241 | 410k | return (Type *) hb_realloc (arrayZ, new_allocated * sizeof (Type)); | 242 | 410k | } |
hb_user_data_array_t::hb_user_data_item_t* hb_vector_t<hb_user_data_array_t::hb_user_data_item_t, false>::realloc_vector<hb_user_data_array_t::hb_user_data_item_t, (void*)0>(unsigned int) Line | Count | Source | 235 | 403k | { | 236 | 403k | if (!new_allocated) | 237 | 0 | { | 238 | 0 | hb_free (arrayZ); | 239 | 0 | return nullptr; | 240 | 0 | } | 241 | 403k | return (Type *) hb_realloc (arrayZ, new_allocated * sizeof (Type)); | 242 | 403k | } |
hb_bit_page_t* hb_vector_t<hb_bit_page_t, false>::realloc_vector<hb_bit_page_t, (void*)0>(unsigned int) Line | Count | Source | 235 | 706k | { | 236 | 706k | if (!new_allocated) | 237 | 0 | { | 238 | 0 | hb_free (arrayZ); | 239 | 0 | return nullptr; | 240 | 0 | } | 241 | 706k | return (Type *) hb_realloc (arrayZ, new_allocated * sizeof (Type)); | 242 | 706k | } |
hb_bit_set_t::page_map_t* hb_vector_t<hb_bit_set_t::page_map_t, true>::realloc_vector<hb_bit_set_t::page_map_t, (void*)0>(unsigned int) Line | Count | Source | 235 | 700k | { | 236 | 700k | if (!new_allocated) | 237 | 0 | { | 238 | 0 | hb_free (arrayZ); | 239 | 0 | return nullptr; | 240 | 0 | } | 241 | 700k | return (Type *) hb_realloc (arrayZ, new_allocated * sizeof (Type)); | 242 | 700k | } |
hb_serialize_context_t::object_t::link_t* hb_vector_t<hb_serialize_context_t::object_t::link_t, false>::realloc_vector<hb_serialize_context_t::object_t::link_t, (void*)0>(unsigned int) Line | Count | Source | 235 | 107k | { | 236 | 107k | if (!new_allocated) | 237 | 0 | { | 238 | 0 | hb_free (arrayZ); | 239 | 0 | return nullptr; | 240 | 0 | } | 241 | 107k | return (Type *) hb_realloc (arrayZ, new_allocated * sizeof (Type)); | 242 | 107k | } |
hb_serialize_context_t::object_t** hb_vector_t<hb_serialize_context_t::object_t*, false>::realloc_vector<hb_serialize_context_t::object_t*, (void*)0>(unsigned int) Line | Count | Source | 235 | 34.8k | { | 236 | 34.8k | if (!new_allocated) | 237 | 0 | { | 238 | 0 | hb_free (arrayZ); | 239 | 0 | return nullptr; | 240 | 0 | } | 241 | 34.8k | return (Type *) hb_realloc (arrayZ, new_allocated * sizeof (Type)); | 242 | 34.8k | } |
unsigned int* hb_vector_t<unsigned int, false>::realloc_vector<unsigned int, (void*)0>(unsigned int) Line | Count | Source | 235 | 293k | { | 236 | 293k | if (!new_allocated) | 237 | 0 | { | 238 | 0 | hb_free (arrayZ); | 239 | 0 | return nullptr; | 240 | 0 | } | 241 | 293k | return (Type *) hb_realloc (arrayZ, new_allocated * sizeof (Type)); | 242 | 293k | } |
Unexecuted instantiation: unsigned int* hb_vector_t<unsigned int, true>::realloc_vector<unsigned int, (void*)0>(unsigned int) hb_pool_t<hb_serialize_context_t::object_t, 32u>::chunk_t** hb_vector_t<hb_pool_t<hb_serialize_context_t::object_t, 32u>::chunk_t*, false>::realloc_vector<hb_pool_t<hb_serialize_context_t::object_t, 32u>::chunk_t*, (void*)0>(unsigned int) Line | Count | Source | 235 | 25.0k | { | 236 | 25.0k | if (!new_allocated) | 237 | 0 | { | 238 | 0 | hb_free (arrayZ); | 239 | 0 | return nullptr; | 240 | 0 | } | 241 | 25.0k | return (Type *) hb_realloc (arrayZ, new_allocated * sizeof (Type)); | 242 | 25.0k | } |
Unexecuted instantiation: hb_pair_t<unsigned int, unsigned int>* hb_vector_t<hb_pair_t<unsigned int, unsigned int>, true>::realloc_vector<hb_pair_t<unsigned int, unsigned int>, (void*)0>(unsigned int) Unexecuted instantiation: OT::VarData::serialize(hb_serialize_context_t*, OT::VarData const*, hb_inc_bimap_t const&, hb_bimap_t const&)::delta_size_t* hb_vector_t<OT::VarData::serialize(hb_serialize_context_t*, OT::VarData const*, hb_inc_bimap_t const&, hb_bimap_t const&)::delta_size_t, false>::realloc_vector<OT::VarData::serialize(hb_serialize_context_t*, OT::VarData const*, hb_inc_bimap_t const&, hb_bimap_t const&)::delta_size_t, (void*)0>(unsigned int) OT::hb_accelerate_subtables_context_t::hb_applicable_t* hb_vector_t<OT::hb_accelerate_subtables_context_t::hb_applicable_t, false>::realloc_vector<OT::hb_accelerate_subtables_context_t::hb_applicable_t, (void*)0>(unsigned int) Line | Count | Source | 235 | 1.41M | { | 236 | 1.41M | if (!new_allocated) | 237 | 0 | { | 238 | 0 | hb_free (arrayZ); | 239 | 0 | return nullptr; | 240 | 0 | } | 241 | 1.41M | return (Type *) hb_realloc (arrayZ, new_allocated * sizeof (Type)); | 242 | 1.41M | } |
Unexecuted instantiation: hb_aat_map_builder_t::feature_range_t* hb_vector_t<hb_aat_map_builder_t::feature_range_t, true>::realloc_vector<hb_aat_map_builder_t::feature_range_t, (void*)0>(unsigned int) hb_aat_map_builder_t::feature_event_t* hb_vector_t<hb_aat_map_builder_t::feature_event_t, false>::realloc_vector<hb_aat_map_builder_t::feature_event_t, (void*)0>(unsigned int) Line | Count | Source | 235 | 278k | { | 236 | 278k | if (!new_allocated) | 237 | 0 | { | 238 | 0 | hb_free (arrayZ); | 239 | 0 | return nullptr; | 240 | 0 | } | 241 | 278k | return (Type *) hb_realloc (arrayZ, new_allocated * sizeof (Type)); | 242 | 278k | } |
Unexecuted instantiation: hb_aat_map_builder_t::feature_info_t* hb_vector_t<hb_aat_map_builder_t::feature_info_t, true>::realloc_vector<hb_aat_map_builder_t::feature_info_t, (void*)0>(unsigned int) Unexecuted instantiation: hb_pair_t<unsigned int, unsigned int>* hb_vector_t<hb_pair_t<unsigned int, unsigned int>, false>::realloc_vector<hb_pair_t<unsigned int, unsigned int>, (void*)0>(unsigned int) hb_transform_t* hb_vector_t<hb_transform_t, false>::realloc_vector<hb_transform_t, (void*)0>(unsigned int) Line | Count | Source | 235 | 114k | { | 236 | 114k | if (!new_allocated) | 237 | 0 | { | 238 | 0 | hb_free (arrayZ); | 239 | 0 | return nullptr; | 240 | 0 | } | 241 | 114k | return (Type *) hb_realloc (arrayZ, new_allocated * sizeof (Type)); | 242 | 114k | } |
hb_bounds_t* hb_vector_t<hb_bounds_t, false>::realloc_vector<hb_bounds_t, (void*)0>(unsigned int) Line | Count | Source | 235 | 240k | { | 236 | 240k | if (!new_allocated) | 237 | 0 | { | 238 | 0 | hb_free (arrayZ); | 239 | 0 | return nullptr; | 240 | 0 | } | 241 | 240k | return (Type *) hb_realloc (arrayZ, new_allocated * sizeof (Type)); | 242 | 240k | } |
Unexecuted instantiation: OT::LayerRecord* hb_vector_t<OT::LayerRecord, false>::realloc_vector<OT::LayerRecord, (void*)0>(unsigned int) Unexecuted instantiation: hb_set_t** hb_vector_t<hb_set_t*, false>::realloc_vector<hb_set_t*, (void*)0>(unsigned int) Unexecuted instantiation: OT::DeltaSetIndexMap const** hb_vector_t<OT::DeltaSetIndexMap const*, false>::realloc_vector<OT::DeltaSetIndexMap const*, (void*)0>(unsigned int) int* hb_vector_t<int, false>::realloc_vector<int, (void*)0>(unsigned int) Line | Count | Source | 235 | 911k | { | 236 | 911k | if (!new_allocated) | 237 | 0 | { | 238 | 0 | hb_free (arrayZ); | 239 | 0 | return nullptr; | 240 | 0 | } | 241 | 911k | return (Type *) hb_realloc (arrayZ, new_allocated * sizeof (Type)); | 242 | 911k | } |
OT::contour_point_t* hb_vector_t<OT::contour_point_t, false>::realloc_vector<OT::contour_point_t, (void*)0>(unsigned int) Line | Count | Source | 235 | 2.50M | { | 236 | 2.50M | if (!new_allocated) | 237 | 0 | { | 238 | 0 | hb_free (arrayZ); | 239 | 0 | return nullptr; | 240 | 0 | } | 241 | 2.50M | return (Type *) hb_realloc (arrayZ, new_allocated * sizeof (Type)); | 242 | 2.50M | } |
Unexecuted instantiation: unsigned char* hb_vector_t<unsigned char, false>::realloc_vector<unsigned char, (void*)0>(unsigned int) Unexecuted instantiation: OT::glyf_impl::SubsetGlyph* hb_vector_t<OT::glyf_impl::SubsetGlyph, false>::realloc_vector<OT::glyf_impl::SubsetGlyph, (void*)0>(unsigned int) Unexecuted instantiation: hb_variation_t* hb_vector_t<hb_variation_t, false>::realloc_vector<hb_variation_t, (void*)0>(unsigned int) char* hb_vector_t<char, false>::realloc_vector<char, (void*)0>(unsigned int) Line | Count | Source | 235 | 10.4k | { | 236 | 10.4k | if (!new_allocated) | 237 | 0 | { | 238 | 0 | hb_free (arrayZ); | 239 | 0 | return nullptr; | 240 | 0 | } | 241 | 10.4k | return (Type *) hb_realloc (arrayZ, new_allocated * sizeof (Type)); | 242 | 10.4k | } |
Unexecuted instantiation: hb_pair_t<unsigned int, OT::IndexSubtableRecord const*>* hb_vector_t<hb_pair_t<unsigned int, OT::IndexSubtableRecord const*>, false>::realloc_vector<hb_pair_t<unsigned int, OT::IndexSubtableRecord const*>, (void*)0>(unsigned int) Unexecuted instantiation: OT::OffsetTo<OT::SBIXStrike, OT::IntType<unsigned int, 4u>, true>** hb_vector_t<OT::OffsetTo<OT::SBIXStrike, OT::IntType<unsigned int, 4u>, true>*, false>::realloc_vector<OT::OffsetTo<OT::SBIXStrike, OT::IntType<unsigned int, 4u>, true>*, (void*)0>(unsigned int) Unexecuted instantiation: hb_array_t<unsigned char const>* hb_vector_t<hb_array_t<unsigned char const>, false>::realloc_vector<hb_array_t<unsigned char const>, (void*)0>(unsigned int) CFF::cff1_top_dict_val_t* hb_vector_t<CFF::cff1_top_dict_val_t, false>::realloc_vector<CFF::cff1_top_dict_val_t, (void*)0>(unsigned int) Line | Count | Source | 235 | 70.9k | { | 236 | 70.9k | if (!new_allocated) | 237 | 0 | { | 238 | 0 | hb_free (arrayZ); | 239 | 0 | return nullptr; | 240 | 0 | } | 241 | 70.9k | return (Type *) hb_realloc (arrayZ, new_allocated * sizeof (Type)); | 242 | 70.9k | } |
CFF::op_str_t* hb_vector_t<CFF::op_str_t, false>::realloc_vector<CFF::op_str_t, (void*)0>(unsigned int) Line | Count | Source | 235 | 91.7k | { | 236 | 91.7k | if (!new_allocated) | 237 | 0 | { | 238 | 0 | hb_free (arrayZ); | 239 | 0 | return nullptr; | 240 | 0 | } | 241 | 91.7k | return (Type *) hb_realloc (arrayZ, new_allocated * sizeof (Type)); | 242 | 91.7k | } |
CFF::dict_val_t* hb_vector_t<CFF::dict_val_t, false>::realloc_vector<CFF::dict_val_t, (void*)0>(unsigned int) Line | Count | Source | 235 | 103k | { | 236 | 103k | if (!new_allocated) | 237 | 0 | { | 238 | 0 | hb_free (arrayZ); | 239 | 0 | return nullptr; | 240 | 0 | } | 241 | 103k | return (Type *) hb_realloc (arrayZ, new_allocated * sizeof (Type)); | 242 | 103k | } |
OT::cff1::accelerator_t::gname_t* hb_vector_t<OT::cff1::accelerator_t::gname_t, true>::realloc_vector<OT::cff1::accelerator_t::gname_t, (void*)0>(unsigned int) Line | Count | Source | 235 | 95.4k | { | 236 | 95.4k | if (!new_allocated) | 237 | 0 | { | 238 | 0 | hb_free (arrayZ); | 239 | 0 | return nullptr; | 240 | 0 | } | 241 | 95.4k | return (Type *) hb_realloc (arrayZ, new_allocated * sizeof (Type)); | 242 | 95.4k | } |
Unexecuted instantiation: hb_ot_name_record_ids_t* hb_vector_t<hb_ot_name_record_ids_t, false>::realloc_vector<hb_ot_name_record_ids_t, (void*)0>(unsigned int) hb_ot_name_entry_t* hb_vector_t<hb_ot_name_entry_t, false>::realloc_vector<hb_ot_name_entry_t, (void*)0>(unsigned int) Line | Count | Source | 235 | 84.7k | { | 236 | 84.7k | if (!new_allocated) | 237 | 0 | { | 238 | 0 | hb_free (arrayZ); | 239 | 0 | return nullptr; | 240 | 0 | } | 241 | 84.7k | return (Type *) hb_realloc (arrayZ, new_allocated * sizeof (Type)); | 242 | 84.7k | } |
float* hb_vector_t<float, false>::realloc_vector<float, (void*)0>(unsigned int) Line | Count | Source | 235 | 1.04k | { | 236 | 1.04k | if (!new_allocated) | 237 | 0 | { | 238 | 0 | hb_free (arrayZ); | 239 | 0 | return nullptr; | 240 | 0 | } | 241 | 1.04k | return (Type *) hb_realloc (arrayZ, new_allocated * sizeof (Type)); | 242 | 1.04k | } |
Unexecuted instantiation: CFF::number_t* hb_vector_t<CFF::number_t, false>::realloc_vector<CFF::number_t, (void*)0>(unsigned int) hb_ot_map_builder_t::feature_info_t* hb_vector_t<hb_ot_map_builder_t::feature_info_t, false>::realloc_vector<hb_ot_map_builder_t::feature_info_t, (void*)0>(unsigned int) Line | Count | Source | 235 | 1.87M | { | 236 | 1.87M | if (!new_allocated) | 237 | 0 | { | 238 | 0 | hb_free (arrayZ); | 239 | 0 | return nullptr; | 240 | 0 | } | 241 | 1.87M | return (Type *) hb_realloc (arrayZ, new_allocated * sizeof (Type)); | 242 | 1.87M | } |
hb_ot_map_t::lookup_map_t* hb_vector_t<hb_ot_map_t::lookup_map_t, false>::realloc_vector<hb_ot_map_t::lookup_map_t, (void*)0>(unsigned int) Line | Count | Source | 235 | 746k | { | 236 | 746k | if (!new_allocated) | 237 | 0 | { | 238 | 0 | hb_free (arrayZ); | 239 | 0 | return nullptr; | 240 | 0 | } | 241 | 746k | return (Type *) hb_realloc (arrayZ, new_allocated * sizeof (Type)); | 242 | 746k | } |
hb_ot_map_builder_t::stage_info_t* hb_vector_t<hb_ot_map_builder_t::stage_info_t, false>::realloc_vector<hb_ot_map_builder_t::stage_info_t, (void*)0>(unsigned int) Line | Count | Source | 235 | 1.29M | { | 236 | 1.29M | if (!new_allocated) | 237 | 0 | { | 238 | 0 | hb_free (arrayZ); | 239 | 0 | return nullptr; | 240 | 0 | } | 241 | 1.29M | return (Type *) hb_realloc (arrayZ, new_allocated * sizeof (Type)); | 242 | 1.29M | } |
hb_ot_map_t::feature_map_t* hb_vector_t<hb_ot_map_t::feature_map_t, true>::realloc_vector<hb_ot_map_t::feature_map_t, (void*)0>(unsigned int) Line | Count | Source | 235 | 606k | { | 236 | 606k | if (!new_allocated) | 237 | 0 | { | 238 | 0 | hb_free (arrayZ); | 239 | 0 | return nullptr; | 240 | 0 | } | 241 | 606k | return (Type *) hb_realloc (arrayZ, new_allocated * sizeof (Type)); | 242 | 606k | } |
hb_ot_map_t::stage_map_t* hb_vector_t<hb_ot_map_t::stage_map_t, false>::realloc_vector<hb_ot_map_t::stage_map_t, (void*)0>(unsigned int) Line | Count | Source | 235 | 1.27M | { | 236 | 1.27M | if (!new_allocated) | 237 | 0 | { | 238 | 0 | hb_free (arrayZ); | 239 | 0 | return nullptr; | 240 | 0 | } | 241 | 1.27M | return (Type *) hb_realloc (arrayZ, new_allocated * sizeof (Type)); | 242 | 1.27M | } |
|
243 | | template <typename T = Type, |
244 | | hb_enable_if (!hb_is_trivially_copy_assignable(T))> |
245 | | Type * |
246 | | realloc_vector (unsigned new_allocated) |
247 | 299k | { |
248 | 299k | if (!new_allocated) |
249 | 0 | { |
250 | 0 | hb_free (arrayZ); |
251 | 0 | return nullptr; |
252 | 0 | } |
253 | 299k | Type *new_array = (Type *) hb_malloc (new_allocated * sizeof (Type)); |
254 | 299k | if (likely (new_array)) |
255 | 293k | { |
256 | 2.88M | for (unsigned i = 0; i < length; i++) |
257 | 2.59M | { |
258 | 2.59M | new (std::addressof (new_array[i])) Type (); |
259 | 2.59M | new_array[i] = std::move (arrayZ[i]); |
260 | 2.59M | arrayZ[i].~Type (); |
261 | 2.59M | } |
262 | 293k | hb_free (arrayZ); |
263 | 293k | } |
264 | 299k | return new_array; |
265 | 299k | } hb_vector_t<hb_aat_map_t::range_flags_t, true>* hb_vector_t<hb_vector_t<hb_aat_map_t::range_flags_t, true>, false>::realloc_vector<hb_vector_t<hb_aat_map_t::range_flags_t, true>, (void*)0>(unsigned int) Line | Count | Source | 247 | 217k | { | 248 | 217k | if (!new_allocated) | 249 | 0 | { | 250 | 0 | hb_free (arrayZ); | 251 | 0 | return nullptr; | 252 | 0 | } | 253 | 217k | Type *new_array = (Type *) hb_malloc (new_allocated * sizeof (Type)); | 254 | 217k | if (likely (new_array)) | 255 | 211k | { | 256 | 211k | for (unsigned i = 0; i < length; i++) | 257 | 0 | { | 258 | 0 | new (std::addressof (new_array[i])) Type (); | 259 | 0 | new_array[i] = std::move (arrayZ[i]); | 260 | 0 | arrayZ[i].~Type (); | 261 | 0 | } | 262 | 211k | hb_free (arrayZ); | 263 | 211k | } | 264 | 217k | return new_array; | 265 | 217k | } |
Unexecuted instantiation: hb_vector_t<unsigned int, false>* hb_vector_t<hb_vector_t<unsigned int, false>, false>::realloc_vector<hb_vector_t<unsigned int, false>, (void*)0>(unsigned int) Unexecuted instantiation: hb_inc_bimap_t* hb_vector_t<hb_inc_bimap_t, false>::realloc_vector<hb_inc_bimap_t, (void*)0>(unsigned int) Unexecuted instantiation: hb_set_t* hb_vector_t<hb_set_t, false>::realloc_vector<hb_set_t, (void*)0>(unsigned int) Unexecuted instantiation: OT::index_map_subset_plan_t* hb_vector_t<OT::index_map_subset_plan_t, false>::realloc_vector<OT::index_map_subset_plan_t, (void*)0>(unsigned int) Unexecuted instantiation: OT::IndexSubtableRecord* hb_vector_t<OT::IndexSubtableRecord, false>::realloc_vector<OT::IndexSubtableRecord, (void*)0>(unsigned int) CFF::cff1_private_dict_values_base_t<CFF::dict_val_t>* hb_vector_t<CFF::cff1_private_dict_values_base_t<CFF::dict_val_t>, false>::realloc_vector<CFF::cff1_private_dict_values_base_t<CFF::dict_val_t>, (void*)0>(unsigned int) Line | Count | Source | 247 | 32.5k | { | 248 | 32.5k | if (!new_allocated) | 249 | 0 | { | 250 | 0 | hb_free (arrayZ); | 251 | 0 | return nullptr; | 252 | 0 | } | 253 | 32.5k | Type *new_array = (Type *) hb_malloc (new_allocated * sizeof (Type)); | 254 | 32.5k | if (likely (new_array)) | 255 | 32.5k | { | 256 | 32.5k | for (unsigned i = 0; i < length; i++) | 257 | 0 | { | 258 | 0 | new (std::addressof (new_array[i])) Type (); | 259 | 0 | new_array[i] = std::move (arrayZ[i]); | 260 | 0 | arrayZ[i].~Type (); | 261 | 0 | } | 262 | 32.5k | hb_free (arrayZ); | 263 | 32.5k | } | 264 | 32.5k | return new_array; | 265 | 32.5k | } |
CFF::cff1_font_dict_values_t* hb_vector_t<CFF::cff1_font_dict_values_t, false>::realloc_vector<CFF::cff1_font_dict_values_t, (void*)0>(unsigned int) Line | Count | Source | 247 | 5.33k | { | 248 | 5.33k | if (!new_allocated) | 249 | 0 | { | 250 | 0 | hb_free (arrayZ); | 251 | 0 | return nullptr; | 252 | 0 | } | 253 | 5.33k | Type *new_array = (Type *) hb_malloc (new_allocated * sizeof (Type)); | 254 | 5.33k | if (likely (new_array)) | 255 | 5.31k | { | 256 | 270k | for (unsigned i = 0; i < length; i++) | 257 | 265k | { | 258 | 265k | new (std::addressof (new_array[i])) Type (); | 259 | 265k | new_array[i] = std::move (arrayZ[i]); | 260 | 265k | arrayZ[i].~Type (); | 261 | 265k | } | 262 | 5.31k | hb_free (arrayZ); | 263 | 5.31k | } | 264 | 5.33k | return new_array; | 265 | 5.33k | } |
CFF::cff2_private_dict_values_base_t<CFF::dict_val_t>* hb_vector_t<CFF::cff2_private_dict_values_base_t<CFF::dict_val_t>, false>::realloc_vector<CFF::cff2_private_dict_values_base_t<CFF::dict_val_t>, (void*)0>(unsigned int) Line | Count | Source | 247 | 21.3k | { | 248 | 21.3k | if (!new_allocated) | 249 | 0 | { | 250 | 0 | hb_free (arrayZ); | 251 | 0 | return nullptr; | 252 | 0 | } | 253 | 21.3k | Type *new_array = (Type *) hb_malloc (new_allocated * sizeof (Type)); | 254 | 21.3k | if (likely (new_array)) | 255 | 21.3k | { | 256 | 21.3k | for (unsigned i = 0; i < length; i++) | 257 | 0 | { | 258 | 0 | new (std::addressof (new_array[i])) Type (); | 259 | 0 | new_array[i] = std::move (arrayZ[i]); | 260 | 0 | arrayZ[i].~Type (); | 261 | 0 | } | 262 | 21.3k | hb_free (arrayZ); | 263 | 21.3k | } | 264 | 21.3k | return new_array; | 265 | 21.3k | } |
CFF::cff2_font_dict_values_t* hb_vector_t<CFF::cff2_font_dict_values_t, false>::realloc_vector<CFF::cff2_font_dict_values_t, (void*)0>(unsigned int) Line | Count | Source | 247 | 23.0k | { | 248 | 23.0k | if (!new_allocated) | 249 | 0 | { | 250 | 0 | hb_free (arrayZ); | 251 | 0 | return nullptr; | 252 | 0 | } | 253 | 23.0k | Type *new_array = (Type *) hb_malloc (new_allocated * sizeof (Type)); | 254 | 23.0k | if (likely (new_array)) | 255 | 22.9k | { | 256 | 2.35M | for (unsigned i = 0; i < length; i++) | 257 | 2.32M | { | 258 | 2.32M | new (std::addressof (new_array[i])) Type (); | 259 | 2.32M | new_array[i] = std::move (arrayZ[i]); | 260 | 2.32M | arrayZ[i].~Type (); | 261 | 2.32M | } | 262 | 22.9k | hb_free (arrayZ); | 263 | 22.9k | } | 264 | 23.0k | return new_array; | 265 | 23.0k | } |
|
266 | | |
267 | | template <typename T = Type, |
268 | | hb_enable_if (hb_is_trivially_constructible(T))> |
269 | | void |
270 | | grow_vector (unsigned size) |
271 | 88.3M | { |
272 | 88.3M | memset (arrayZ + length, 0, (size - length) * sizeof (*arrayZ)); |
273 | 88.3M | length = size; |
274 | 88.3M | } void hb_vector_t<hb_bit_page_t, false>::grow_vector<hb_bit_page_t, (void*)0>(unsigned int) Line | Count | Source | 271 | 10.1M | { | 272 | 10.1M | memset (arrayZ + length, 0, (size - length) * sizeof (*arrayZ)); | 273 | 10.1M | length = size; | 274 | 10.1M | } |
void hb_vector_t<hb_bit_set_t::page_map_t, true>::grow_vector<hb_bit_set_t::page_map_t, (void*)0>(unsigned int) Line | Count | Source | 271 | 10.0M | { | 272 | 10.0M | memset (arrayZ + length, 0, (size - length) * sizeof (*arrayZ)); | 273 | 10.0M | length = size; | 274 | 10.0M | } |
void hb_vector_t<hb_serialize_context_t::object_t::link_t, false>::grow_vector<hb_serialize_context_t::object_t::link_t, (void*)0>(unsigned int) Line | Count | Source | 271 | 291k | { | 272 | 291k | memset (arrayZ + length, 0, (size - length) * sizeof (*arrayZ)); | 273 | 291k | length = size; | 274 | 291k | } |
void hb_vector_t<unsigned int, false>::grow_vector<unsigned int, (void*)0>(unsigned int) Line | Count | Source | 271 | 142k | { | 272 | 142k | memset (arrayZ + length, 0, (size - length) * sizeof (*arrayZ)); | 273 | 142k | length = size; | 274 | 142k | } |
Unexecuted instantiation: void hb_vector_t<OT::VarData::serialize(hb_serialize_context_t*, OT::VarData const*, hb_inc_bimap_t const&, hb_bimap_t const&)::delta_size_t, false>::grow_vector<OT::VarData::serialize(hb_serialize_context_t*, OT::VarData const*, hb_inc_bimap_t const&, hb_bimap_t const&)::delta_size_t, (void*)0>(unsigned int) Unexecuted instantiation: void hb_vector_t<unsigned int, true>::grow_vector<unsigned int, (void*)0>(unsigned int) void hb_vector_t<OT::hb_accelerate_subtables_context_t::hb_applicable_t, false>::grow_vector<OT::hb_accelerate_subtables_context_t::hb_applicable_t, (void*)0>(unsigned int) Line | Count | Source | 271 | 2.79M | { | 272 | 2.79M | memset (arrayZ + length, 0, (size - length) * sizeof (*arrayZ)); | 273 | 2.79M | length = size; | 274 | 2.79M | } |
Unexecuted instantiation: void hb_vector_t<hb_aat_map_builder_t::feature_range_t, true>::grow_vector<hb_aat_map_builder_t::feature_range_t, (void*)0>(unsigned int) void hb_vector_t<hb_aat_map_builder_t::feature_event_t, false>::grow_vector<hb_aat_map_builder_t::feature_event_t, (void*)0>(unsigned int) Line | Count | Source | 271 | 272k | { | 272 | 272k | memset (arrayZ + length, 0, (size - length) * sizeof (*arrayZ)); | 273 | 272k | length = size; | 274 | 272k | } |
Unexecuted instantiation: void hb_vector_t<hb_aat_map_builder_t::feature_info_t, true>::grow_vector<hb_aat_map_builder_t::feature_info_t, (void*)0>(unsigned int) Unexecuted instantiation: void hb_vector_t<OT::LayerRecord, false>::grow_vector<OT::LayerRecord, (void*)0>(unsigned int) Unexecuted instantiation: void hb_vector_t<hb_set_t*, false>::grow_vector<hb_set_t*, (void*)0>(unsigned int) void hb_vector_t<int, false>::grow_vector<int, (void*)0>(unsigned int) Line | Count | Source | 271 | 670k | { | 272 | 670k | memset (arrayZ + length, 0, (size - length) * sizeof (*arrayZ)); | 273 | 670k | length = size; | 274 | 670k | } |
Unexecuted instantiation: void hb_vector_t<OT::IndexSubtableRecord, false>::grow_vector<OT::IndexSubtableRecord, (void*)0>(unsigned int) void hb_vector_t<hb_ot_name_entry_t, false>::grow_vector<hb_ot_name_entry_t, (void*)0>(unsigned int) Line | Count | Source | 271 | 6.40M | { | 272 | 6.40M | memset (arrayZ + length, 0, (size - length) * sizeof (*arrayZ)); | 273 | 6.40M | length = size; | 274 | 6.40M | } |
void hb_vector_t<char, false>::grow_vector<char, (void*)0>(unsigned int) Line | Count | Source | 271 | 9.86k | { | 272 | 9.86k | memset (arrayZ + length, 0, (size - length) * sizeof (*arrayZ)); | 273 | 9.86k | length = size; | 274 | 9.86k | } |
void hb_vector_t<float, false>::grow_vector<float, (void*)0>(unsigned int) Line | Count | Source | 271 | 998 | { | 272 | 998 | memset (arrayZ + length, 0, (size - length) * sizeof (*arrayZ)); | 273 | 998 | length = size; | 274 | 998 | } |
void hb_vector_t<hb_ot_map_builder_t::feature_info_t, false>::grow_vector<hb_ot_map_builder_t::feature_info_t, (void*)0>(unsigned int) Line | Count | Source | 271 | 16.9M | { | 272 | 16.9M | memset (arrayZ + length, 0, (size - length) * sizeof (*arrayZ)); | 273 | 16.9M | length = size; | 274 | 16.9M | } |
void hb_vector_t<hb_ot_map_t::lookup_map_t, false>::grow_vector<hb_ot_map_t::lookup_map_t, (void*)0>(unsigned int) Line | Count | Source | 271 | 33.4M | { | 272 | 33.4M | memset (arrayZ + length, 0, (size - length) * sizeof (*arrayZ)); | 273 | 33.4M | length = size; | 274 | 33.4M | } |
void hb_vector_t<hb_ot_map_builder_t::stage_info_t, false>::grow_vector<hb_ot_map_builder_t::stage_info_t, (void*)0>(unsigned int) Line | Count | Source | 271 | 2.80M | { | 272 | 2.80M | memset (arrayZ + length, 0, (size - length) * sizeof (*arrayZ)); | 273 | 2.80M | length = size; | 274 | 2.80M | } |
void hb_vector_t<hb_ot_map_t::feature_map_t, true>::grow_vector<hb_ot_map_t::feature_map_t, (void*)0>(unsigned int) Line | Count | Source | 271 | 1.47M | { | 272 | 1.47M | memset (arrayZ + length, 0, (size - length) * sizeof (*arrayZ)); | 273 | 1.47M | length = size; | 274 | 1.47M | } |
void hb_vector_t<hb_ot_map_t::stage_map_t, false>::grow_vector<hb_ot_map_t::stage_map_t, (void*)0>(unsigned int) Line | Count | Source | 271 | 2.77M | { | 272 | 2.77M | memset (arrayZ + length, 0, (size - length) * sizeof (*arrayZ)); | 273 | 2.77M | length = size; | 274 | 2.77M | } |
|
275 | | template <typename T = Type, |
276 | | hb_enable_if (!hb_is_trivially_constructible(T))> |
277 | | void |
278 | | grow_vector (unsigned size) |
279 | 4.61M | { |
280 | 392M | while (length < size) |
281 | 387M | { |
282 | 387M | length++; |
283 | 387M | new (std::addressof (arrayZ[length - 1])) Type (); |
284 | 387M | } |
285 | 4.61M | } void hb_vector_t<hb_vector_t<hb_aat_map_t::range_flags_t, true>, false>::grow_vector<hb_vector_t<hb_aat_map_t::range_flags_t, true>, (void*)0>(unsigned int) Line | Count | Source | 279 | 211k | { | 280 | 622k | while (length < size) | 281 | 410k | { | 282 | 410k | length++; | 283 | 410k | new (std::addressof (arrayZ[length - 1])) Type (); | 284 | 410k | } | 285 | 211k | } |
Unexecuted instantiation: void hb_vector_t<hb_vector_t<unsigned int, false>, false>::grow_vector<hb_vector_t<unsigned int, false>, (void*)0>(unsigned int) Unexecuted instantiation: void hb_vector_t<hb_inc_bimap_t, false>::grow_vector<hb_inc_bimap_t, (void*)0>(unsigned int) Unexecuted instantiation: void hb_vector_t<hb_set_t, false>::grow_vector<hb_set_t, (void*)0>(unsigned int) Unexecuted instantiation: void hb_vector_t<OT::index_map_subset_plan_t, false>::grow_vector<OT::index_map_subset_plan_t, (void*)0>(unsigned int) void hb_vector_t<OT::contour_point_t, false>::grow_vector<OT::contour_point_t, (void*)0>(unsigned int) Line | Count | Source | 279 | 3.20M | { | 280 | 386M | while (length < size) | 281 | 383M | { | 282 | 383M | length++; | 283 | 383M | new (std::addressof (arrayZ[length - 1])) Type (); | 284 | 383M | } | 285 | 3.20M | } |
Unexecuted instantiation: void hb_vector_t<OT::glyf_impl::SubsetGlyph, false>::grow_vector<OT::glyf_impl::SubsetGlyph, (void*)0>(unsigned int) Unexecuted instantiation: void hb_vector_t<hb_array_t<unsigned char const>, false>::grow_vector<hb_array_t<unsigned char const>, (void*)0>(unsigned int) void hb_vector_t<CFF::cff1_private_dict_values_base_t<CFF::dict_val_t>, false>::grow_vector<CFF::cff1_private_dict_values_base_t<CFF::dict_val_t>, (void*)0>(unsigned int) Line | Count | Source | 279 | 32.5k | { | 280 | 399k | while (length < size) | 281 | 366k | { | 282 | 366k | length++; | 283 | 366k | new (std::addressof (arrayZ[length - 1])) Type (); | 284 | 366k | } | 285 | 32.5k | } |
void hb_vector_t<CFF::cff1_font_dict_values_t, false>::grow_vector<CFF::cff1_font_dict_values_t, (void*)0>(unsigned int) Line | Count | Source | 279 | 122k | { | 280 | 244k | while (length < size) | 281 | 122k | { | 282 | 122k | length++; | 283 | 122k | new (std::addressof (arrayZ[length - 1])) Type (); | 284 | 122k | } | 285 | 122k | } |
void hb_vector_t<CFF::cff2_private_dict_values_base_t<CFF::dict_val_t>, false>::grow_vector<CFF::cff2_private_dict_values_base_t<CFF::dict_val_t>, (void*)0>(unsigned int) Line | Count | Source | 279 | 21.3k | { | 280 | 2.44M | while (length < size) | 281 | 2.42M | { | 282 | 2.42M | length++; | 283 | 2.42M | new (std::addressof (arrayZ[length - 1])) Type (); | 284 | 2.42M | } | 285 | 21.3k | } |
void hb_vector_t<CFF::cff2_font_dict_values_t, false>::grow_vector<CFF::cff2_font_dict_values_t, (void*)0>(unsigned int) Line | Count | Source | 279 | 1.02M | { | 280 | 2.05M | while (length < size) | 281 | 1.02M | { | 282 | 1.02M | length++; | 283 | 1.02M | new (std::addressof (arrayZ[length - 1])) Type (); | 284 | 1.02M | } | 285 | 1.02M | } |
Unexecuted instantiation: void hb_vector_t<CFF::number_t, false>::grow_vector<CFF::number_t, (void*)0>(unsigned int) |
286 | | |
287 | | template <typename T = Type, |
288 | | hb_enable_if (hb_is_trivially_copyable (T))> |
289 | | void |
290 | | copy_vector (const hb_vector_t &other) |
291 | 272k | { |
292 | 272k | length = other.length; |
293 | 272k | #ifndef HB_OPTIMIZE_SIZE |
294 | 272k | if (sizeof (T) >= sizeof (long long)) |
295 | | /* This runs faster because of alignment. */ |
296 | 272k | for (unsigned i = 0; i < length; i++) |
297 | 0 | arrayZ[i] = other.arrayZ[i]; |
298 | 0 | else |
299 | 0 | #endif |
300 | 0 | hb_memcpy ((void *) arrayZ, (const void *) other.arrayZ, length * item_size); |
301 | 272k | } Unexecuted instantiation: void hb_vector_t<hb_bit_set_t::page_map_t, true>::copy_vector<hb_bit_set_t::page_map_t, (void*)0>(hb_vector_t<hb_bit_set_t::page_map_t, true> const&) Unexecuted instantiation: void hb_vector_t<hb_bit_page_t, false>::copy_vector<hb_bit_page_t, (void*)0>(hb_vector_t<hb_bit_page_t, false> const&) Unexecuted instantiation: void hb_vector_t<unsigned int, false>::copy_vector<unsigned int, (void*)0>(hb_vector_t<unsigned int, false> const&) void hb_vector_t<hb_aat_map_builder_t::feature_info_t, true>::copy_vector<hb_aat_map_builder_t::feature_info_t, (void*)0>(hb_vector_t<hb_aat_map_builder_t::feature_info_t, true> const&) Line | Count | Source | 291 | 272k | { | 292 | 272k | length = other.length; | 293 | 272k | #ifndef HB_OPTIMIZE_SIZE | 294 | 272k | if (sizeof (T) >= sizeof (long long)) | 295 | | /* This runs faster because of alignment. */ | 296 | 272k | for (unsigned i = 0; i < length; i++) | 297 | 0 | arrayZ[i] = other.arrayZ[i]; | 298 | 0 | else | 299 | 0 | #endif | 300 | 0 | hb_memcpy ((void *) arrayZ, (const void *) other.arrayZ, length * item_size); | 301 | 272k | } |
Unexecuted instantiation: void hb_vector_t<OT::LayerRecord, false>::copy_vector<OT::LayerRecord, (void*)0>(hb_vector_t<OT::LayerRecord, false> const&) Unexecuted instantiation: void hb_vector_t<OT::contour_point_t, false>::copy_vector<OT::contour_point_t, (void*)0>(hb_vector_t<OT::contour_point_t, false> const&) |
302 | | template <typename T = Type, |
303 | | hb_enable_if (!hb_is_trivially_copyable (T) && |
304 | | std::is_copy_constructible<T>::value)> |
305 | | void |
306 | | copy_vector (const hb_vector_t &other) |
307 | 0 | { |
308 | 0 | length = 0; |
309 | 0 | while (length < other.length) |
310 | 0 | { |
311 | 0 | length++; |
312 | 0 | new (std::addressof (arrayZ[length - 1])) Type (other.arrayZ[length - 1]); |
313 | 0 | } |
314 | 0 | } |
315 | | template <typename T = Type, |
316 | | hb_enable_if (!hb_is_trivially_copyable (T) && |
317 | | !std::is_copy_constructible<T>::value && |
318 | | std::is_default_constructible<T>::value && |
319 | | std::is_copy_assignable<T>::value)> |
320 | | void |
321 | | copy_vector (const hb_vector_t &other) |
322 | | { |
323 | | length = 0; |
324 | | while (length < other.length) |
325 | | { |
326 | | length++; |
327 | | new (std::addressof (arrayZ[length - 1])) Type (); |
328 | | arrayZ[length - 1] = other.arrayZ[length - 1]; |
329 | | } |
330 | | } |
331 | | |
332 | | void |
333 | | shrink_vector (unsigned size) |
334 | 40.9M | { |
335 | 6.00G | while ((unsigned) length > size) |
336 | 5.96G | { |
337 | 5.96G | arrayZ[(unsigned) length - 1].~Type (); |
338 | 5.96G | length--; |
339 | 5.96G | } |
340 | 40.9M | } hb_vector_t<hb_vector_t<hb_aat_map_t::range_flags_t, true>, false>::shrink_vector(unsigned int) Line | Count | Source | 334 | 278k | { | 335 | 689k | while ((unsigned) length > size) | 336 | 410k | { | 337 | 410k | arrayZ[(unsigned) length - 1].~Type (); | 338 | 410k | length--; | 339 | 410k | } | 340 | 278k | } |
hb_vector_t<hb_aat_map_t::range_flags_t, true>::shrink_vector(unsigned int) Line | Count | Source | 334 | 410k | { | 335 | 808k | while ((unsigned) length > size) | 336 | 397k | { | 337 | 397k | arrayZ[(unsigned) length - 1].~Type (); | 338 | 397k | length--; | 339 | 397k | } | 340 | 410k | } |
hb_vector_t<hb_aat_map_builder_t::feature_info_t, true>::shrink_vector(unsigned int) Line | Count | Source | 334 | 557k | { | 335 | 557k | while ((unsigned) length > size) | 336 | 0 | { | 337 | 0 | arrayZ[(unsigned) length - 1].~Type (); | 338 | 0 | length--; | 339 | 0 | } | 340 | 557k | } |
hb_vector_t<hb_aat_map_builder_t::feature_range_t, true>::shrink_vector(unsigned int) Line | Count | Source | 334 | 278k | { | 335 | 278k | while ((unsigned) length > size) | 336 | 0 | { | 337 | 0 | arrayZ[(unsigned) length - 1].~Type (); | 338 | 0 | length--; | 339 | 0 | } | 340 | 278k | } |
hb_vector_t<hb_user_data_array_t::hb_user_data_item_t, false>::shrink_vector(unsigned int) Line | Count | Source | 334 | 403k | { | 335 | 403k | while ((unsigned) length > size) | 336 | 0 | { | 337 | 0 | arrayZ[(unsigned) length - 1].~Type (); | 338 | 0 | length--; | 339 | 0 | } | 340 | 403k | } |
hb_vector_t<hb_ot_map_t::feature_map_t, true>::shrink_vector(unsigned int) Line | Count | Source | 334 | 1.21M | { | 335 | 2.68M | while ((unsigned) length > size) | 336 | 1.47M | { | 337 | 1.47M | arrayZ[(unsigned) length - 1].~Type (); | 338 | 1.47M | length--; | 339 | 1.47M | } | 340 | 1.21M | } |
hb_vector_t<hb_ot_map_t::lookup_map_t, false>::shrink_vector(unsigned int) Line | Count | Source | 334 | 2.55M | { | 335 | 36.0M | while ((unsigned) length > size) | 336 | 33.4M | { | 337 | 33.4M | arrayZ[(unsigned) length - 1].~Type (); | 338 | 33.4M | length--; | 339 | 33.4M | } | 340 | 2.55M | } |
hb_vector_t<hb_ot_map_t::stage_map_t, false>::shrink_vector(unsigned int) Line | Count | Source | 334 | 2.42M | { | 335 | 5.20M | while ((unsigned) length > size) | 336 | 2.77M | { | 337 | 2.77M | arrayZ[(unsigned) length - 1].~Type (); | 338 | 2.77M | length--; | 339 | 2.77M | } | 340 | 2.42M | } |
hb_vector_t<hb_bit_set_t::page_map_t, true>::shrink_vector(unsigned int) Line | Count | Source | 334 | 2.55M | { | 335 | 12.6M | while ((unsigned) length > size) | 336 | 10.0M | { | 337 | 10.0M | arrayZ[(unsigned) length - 1].~Type (); | 338 | 10.0M | length--; | 339 | 10.0M | } | 340 | 2.55M | } |
hb_vector_t<hb_bit_page_t, false>::shrink_vector(unsigned int) Line | Count | Source | 334 | 2.56M | { | 335 | 12.6M | while ((unsigned) length > size) | 336 | 10.1M | { | 337 | 10.1M | arrayZ[(unsigned) length - 1].~Type (); | 338 | 10.1M | length--; | 339 | 10.1M | } | 340 | 2.56M | } |
hb_vector_t<unsigned int, false>::shrink_vector(unsigned int) Line | Count | Source | 334 | 1.09M | { | 335 | 470M | while ((unsigned) length > size) | 336 | 469M | { | 337 | 469M | arrayZ[(unsigned) length - 1].~Type (); | 338 | 469M | length--; | 339 | 469M | } | 340 | 1.09M | } |
hb_vector_t<hb_serialize_context_t::object_t::link_t, false>::shrink_vector(unsigned int) Line | Count | Source | 334 | 646k | { | 335 | 938k | while ((unsigned) length > size) | 336 | 291k | { | 337 | 291k | arrayZ[(unsigned) length - 1].~Type (); | 338 | 291k | length--; | 339 | 291k | } | 340 | 646k | } |
hb_vector_t<hb_pool_t<hb_serialize_context_t::object_t, 32u>::chunk_t*, false>::shrink_vector(unsigned int) Line | Count | Source | 334 | 25.0k | { | 335 | 53.8k | while ((unsigned) length > size) | 336 | 28.8k | { | 337 | 28.8k | arrayZ[(unsigned) length - 1].~Type (); | 338 | 28.8k | length--; | 339 | 28.8k | } | 340 | 25.0k | } |
hb_vector_t<hb_serialize_context_t::object_t*, false>::shrink_vector(unsigned int) Line | Count | Source | 334 | 75.0k | { | 335 | 314k | while ((unsigned) length > size) | 336 | 239k | { | 337 | 239k | arrayZ[(unsigned) length - 1].~Type (); | 338 | 239k | length--; | 339 | 239k | } | 340 | 75.0k | } |
Unexecuted instantiation: hb_vector_t<hb_vector_t<unsigned int, false>, false>::shrink_vector(unsigned int) Unexecuted instantiation: hb_vector_t<hb_pair_t<unsigned int, unsigned int>, true>::shrink_vector(unsigned int) Unexecuted instantiation: hb_vector_t<hb_inc_bimap_t, false>::shrink_vector(unsigned int) hb_vector_t<int, false>::shrink_vector(unsigned int) Line | Count | Source | 334 | 974k | { | 335 | 4.65G | while ((unsigned) length > size) | 336 | 4.65G | { | 337 | 4.65G | arrayZ[(unsigned) length - 1].~Type (); | 338 | 4.65G | length--; | 339 | 4.65G | } | 340 | 974k | } |
Unexecuted instantiation: hb_vector_t<unsigned int, true>::shrink_vector(unsigned int) Unexecuted instantiation: hb_vector_t<OT::VarData::serialize(hb_serialize_context_t*, OT::VarData const*, hb_inc_bimap_t const&, hb_bimap_t const&)::delta_size_t, false>::shrink_vector(unsigned int) Unexecuted instantiation: hb_vector_t<hb_set_t, false>::shrink_vector(unsigned int) hb_vector_t<OT::hb_accelerate_subtables_context_t::hb_applicable_t, false>::shrink_vector(unsigned int) Line | Count | Source | 334 | 2.35M | { | 335 | 5.14M | while ((unsigned) length > size) | 336 | 2.79M | { | 337 | 2.79M | arrayZ[(unsigned) length - 1].~Type (); | 338 | 2.79M | length--; | 339 | 2.79M | } | 340 | 2.35M | } |
hb_vector_t<hb_aat_map_builder_t::feature_event_t, false>::shrink_vector(unsigned int) Line | Count | Source | 334 | 278k | { | 335 | 551k | while ((unsigned) length > size) | 336 | 272k | { | 337 | 272k | arrayZ[(unsigned) length - 1].~Type (); | 338 | 272k | length--; | 339 | 272k | } | 340 | 278k | } |
Unexecuted instantiation: hb_vector_t<hb_pair_t<unsigned int, unsigned int>, false>::shrink_vector(unsigned int) hb_vector_t<hb_transform_t, false>::shrink_vector(unsigned int) Line | Count | Source | 334 | 100k | { | 335 | 197k | while ((unsigned) length > size) | 336 | 97.3k | { | 337 | 97.3k | arrayZ[(unsigned) length - 1].~Type (); | 338 | 97.3k | length--; | 339 | 97.3k | } | 340 | 100k | } |
hb_vector_t<hb_bounds_t, false>::shrink_vector(unsigned int) Line | Count | Source | 334 | 200k | { | 335 | 394k | while ((unsigned) length > size) | 336 | 193k | { | 337 | 193k | arrayZ[(unsigned) length - 1].~Type (); | 338 | 193k | length--; | 339 | 193k | } | 340 | 200k | } |
Unexecuted instantiation: hb_vector_t<OT::LayerRecord, false>::shrink_vector(unsigned int) Unexecuted instantiation: hb_vector_t<hb_set_t*, false>::shrink_vector(unsigned int) Unexecuted instantiation: hb_vector_t<OT::index_map_subset_plan_t, false>::shrink_vector(unsigned int) Unexecuted instantiation: hb_vector_t<OT::DeltaSetIndexMap const*, false>::shrink_vector(unsigned int) hb_vector_t<OT::contour_point_t, false>::shrink_vector(unsigned int) Line | Count | Source | 334 | 3.65M | { | 335 | 747M | while ((unsigned) length > size) | 336 | 743M | { | 337 | 743M | arrayZ[(unsigned) length - 1].~Type (); | 338 | 743M | length--; | 339 | 743M | } | 340 | 3.65M | } |
Unexecuted instantiation: hb_vector_t<unsigned char, false>::shrink_vector(unsigned int) Unexecuted instantiation: hb_vector_t<OT::glyf_impl::SubsetGlyph, false>::shrink_vector(unsigned int) Unexecuted instantiation: hb_vector_t<hb_variation_t, false>::shrink_vector(unsigned int) Unexecuted instantiation: hb_vector_t<OT::IndexSubtableRecord, false>::shrink_vector(unsigned int) hb_vector_t<char, false>::shrink_vector(unsigned int) Line | Count | Source | 334 | 10.4k | { | 335 | 2.04M | while ((unsigned) length > size) | 336 | 2.03M | { | 337 | 2.03M | arrayZ[(unsigned) length - 1].~Type (); | 338 | 2.03M | length--; | 339 | 2.03M | } | 340 | 10.4k | } |
Unexecuted instantiation: hb_vector_t<hb_pair_t<unsigned int, OT::IndexSubtableRecord const*>, false>::shrink_vector(unsigned int) Unexecuted instantiation: hb_vector_t<OT::OffsetTo<OT::SBIXStrike, OT::IntType<unsigned int, 4u>, true>*, false>::shrink_vector(unsigned int) hb_vector_t<hb_ot_name_entry_t, false>::shrink_vector(unsigned int) Line | Count | Source | 334 | 435k | { | 335 | 6.84M | while ((unsigned) length > size) | 336 | 6.40M | { | 337 | 6.40M | arrayZ[(unsigned) length - 1].~Type (); | 338 | 6.40M | length--; | 339 | 6.40M | } | 340 | 435k | } |
hb_vector_t<OT::cff1::accelerator_t::gname_t, true>::shrink_vector(unsigned int) Line | Count | Source | 334 | 22.4k | { | 335 | 6.15M | while ((unsigned) length > size) | 336 | 6.13M | { | 337 | 6.13M | arrayZ[(unsigned) length - 1].~Type (); | 338 | 6.13M | length--; | 339 | 6.13M | } | 340 | 22.4k | } |
hb_vector_t<CFF::cff1_top_dict_val_t, false>::shrink_vector(unsigned int) Line | Count | Source | 334 | 1.14M | { | 335 | 1.54M | while ((unsigned) length > size) | 336 | 396k | { | 337 | 396k | arrayZ[(unsigned) length - 1].~Type (); | 338 | 396k | length--; | 339 | 396k | } | 340 | 1.14M | } |
hb_vector_t<CFF::cff1_font_dict_values_t, false>::shrink_vector(unsigned int) Line | Count | Source | 334 | 1.14M | { | 335 | 1.27M | while ((unsigned) length > size) | 336 | 122k | { | 337 | 122k | arrayZ[(unsigned) length - 1].~Type (); | 338 | 122k | length--; | 339 | 122k | } | 340 | 1.14M | } |
hb_vector_t<CFF::op_str_t, false>::shrink_vector(unsigned int) Line | Count | Source | 334 | 4.77M | { | 335 | 4.98M | while ((unsigned) length > size) | 336 | 204k | { | 337 | 204k | arrayZ[(unsigned) length - 1].~Type (); | 338 | 204k | length--; | 339 | 204k | } | 340 | 4.77M | } |
hb_vector_t<CFF::cff1_private_dict_values_base_t<CFF::dict_val_t>, false>::shrink_vector(unsigned int) Line | Count | Source | 334 | 1.14M | { | 335 | 1.51M | while ((unsigned) length > size) | 336 | 366k | { | 337 | 366k | arrayZ[(unsigned) length - 1].~Type (); | 338 | 366k | length--; | 339 | 366k | } | 340 | 1.14M | } |
hb_vector_t<CFF::dict_val_t, false>::shrink_vector(unsigned int) Line | Count | Source | 334 | 2.79M | { | 335 | 3.32M | while ((unsigned) length > size) | 336 | 536k | { | 337 | 536k | arrayZ[(unsigned) length - 1].~Type (); | 338 | 536k | length--; | 339 | 536k | } | 340 | 2.79M | } |
hb_vector_t<CFF::cff2_font_dict_values_t, false>::shrink_vector(unsigned int) Line | Count | Source | 334 | 1.03M | { | 335 | 2.06M | while ((unsigned) length > size) | 336 | 1.02M | { | 337 | 1.02M | arrayZ[(unsigned) length - 1].~Type (); | 338 | 1.02M | length--; | 339 | 1.02M | } | 340 | 1.03M | } |
hb_vector_t<CFF::cff2_private_dict_values_base_t<CFF::dict_val_t>, false>::shrink_vector(unsigned int) Line | Count | Source | 334 | 1.03M | { | 335 | 3.45M | while ((unsigned) length > size) | 336 | 2.42M | { | 337 | 2.42M | arrayZ[(unsigned) length - 1].~Type (); | 338 | 2.42M | length--; | 339 | 2.42M | } | 340 | 1.03M | } |
Unexecuted instantiation: hb_vector_t<hb_array_t<unsigned char const>, false>::shrink_vector(unsigned int) Unexecuted instantiation: hb_vector_t<hb_ot_name_record_ids_t, false>::shrink_vector(unsigned int) hb_vector_t<float, false>::shrink_vector(unsigned int) Line | Count | Source | 334 | 995k | { | 335 | 1.00M | while ((unsigned) length > size) | 336 | 13.1k | { | 337 | 13.1k | arrayZ[(unsigned) length - 1].~Type (); | 338 | 13.1k | length--; | 339 | 13.1k | } | 340 | 995k | } |
Unexecuted instantiation: hb_vector_t<CFF::number_t, false>::shrink_vector(unsigned int) hb_vector_t<hb_ot_map_builder_t::feature_info_t, false>::shrink_vector(unsigned int) Line | Count | Source | 334 | 1.29M | { | 335 | 18.2M | while ((unsigned) length > size) | 336 | 16.9M | { | 337 | 16.9M | arrayZ[(unsigned) length - 1].~Type (); | 338 | 16.9M | length--; | 339 | 16.9M | } | 340 | 1.29M | } |
hb_vector_t<hb_ot_map_builder_t::stage_info_t, false>::shrink_vector(unsigned int) Line | Count | Source | 334 | 2.42M | { | 335 | 5.22M | while ((unsigned) length > size) | 336 | 2.80M | { | 337 | 2.80M | arrayZ[(unsigned) length - 1].~Type (); | 338 | 2.80M | length--; | 339 | 2.80M | } | 340 | 2.42M | } |
|
341 | | |
342 | | void |
343 | | shift_down_vector (unsigned i) |
344 | 0 | { |
345 | 0 | for (; i < length; i++) |
346 | 0 | arrayZ[i - 1] = std::move (arrayZ[i]); |
347 | 0 | } |
348 | | |
349 | | /* Allocate for size but don't adjust length. */ |
350 | | bool alloc (unsigned int size, bool exact=false) |
351 | 1.52G | { |
352 | 1.52G | if (unlikely (in_error ())) |
353 | 4.99M | return false; |
354 | | |
355 | 1.51G | unsigned int new_allocated; |
356 | 1.51G | if (exact) |
357 | 5.26M | { |
358 | | /* If exact was specified, we allow shrinking the storage. */ |
359 | 5.26M | size = hb_max (size, length); |
360 | 5.26M | if (size <= (unsigned) allocated && |
361 | 5.26M | size >= (unsigned) allocated >> 2) |
362 | 2.04M | return true; |
363 | | |
364 | 3.22M | new_allocated = size; |
365 | 3.22M | } |
366 | 1.51G | else |
367 | 1.51G | { |
368 | 1.51G | if (likely (size <= (unsigned) allocated)) |
369 | 1.50G | return true; |
370 | | |
371 | 11.4M | new_allocated = allocated; |
372 | 26.2M | while (size > new_allocated) |
373 | 14.7M | new_allocated += (new_allocated >> 1) + 8; |
374 | 11.4M | } |
375 | | |
376 | | |
377 | | /* Reallocate */ |
378 | | |
379 | 14.7M | bool overflows = |
380 | 14.7M | (int) in_error () || |
381 | 14.7M | (new_allocated < size) || |
382 | 14.7M | hb_unsigned_mul_overflows (new_allocated, sizeof (Type)); |
383 | | |
384 | 14.7M | if (unlikely (overflows)) |
385 | 0 | { |
386 | 0 | allocated = -1; |
387 | 0 | return false; |
388 | 0 | } |
389 | | |
390 | 14.7M | Type *new_array = realloc_vector (new_allocated); |
391 | | |
392 | 14.7M | if (unlikely (new_allocated && !new_array)) |
393 | 158k | { |
394 | 158k | if (new_allocated <= (unsigned) allocated) |
395 | 548 | return true; // shrinking failed; it's okay; happens in our fuzzer |
396 | | |
397 | 158k | allocated = -1; |
398 | 158k | return false; |
399 | 158k | } |
400 | | |
401 | 14.5M | arrayZ = new_array; |
402 | 14.5M | allocated = new_allocated; |
403 | | |
404 | 14.5M | return true; |
405 | 14.7M | } hb_vector_t<hb_vector_t<hb_aat_map_t::range_flags_t, true>, false>::alloc(unsigned int, bool) Line | Count | Source | 351 | 272k | { | 352 | 272k | if (unlikely (in_error ())) | 353 | 0 | return false; | 354 | | | 355 | 272k | unsigned int new_allocated; | 356 | 272k | if (exact) | 357 | 0 | { | 358 | | /* If exact was specified, we allow shrinking the storage. */ | 359 | 0 | size = hb_max (size, length); | 360 | 0 | if (size <= (unsigned) allocated && | 361 | 0 | size >= (unsigned) allocated >> 2) | 362 | 0 | return true; | 363 | | | 364 | 0 | new_allocated = size; | 365 | 0 | } | 366 | 272k | else | 367 | 272k | { | 368 | 272k | if (likely (size <= (unsigned) allocated)) | 369 | 55.3k | return true; | 370 | | | 371 | 217k | new_allocated = allocated; | 372 | 434k | while (size > new_allocated) | 373 | 217k | new_allocated += (new_allocated >> 1) + 8; | 374 | 217k | } | 375 | | | 376 | | | 377 | | /* Reallocate */ | 378 | | | 379 | 217k | bool overflows = | 380 | 217k | (int) in_error () || | 381 | 217k | (new_allocated < size) || | 382 | 217k | hb_unsigned_mul_overflows (new_allocated, sizeof (Type)); | 383 | | | 384 | 217k | if (unlikely (overflows)) | 385 | 0 | { | 386 | 0 | allocated = -1; | 387 | 0 | return false; | 388 | 0 | } | 389 | | | 390 | 217k | Type *new_array = realloc_vector (new_allocated); | 391 | | | 392 | 217k | if (unlikely (new_allocated && !new_array)) | 393 | 5.57k | { | 394 | 5.57k | if (new_allocated <= (unsigned) allocated) | 395 | 0 | return true; // shrinking failed; it's okay; happens in our fuzzer | 396 | | | 397 | 5.57k | allocated = -1; | 398 | 5.57k | return false; | 399 | 5.57k | } | 400 | | | 401 | 211k | arrayZ = new_array; | 402 | 211k | allocated = new_allocated; | 403 | | | 404 | 211k | return true; | 405 | 217k | } |
hb_vector_t<hb_aat_map_t::range_flags_t, true>::alloc(unsigned int, bool) Line | Count | Source | 351 | 410k | { | 352 | 410k | if (unlikely (in_error ())) | 353 | 0 | return false; | 354 | | | 355 | 410k | unsigned int new_allocated; | 356 | 410k | if (exact) | 357 | 0 | { | 358 | | /* If exact was specified, we allow shrinking the storage. */ | 359 | 0 | size = hb_max (size, length); | 360 | 0 | if (size <= (unsigned) allocated && | 361 | 0 | size >= (unsigned) allocated >> 2) | 362 | 0 | return true; | 363 | | | 364 | 0 | new_allocated = size; | 365 | 0 | } | 366 | 410k | else | 367 | 410k | { | 368 | 410k | if (likely (size <= (unsigned) allocated)) | 369 | 0 | return true; | 370 | | | 371 | 410k | new_allocated = allocated; | 372 | 821k | while (size > new_allocated) | 373 | 410k | new_allocated += (new_allocated >> 1) + 8; | 374 | 410k | } | 375 | | | 376 | | | 377 | | /* Reallocate */ | 378 | | | 379 | 410k | bool overflows = | 380 | 410k | (int) in_error () || | 381 | 410k | (new_allocated < size) || | 382 | 410k | hb_unsigned_mul_overflows (new_allocated, sizeof (Type)); | 383 | | | 384 | 410k | if (unlikely (overflows)) | 385 | 0 | { | 386 | 0 | allocated = -1; | 387 | 0 | return false; | 388 | 0 | } | 389 | | | 390 | 410k | Type *new_array = realloc_vector (new_allocated); | 391 | | | 392 | 410k | if (unlikely (new_allocated && !new_array)) | 393 | 12.9k | { | 394 | 12.9k | if (new_allocated <= (unsigned) allocated) | 395 | 0 | return true; // shrinking failed; it's okay; happens in our fuzzer | 396 | | | 397 | 12.9k | allocated = -1; | 398 | 12.9k | return false; | 399 | 12.9k | } | 400 | | | 401 | 397k | arrayZ = new_array; | 402 | 397k | allocated = new_allocated; | 403 | | | 404 | 397k | return true; | 405 | 410k | } |
hb_vector_t<hb_user_data_array_t::hb_user_data_item_t, false>::alloc(unsigned int, bool) Line | Count | Source | 351 | 411k | { | 352 | 411k | if (unlikely (in_error ())) | 353 | 8.78k | return false; | 354 | | | 355 | 403k | unsigned int new_allocated; | 356 | 403k | if (exact) | 357 | 0 | { | 358 | | /* If exact was specified, we allow shrinking the storage. */ | 359 | 0 | size = hb_max (size, length); | 360 | 0 | if (size <= (unsigned) allocated && | 361 | 0 | size >= (unsigned) allocated >> 2) | 362 | 0 | return true; | 363 | | | 364 | 0 | new_allocated = size; | 365 | 0 | } | 366 | 403k | else | 367 | 403k | { | 368 | 403k | if (likely (size <= (unsigned) allocated)) | 369 | 0 | return true; | 370 | | | 371 | 403k | new_allocated = allocated; | 372 | 806k | while (size > new_allocated) | 373 | 403k | new_allocated += (new_allocated >> 1) + 8; | 374 | 403k | } | 375 | | | 376 | | | 377 | | /* Reallocate */ | 378 | | | 379 | 403k | bool overflows = | 380 | 403k | (int) in_error () || | 381 | 403k | (new_allocated < size) || | 382 | 403k | hb_unsigned_mul_overflows (new_allocated, sizeof (Type)); | 383 | | | 384 | 403k | if (unlikely (overflows)) | 385 | 0 | { | 386 | 0 | allocated = -1; | 387 | 0 | return false; | 388 | 0 | } | 389 | | | 390 | 403k | Type *new_array = realloc_vector (new_allocated); | 391 | | | 392 | 403k | if (unlikely (new_allocated && !new_array)) | 393 | 5.54k | { | 394 | 5.54k | if (new_allocated <= (unsigned) allocated) | 395 | 0 | return true; // shrinking failed; it's okay; happens in our fuzzer | 396 | | | 397 | 5.54k | allocated = -1; | 398 | 5.54k | return false; | 399 | 5.54k | } | 400 | | | 401 | 397k | arrayZ = new_array; | 402 | 397k | allocated = new_allocated; | 403 | | | 404 | 397k | return true; | 405 | 403k | } |
hb_vector_t<hb_bit_page_t, false>::alloc(unsigned int, bool) Line | Count | Source | 351 | 10.2M | { | 352 | 10.2M | if (unlikely (in_error ())) | 353 | 6.51k | return false; | 354 | | | 355 | 10.2M | unsigned int new_allocated; | 356 | 10.2M | if (exact) | 357 | 546k | { | 358 | | /* If exact was specified, we allow shrinking the storage. */ | 359 | 546k | size = hb_max (size, length); | 360 | 546k | if (size <= (unsigned) allocated && | 361 | 546k | size >= (unsigned) allocated >> 2) | 362 | 4.57k | return true; | 363 | | | 364 | 541k | new_allocated = size; | 365 | 541k | } | 366 | 9.70M | else | 367 | 9.70M | { | 368 | 9.70M | if (likely (size <= (unsigned) allocated)) | 369 | 9.54M | return true; | 370 | | | 371 | 164k | new_allocated = allocated; | 372 | 329k | while (size > new_allocated) | 373 | 164k | new_allocated += (new_allocated >> 1) + 8; | 374 | 164k | } | 375 | | | 376 | | | 377 | | /* Reallocate */ | 378 | | | 379 | 706k | bool overflows = | 380 | 706k | (int) in_error () || | 381 | 706k | (new_allocated < size) || | 382 | 706k | hb_unsigned_mul_overflows (new_allocated, sizeof (Type)); | 383 | | | 384 | 706k | if (unlikely (overflows)) | 385 | 0 | { | 386 | 0 | allocated = -1; | 387 | 0 | return false; | 388 | 0 | } | 389 | | | 390 | 706k | Type *new_array = realloc_vector (new_allocated); | 391 | | | 392 | 706k | if (unlikely (new_allocated && !new_array)) | 393 | 6.52k | { | 394 | 6.52k | if (new_allocated <= (unsigned) allocated) | 395 | 6 | return true; // shrinking failed; it's okay; happens in our fuzzer | 396 | | | 397 | 6.51k | allocated = -1; | 398 | 6.51k | return false; | 399 | 6.52k | } | 400 | | | 401 | 700k | arrayZ = new_array; | 402 | 700k | allocated = new_allocated; | 403 | | | 404 | 700k | return true; | 405 | 706k | } |
hb_vector_t<hb_bit_set_t::page_map_t, true>::alloc(unsigned int, bool) Line | Count | Source | 351 | 10.2M | { | 352 | 10.2M | if (unlikely (in_error ())) | 353 | 0 | return false; | 354 | | | 355 | 10.2M | unsigned int new_allocated; | 356 | 10.2M | if (exact) | 357 | 536k | { | 358 | | /* If exact was specified, we allow shrinking the storage. */ | 359 | 536k | size = hb_max (size, length); | 360 | 536k | if (size <= (unsigned) allocated && | 361 | 536k | size >= (unsigned) allocated >> 2) | 362 | 101 | return true; | 363 | | | 364 | 536k | new_allocated = size; | 365 | 536k | } | 366 | 9.70M | else | 367 | 9.70M | { | 368 | 9.70M | if (likely (size <= (unsigned) allocated)) | 369 | 9.54M | return true; | 370 | | | 371 | 163k | new_allocated = allocated; | 372 | 327k | while (size > new_allocated) | 373 | 163k | new_allocated += (new_allocated >> 1) + 8; | 374 | 163k | } | 375 | | | 376 | | | 377 | | /* Reallocate */ | 378 | | | 379 | 700k | bool overflows = | 380 | 700k | (int) in_error () || | 381 | 700k | (new_allocated < size) || | 382 | 700k | hb_unsigned_mul_overflows (new_allocated, sizeof (Type)); | 383 | | | 384 | 700k | if (unlikely (overflows)) | 385 | 0 | { | 386 | 0 | allocated = -1; | 387 | 0 | return false; | 388 | 0 | } | 389 | | | 390 | 700k | Type *new_array = realloc_vector (new_allocated); | 391 | | | 392 | 700k | if (unlikely (new_allocated && !new_array)) | 393 | 5.36k | { | 394 | 5.36k | if (new_allocated <= (unsigned) allocated) | 395 | 52 | return true; // shrinking failed; it's okay; happens in our fuzzer | 396 | | | 397 | 5.31k | allocated = -1; | 398 | 5.31k | return false; | 399 | 5.36k | } | 400 | | | 401 | 694k | arrayZ = new_array; | 402 | 694k | allocated = new_allocated; | 403 | | | 404 | 694k | return true; | 405 | 700k | } |
hb_vector_t<hb_serialize_context_t::object_t::link_t, false>::alloc(unsigned int, bool) Line | Count | Source | 351 | 293k | { | 352 | 293k | if (unlikely (in_error ())) | 353 | 0 | return false; | 354 | | | 355 | 293k | unsigned int new_allocated; | 356 | 293k | if (exact) | 357 | 0 | { | 358 | | /* If exact was specified, we allow shrinking the storage. */ | 359 | 0 | size = hb_max (size, length); | 360 | 0 | if (size <= (unsigned) allocated && | 361 | 0 | size >= (unsigned) allocated >> 2) | 362 | 0 | return true; | 363 | | | 364 | 0 | new_allocated = size; | 365 | 0 | } | 366 | 293k | else | 367 | 293k | { | 368 | 293k | if (likely (size <= (unsigned) allocated)) | 369 | 186k | return true; | 370 | | | 371 | 107k | new_allocated = allocated; | 372 | 215k | while (size > new_allocated) | 373 | 107k | new_allocated += (new_allocated >> 1) + 8; | 374 | 107k | } | 375 | | | 376 | | | 377 | | /* Reallocate */ | 378 | | | 379 | 107k | bool overflows = | 380 | 107k | (int) in_error () || | 381 | 107k | (new_allocated < size) || | 382 | 107k | hb_unsigned_mul_overflows (new_allocated, sizeof (Type)); | 383 | | | 384 | 107k | if (unlikely (overflows)) | 385 | 0 | { | 386 | 0 | allocated = -1; | 387 | 0 | return false; | 388 | 0 | } | 389 | | | 390 | 107k | Type *new_array = realloc_vector (new_allocated); | 391 | | | 392 | 107k | if (unlikely (new_allocated && !new_array)) | 393 | 1.81k | { | 394 | 1.81k | if (new_allocated <= (unsigned) allocated) | 395 | 0 | return true; // shrinking failed; it's okay; happens in our fuzzer | 396 | | | 397 | 1.81k | allocated = -1; | 398 | 1.81k | return false; | 399 | 1.81k | } | 400 | | | 401 | 105k | arrayZ = new_array; | 402 | 105k | allocated = new_allocated; | 403 | | | 404 | 105k | return true; | 405 | 107k | } |
hb_vector_t<hb_serialize_context_t::object_t*, false>::alloc(unsigned int, bool) Line | Count | Source | 351 | 241k | { | 352 | 241k | if (unlikely (in_error ())) | 353 | 745 | return false; | 354 | | | 355 | 240k | unsigned int new_allocated; | 356 | 240k | if (exact) | 357 | 0 | { | 358 | | /* If exact was specified, we allow shrinking the storage. */ | 359 | 0 | size = hb_max (size, length); | 360 | 0 | if (size <= (unsigned) allocated && | 361 | 0 | size >= (unsigned) allocated >> 2) | 362 | 0 | return true; | 363 | | | 364 | 0 | new_allocated = size; | 365 | 0 | } | 366 | 240k | else | 367 | 240k | { | 368 | 240k | if (likely (size <= (unsigned) allocated)) | 369 | 205k | return true; | 370 | | | 371 | 34.8k | new_allocated = allocated; | 372 | 69.6k | while (size > new_allocated) | 373 | 34.8k | new_allocated += (new_allocated >> 1) + 8; | 374 | 34.8k | } | 375 | | | 376 | | | 377 | | /* Reallocate */ | 378 | | | 379 | 34.8k | bool overflows = | 380 | 34.8k | (int) in_error () || | 381 | 34.8k | (new_allocated < size) || | 382 | 34.8k | hb_unsigned_mul_overflows (new_allocated, sizeof (Type)); | 383 | | | 384 | 34.8k | if (unlikely (overflows)) | 385 | 0 | { | 386 | 0 | allocated = -1; | 387 | 0 | return false; | 388 | 0 | } | 389 | | | 390 | 34.8k | Type *new_array = realloc_vector (new_allocated); | 391 | | | 392 | 34.8k | if (unlikely (new_allocated && !new_array)) | 393 | 1.00k | { | 394 | 1.00k | if (new_allocated <= (unsigned) allocated) | 395 | 0 | return true; // shrinking failed; it's okay; happens in our fuzzer | 396 | | | 397 | 1.00k | allocated = -1; | 398 | 1.00k | return false; | 399 | 1.00k | } | 400 | | | 401 | 33.8k | arrayZ = new_array; | 402 | 33.8k | allocated = new_allocated; | 403 | | | 404 | 33.8k | return true; | 405 | 34.8k | } |
hb_vector_t<unsigned int, false>::alloc(unsigned int, bool) Line | Count | Source | 351 | 25.7M | { | 352 | 25.7M | if (unlikely (in_error ())) | 353 | 160k | return false; | 354 | | | 355 | 25.5M | unsigned int new_allocated; | 356 | 25.5M | if (exact) | 357 | 142k | { | 358 | | /* If exact was specified, we allow shrinking the storage. */ | 359 | 142k | size = hb_max (size, length); | 360 | 142k | if (size <= (unsigned) allocated && | 361 | 142k | size >= (unsigned) allocated >> 2) | 362 | 0 | return true; | 363 | | | 364 | 142k | new_allocated = size; | 365 | 142k | } | 366 | 25.4M | else | 367 | 25.4M | { | 368 | 25.4M | if (likely (size <= (unsigned) allocated)) | 369 | 25.2M | return true; | 370 | | | 371 | 151k | new_allocated = allocated; | 372 | 867k | while (size > new_allocated) | 373 | 715k | new_allocated += (new_allocated >> 1) + 8; | 374 | 151k | } | 375 | | | 376 | | | 377 | | /* Reallocate */ | 378 | | | 379 | 293k | bool overflows = | 380 | 293k | (int) in_error () || | 381 | 293k | (new_allocated < size) || | 382 | 293k | hb_unsigned_mul_overflows (new_allocated, sizeof (Type)); | 383 | | | 384 | 293k | if (unlikely (overflows)) | 385 | 0 | { | 386 | 0 | allocated = -1; | 387 | 0 | return false; | 388 | 0 | } | 389 | | | 390 | 293k | Type *new_array = realloc_vector (new_allocated); | 391 | | | 392 | 293k | if (unlikely (new_allocated && !new_array)) | 393 | 3.15k | { | 394 | 3.15k | if (new_allocated <= (unsigned) allocated) | 395 | 0 | return true; // shrinking failed; it's okay; happens in our fuzzer | 396 | | | 397 | 3.15k | allocated = -1; | 398 | 3.15k | return false; | 399 | 3.15k | } | 400 | | | 401 | 290k | arrayZ = new_array; | 402 | 290k | allocated = new_allocated; | 403 | | | 404 | 290k | return true; | 405 | 293k | } |
Unexecuted instantiation: hb_vector_t<hb_vector_t<unsigned int, false>, false>::alloc(unsigned int, bool) Unexecuted instantiation: hb_vector_t<unsigned int, true>::alloc(unsigned int, bool) hb_vector_t<hb_pool_t<hb_serialize_context_t::object_t, 32u>::chunk_t*, false>::alloc(unsigned int, bool) Line | Count | Source | 351 | 59.1k | { | 352 | 59.1k | if (unlikely (in_error ())) | 353 | 0 | return false; | 354 | | | 355 | 59.1k | unsigned int new_allocated; | 356 | 59.1k | if (exact) | 357 | 0 | { | 358 | | /* If exact was specified, we allow shrinking the storage. */ | 359 | 0 | size = hb_max (size, length); | 360 | 0 | if (size <= (unsigned) allocated && | 361 | 0 | size >= (unsigned) allocated >> 2) | 362 | 0 | return true; | 363 | | | 364 | 0 | new_allocated = size; | 365 | 0 | } | 366 | 59.1k | else | 367 | 59.1k | { | 368 | 59.1k | if (likely (size <= (unsigned) allocated)) | 369 | 34.1k | return true; | 370 | | | 371 | 25.0k | new_allocated = allocated; | 372 | 50.0k | while (size > new_allocated) | 373 | 25.0k | new_allocated += (new_allocated >> 1) + 8; | 374 | 25.0k | } | 375 | | | 376 | | | 377 | | /* Reallocate */ | 378 | | | 379 | 25.0k | bool overflows = | 380 | 25.0k | (int) in_error () || | 381 | 25.0k | (new_allocated < size) || | 382 | 25.0k | hb_unsigned_mul_overflows (new_allocated, sizeof (Type)); | 383 | | | 384 | 25.0k | if (unlikely (overflows)) | 385 | 0 | { | 386 | 0 | allocated = -1; | 387 | 0 | return false; | 388 | 0 | } | 389 | | | 390 | 25.0k | Type *new_array = realloc_vector (new_allocated); | 391 | | | 392 | 25.0k | if (unlikely (new_allocated && !new_array)) | 393 | 728 | { | 394 | 728 | if (new_allocated <= (unsigned) allocated) | 395 | 0 | return true; // shrinking failed; it's okay; happens in our fuzzer | 396 | | | 397 | 728 | allocated = -1; | 398 | 728 | return false; | 399 | 728 | } | 400 | | | 401 | 24.2k | arrayZ = new_array; | 402 | 24.2k | allocated = new_allocated; | 403 | | | 404 | 24.2k | return true; | 405 | 25.0k | } |
Unexecuted instantiation: hb_vector_t<hb_pair_t<unsigned int, unsigned int>, true>::alloc(unsigned int, bool) Unexecuted instantiation: hb_vector_t<OT::VarData::serialize(hb_serialize_context_t*, OT::VarData const*, hb_inc_bimap_t const&, hb_bimap_t const&)::delta_size_t, false>::alloc(unsigned int, bool) Unexecuted instantiation: hb_vector_t<hb_inc_bimap_t, false>::alloc(unsigned int, bool) Unexecuted instantiation: hb_vector_t<hb_set_t, false>::alloc(unsigned int, bool) hb_vector_t<OT::hb_accelerate_subtables_context_t::hb_applicable_t, false>::alloc(unsigned int, bool) Line | Count | Source | 351 | 5.26M | { | 352 | 5.26M | if (unlikely (in_error ())) | 353 | 115k | return false; | 354 | | | 355 | 5.14M | unsigned int new_allocated; | 356 | 5.14M | if (exact) | 357 | 2.35M | { | 358 | | /* If exact was specified, we allow shrinking the storage. */ | 359 | 2.35M | size = hb_max (size, length); | 360 | 2.35M | if (size <= (unsigned) allocated && | 361 | 2.35M | size >= (unsigned) allocated >> 2) | 362 | 931k | return true; | 363 | | | 364 | 1.41M | new_allocated = size; | 365 | 1.41M | } | 366 | 2.79M | else | 367 | 2.79M | { | 368 | 2.79M | if (likely (size <= (unsigned) allocated)) | 369 | 2.79M | return true; | 370 | | | 371 | 0 | new_allocated = allocated; | 372 | 0 | while (size > new_allocated) | 373 | 0 | new_allocated += (new_allocated >> 1) + 8; | 374 | 0 | } | 375 | | | 376 | | | 377 | | /* Reallocate */ | 378 | | | 379 | 1.41M | bool overflows = | 380 | 1.41M | (int) in_error () || | 381 | 1.41M | (new_allocated < size) || | 382 | 1.41M | hb_unsigned_mul_overflows (new_allocated, sizeof (Type)); | 383 | | | 384 | 1.41M | if (unlikely (overflows)) | 385 | 0 | { | 386 | 0 | allocated = -1; | 387 | 0 | return false; | 388 | 0 | } | 389 | | | 390 | 1.41M | Type *new_array = realloc_vector (new_allocated); | 391 | | | 392 | 1.41M | if (unlikely (new_allocated && !new_array)) | 393 | 11.7k | { | 394 | 11.7k | if (new_allocated <= (unsigned) allocated) | 395 | 0 | return true; // shrinking failed; it's okay; happens in our fuzzer | 396 | | | 397 | 11.7k | allocated = -1; | 398 | 11.7k | return false; | 399 | 11.7k | } | 400 | | | 401 | 1.40M | arrayZ = new_array; | 402 | 1.40M | allocated = new_allocated; | 403 | | | 404 | 1.40M | return true; | 405 | 1.41M | } |
Unexecuted instantiation: hb_vector_t<hb_aat_map_builder_t::feature_range_t, true>::alloc(unsigned int, bool) hb_vector_t<hb_aat_map_builder_t::feature_event_t, false>::alloc(unsigned int, bool) Line | Count | Source | 351 | 278k | { | 352 | 278k | if (unlikely (in_error ())) | 353 | 0 | return false; | 354 | | | 355 | 278k | unsigned int new_allocated; | 356 | 278k | if (exact) | 357 | 0 | { | 358 | | /* If exact was specified, we allow shrinking the storage. */ | 359 | 0 | size = hb_max (size, length); | 360 | 0 | if (size <= (unsigned) allocated && | 361 | 0 | size >= (unsigned) allocated >> 2) | 362 | 0 | return true; | 363 | | | 364 | 0 | new_allocated = size; | 365 | 0 | } | 366 | 278k | else | 367 | 278k | { | 368 | 278k | if (likely (size <= (unsigned) allocated)) | 369 | 0 | return true; | 370 | | | 371 | 278k | new_allocated = allocated; | 372 | 557k | while (size > new_allocated) | 373 | 278k | new_allocated += (new_allocated >> 1) + 8; | 374 | 278k | } | 375 | | | 376 | | | 377 | | /* Reallocate */ | 378 | | | 379 | 278k | bool overflows = | 380 | 278k | (int) in_error () || | 381 | 278k | (new_allocated < size) || | 382 | 278k | hb_unsigned_mul_overflows (new_allocated, sizeof (Type)); | 383 | | | 384 | 278k | if (unlikely (overflows)) | 385 | 0 | { | 386 | 0 | allocated = -1; | 387 | 0 | return false; | 388 | 0 | } | 389 | | | 390 | 278k | Type *new_array = realloc_vector (new_allocated); | 391 | | | 392 | 278k | if (unlikely (new_allocated && !new_array)) | 393 | 6.35k | { | 394 | 6.35k | if (new_allocated <= (unsigned) allocated) | 395 | 0 | return true; // shrinking failed; it's okay; happens in our fuzzer | 396 | | | 397 | 6.35k | allocated = -1; | 398 | 6.35k | return false; | 399 | 6.35k | } | 400 | | | 401 | 272k | arrayZ = new_array; | 402 | 272k | allocated = new_allocated; | 403 | | | 404 | 272k | return true; | 405 | 278k | } |
hb_vector_t<hb_aat_map_builder_t::feature_info_t, true>::alloc(unsigned int, bool) Line | Count | Source | 351 | 544k | { | 352 | 544k | if (unlikely (in_error ())) | 353 | 0 | return false; | 354 | | | 355 | 544k | unsigned int new_allocated; | 356 | 544k | if (exact) | 357 | 272k | { | 358 | | /* If exact was specified, we allow shrinking the storage. */ | 359 | 272k | size = hb_max (size, length); | 360 | 272k | if (size <= (unsigned) allocated && | 361 | 272k | size >= (unsigned) allocated >> 2) | 362 | 272k | return true; | 363 | | | 364 | 0 | new_allocated = size; | 365 | 0 | } | 366 | 272k | else | 367 | 272k | { | 368 | 272k | if (likely (size <= (unsigned) allocated)) | 369 | 272k | return true; | 370 | | | 371 | 0 | new_allocated = allocated; | 372 | 0 | while (size > new_allocated) | 373 | 0 | new_allocated += (new_allocated >> 1) + 8; | 374 | 0 | } | 375 | | | 376 | | | 377 | | /* Reallocate */ | 378 | | | 379 | 0 | bool overflows = | 380 | 0 | (int) in_error () || | 381 | 0 | (new_allocated < size) || | 382 | 0 | hb_unsigned_mul_overflows (new_allocated, sizeof (Type)); | 383 | |
| 384 | 0 | if (unlikely (overflows)) | 385 | 0 | { | 386 | 0 | allocated = -1; | 387 | 0 | return false; | 388 | 0 | } | 389 | | | 390 | 0 | Type *new_array = realloc_vector (new_allocated); | 391 | |
| 392 | 0 | if (unlikely (new_allocated && !new_array)) | 393 | 0 | { | 394 | 0 | if (new_allocated <= (unsigned) allocated) | 395 | 0 | return true; // shrinking failed; it's okay; happens in our fuzzer | 396 | | | 397 | 0 | allocated = -1; | 398 | 0 | return false; | 399 | 0 | } | 400 | | | 401 | 0 | arrayZ = new_array; | 402 | 0 | allocated = new_allocated; | 403 | |
| 404 | 0 | return true; | 405 | 0 | } |
Unexecuted instantiation: hb_vector_t<hb_pair_t<unsigned int, unsigned int>, false>::alloc(unsigned int, bool) hb_vector_t<hb_transform_t, false>::alloc(unsigned int, bool) Line | Count | Source | 351 | 6.04M | { | 352 | 6.04M | if (unlikely (in_error ())) | 353 | 212k | return false; | 354 | | | 355 | 5.83M | unsigned int new_allocated; | 356 | 5.83M | if (exact) | 357 | 0 | { | 358 | | /* If exact was specified, we allow shrinking the storage. */ | 359 | 0 | size = hb_max (size, length); | 360 | 0 | if (size <= (unsigned) allocated && | 361 | 0 | size >= (unsigned) allocated >> 2) | 362 | 0 | return true; | 363 | | | 364 | 0 | new_allocated = size; | 365 | 0 | } | 366 | 5.83M | else | 367 | 5.83M | { | 368 | 5.83M | if (likely (size <= (unsigned) allocated)) | 369 | 5.71M | return true; | 370 | | | 371 | 114k | new_allocated = allocated; | 372 | 228k | while (size > new_allocated) | 373 | 114k | new_allocated += (new_allocated >> 1) + 8; | 374 | 114k | } | 375 | | | 376 | | | 377 | | /* Reallocate */ | 378 | | | 379 | 114k | bool overflows = | 380 | 114k | (int) in_error () || | 381 | 114k | (new_allocated < size) || | 382 | 114k | hb_unsigned_mul_overflows (new_allocated, sizeof (Type)); | 383 | | | 384 | 114k | if (unlikely (overflows)) | 385 | 0 | { | 386 | 0 | allocated = -1; | 387 | 0 | return false; | 388 | 0 | } | 389 | | | 390 | 114k | Type *new_array = realloc_vector (new_allocated); | 391 | | | 392 | 114k | if (unlikely (new_allocated && !new_array)) | 393 | 2.95k | { | 394 | 2.95k | if (new_allocated <= (unsigned) allocated) | 395 | 0 | return true; // shrinking failed; it's okay; happens in our fuzzer | 396 | | | 397 | 2.95k | allocated = -1; | 398 | 2.95k | return false; | 399 | 2.95k | } | 400 | | | 401 | 111k | arrayZ = new_array; | 402 | 111k | allocated = new_allocated; | 403 | | | 404 | 111k | return true; | 405 | 114k | } |
hb_vector_t<hb_bounds_t, false>::alloc(unsigned int, bool) Line | Count | Source | 351 | 50.8M | { | 352 | 50.8M | if (unlikely (in_error ())) | 353 | 3.68M | return false; | 354 | | | 355 | 47.1M | unsigned int new_allocated; | 356 | 47.1M | if (exact) | 357 | 0 | { | 358 | | /* If exact was specified, we allow shrinking the storage. */ | 359 | 0 | size = hb_max (size, length); | 360 | 0 | if (size <= (unsigned) allocated && | 361 | 0 | size >= (unsigned) allocated >> 2) | 362 | 0 | return true; | 363 | | | 364 | 0 | new_allocated = size; | 365 | 0 | } | 366 | 47.1M | else | 367 | 47.1M | { | 368 | 47.1M | if (likely (size <= (unsigned) allocated)) | 369 | 46.9M | return true; | 370 | | | 371 | 240k | new_allocated = allocated; | 372 | 480k | while (size > new_allocated) | 373 | 240k | new_allocated += (new_allocated >> 1) + 8; | 374 | 240k | } | 375 | | | 376 | | | 377 | | /* Reallocate */ | 378 | | | 379 | 240k | bool overflows = | 380 | 240k | (int) in_error () || | 381 | 240k | (new_allocated < size) || | 382 | 240k | hb_unsigned_mul_overflows (new_allocated, sizeof (Type)); | 383 | | | 384 | 240k | if (unlikely (overflows)) | 385 | 0 | { | 386 | 0 | allocated = -1; | 387 | 0 | return false; | 388 | 0 | } | 389 | | | 390 | 240k | Type *new_array = realloc_vector (new_allocated); | 391 | | | 392 | 240k | if (unlikely (new_allocated && !new_array)) | 393 | 6.73k | { | 394 | 6.73k | if (new_allocated <= (unsigned) allocated) | 395 | 0 | return true; // shrinking failed; it's okay; happens in our fuzzer | 396 | | | 397 | 6.73k | allocated = -1; | 398 | 6.73k | return false; | 399 | 6.73k | } | 400 | | | 401 | 233k | arrayZ = new_array; | 402 | 233k | allocated = new_allocated; | 403 | | | 404 | 233k | return true; | 405 | 240k | } |
Unexecuted instantiation: hb_vector_t<OT::LayerRecord, false>::alloc(unsigned int, bool) Unexecuted instantiation: hb_vector_t<OT::index_map_subset_plan_t, false>::alloc(unsigned int, bool) Unexecuted instantiation: hb_vector_t<hb_set_t*, false>::alloc(unsigned int, bool) Unexecuted instantiation: hb_vector_t<OT::DeltaSetIndexMap const*, false>::alloc(unsigned int, bool) hb_vector_t<int, false>::alloc(unsigned int, bool) Line | Count | Source | 351 | 1.32G | { | 352 | 1.32G | if (unlikely (in_error ())) | 353 | 116k | return false; | 354 | | | 355 | 1.32G | unsigned int new_allocated; | 356 | 1.32G | if (exact) | 357 | 639k | { | 358 | | /* If exact was specified, we allow shrinking the storage. */ | 359 | 639k | size = hb_max (size, length); | 360 | 639k | if (size <= (unsigned) allocated && | 361 | 639k | size >= (unsigned) allocated >> 2) | 362 | 384k | return true; | 363 | | | 364 | 254k | new_allocated = size; | 365 | 254k | } | 366 | 1.32G | else | 367 | 1.32G | { | 368 | 1.32G | if (likely (size <= (unsigned) allocated)) | 369 | 1.32G | return true; | 370 | | | 371 | 656k | new_allocated = allocated; | 372 | 3.21M | while (size > new_allocated) | 373 | 2.55M | new_allocated += (new_allocated >> 1) + 8; | 374 | 656k | } | 375 | | | 376 | | | 377 | | /* Reallocate */ | 378 | | | 379 | 911k | bool overflows = | 380 | 911k | (int) in_error () || | 381 | 911k | (new_allocated < size) || | 382 | 911k | hb_unsigned_mul_overflows (new_allocated, sizeof (Type)); | 383 | | | 384 | 911k | if (unlikely (overflows)) | 385 | 0 | { | 386 | 0 | allocated = -1; | 387 | 0 | return false; | 388 | 0 | } | 389 | | | 390 | 911k | Type *new_array = realloc_vector (new_allocated); | 391 | | | 392 | 911k | if (unlikely (new_allocated && !new_array)) | 393 | 7.62k | { | 394 | 7.62k | if (new_allocated <= (unsigned) allocated) | 395 | 0 | return true; // shrinking failed; it's okay; happens in our fuzzer | 396 | | | 397 | 7.62k | allocated = -1; | 398 | 7.62k | return false; | 399 | 7.62k | } | 400 | | | 401 | 903k | arrayZ = new_array; | 402 | 903k | allocated = new_allocated; | 403 | | | 404 | 903k | return true; | 405 | 911k | } |
hb_vector_t<OT::contour_point_t, false>::alloc(unsigned int, bool) Line | Count | Source | 351 | 8.91M | { | 352 | 8.91M | if (unlikely (in_error ())) | 353 | 3.76k | return false; | 354 | | | 355 | 8.91M | unsigned int new_allocated; | 356 | 8.91M | if (exact) | 357 | 163k | { | 358 | | /* If exact was specified, we allow shrinking the storage. */ | 359 | 163k | size = hb_max (size, length); | 360 | 163k | if (size <= (unsigned) allocated && | 361 | 163k | size >= (unsigned) allocated >> 2) | 362 | 18.6k | return true; | 363 | | | 364 | 144k | new_allocated = size; | 365 | 144k | } | 366 | 8.74M | else | 367 | 8.74M | { | 368 | 8.74M | if (likely (size <= (unsigned) allocated)) | 369 | 6.38M | return true; | 370 | | | 371 | 2.35M | new_allocated = allocated; | 372 | 5.48M | while (size > new_allocated) | 373 | 3.12M | new_allocated += (new_allocated >> 1) + 8; | 374 | 2.35M | } | 375 | | | 376 | | | 377 | | /* Reallocate */ | 378 | | | 379 | 2.50M | bool overflows = | 380 | 2.50M | (int) in_error () || | 381 | 2.50M | (new_allocated < size) || | 382 | 2.50M | hb_unsigned_mul_overflows (new_allocated, sizeof (Type)); | 383 | | | 384 | 2.50M | if (unlikely (overflows)) | 385 | 0 | { | 386 | 0 | allocated = -1; | 387 | 0 | return false; | 388 | 0 | } | 389 | | | 390 | 2.50M | Type *new_array = realloc_vector (new_allocated); | 391 | | | 392 | 2.50M | if (unlikely (new_allocated && !new_array)) | 393 | 27.3k | { | 394 | 27.3k | if (new_allocated <= (unsigned) allocated) | 395 | 25 | return true; // shrinking failed; it's okay; happens in our fuzzer | 396 | | | 397 | 27.3k | allocated = -1; | 398 | 27.3k | return false; | 399 | 27.3k | } | 400 | | | 401 | 2.47M | arrayZ = new_array; | 402 | 2.47M | allocated = new_allocated; | 403 | | | 404 | 2.47M | return true; | 405 | 2.50M | } |
Unexecuted instantiation: hb_vector_t<unsigned char, false>::alloc(unsigned int, bool) Unexecuted instantiation: hb_vector_t<OT::glyf_impl::SubsetGlyph, false>::alloc(unsigned int, bool) Unexecuted instantiation: hb_vector_t<hb_variation_t, false>::alloc(unsigned int, bool) hb_vector_t<char, false>::alloc(unsigned int, bool) Line | Count | Source | 351 | 10.4k | { | 352 | 10.4k | if (unlikely (in_error ())) | 353 | 0 | return false; | 354 | | | 355 | 10.4k | unsigned int new_allocated; | 356 | 10.4k | if (exact) | 357 | 0 | { | 358 | | /* If exact was specified, we allow shrinking the storage. */ | 359 | 0 | size = hb_max (size, length); | 360 | 0 | if (size <= (unsigned) allocated && | 361 | 0 | size >= (unsigned) allocated >> 2) | 362 | 0 | return true; | 363 | | | 364 | 0 | new_allocated = size; | 365 | 0 | } | 366 | 10.4k | else | 367 | 10.4k | { | 368 | 10.4k | if (likely (size <= (unsigned) allocated)) | 369 | 0 | return true; | 370 | | | 371 | 10.4k | new_allocated = allocated; | 372 | 83.3k | while (size > new_allocated) | 373 | 72.9k | new_allocated += (new_allocated >> 1) + 8; | 374 | 10.4k | } | 375 | | | 376 | | | 377 | | /* Reallocate */ | 378 | | | 379 | 10.4k | bool overflows = | 380 | 10.4k | (int) in_error () || | 381 | 10.4k | (new_allocated < size) || | 382 | 10.4k | hb_unsigned_mul_overflows (new_allocated, sizeof (Type)); | 383 | | | 384 | 10.4k | if (unlikely (overflows)) | 385 | 0 | { | 386 | 0 | allocated = -1; | 387 | 0 | return false; | 388 | 0 | } | 389 | | | 390 | 10.4k | Type *new_array = realloc_vector (new_allocated); | 391 | | | 392 | 10.4k | if (unlikely (new_allocated && !new_array)) | 393 | 551 | { | 394 | 551 | if (new_allocated <= (unsigned) allocated) | 395 | 0 | return true; // shrinking failed; it's okay; happens in our fuzzer | 396 | | | 397 | 551 | allocated = -1; | 398 | 551 | return false; | 399 | 551 | } | 400 | | | 401 | 9.86k | arrayZ = new_array; | 402 | 9.86k | allocated = new_allocated; | 403 | | | 404 | 9.86k | return true; | 405 | 10.4k | } |
Unexecuted instantiation: hb_vector_t<OT::IndexSubtableRecord, false>::alloc(unsigned int, bool) Unexecuted instantiation: hb_vector_t<hb_pair_t<unsigned int, OT::IndexSubtableRecord const*>, false>::alloc(unsigned int, bool) Unexecuted instantiation: hb_vector_t<OT::OffsetTo<OT::SBIXStrike, OT::IntType<unsigned int, 4u>, true>*, false>::alloc(unsigned int, bool) Unexecuted instantiation: hb_vector_t<hb_array_t<unsigned char const>, false>::alloc(unsigned int, bool) hb_vector_t<CFF::cff1_top_dict_val_t, false>::alloc(unsigned int, bool) Line | Count | Source | 351 | 399k | { | 352 | 399k | if (unlikely (in_error ())) | 353 | 3.30k | return false; | 354 | | | 355 | 396k | unsigned int new_allocated; | 356 | 396k | if (exact) | 357 | 0 | { | 358 | | /* If exact was specified, we allow shrinking the storage. */ | 359 | 0 | size = hb_max (size, length); | 360 | 0 | if (size <= (unsigned) allocated && | 361 | 0 | size >= (unsigned) allocated >> 2) | 362 | 0 | return true; | 363 | | | 364 | 0 | new_allocated = size; | 365 | 0 | } | 366 | 396k | else | 367 | 396k | { | 368 | 396k | if (likely (size <= (unsigned) allocated)) | 369 | 325k | return true; | 370 | | | 371 | 70.9k | new_allocated = allocated; | 372 | 141k | while (size > new_allocated) | 373 | 70.9k | new_allocated += (new_allocated >> 1) + 8; | 374 | 70.9k | } | 375 | | | 376 | | | 377 | | /* Reallocate */ | 378 | | | 379 | 70.9k | bool overflows = | 380 | 70.9k | (int) in_error () || | 381 | 70.9k | (new_allocated < size) || | 382 | 70.9k | hb_unsigned_mul_overflows (new_allocated, sizeof (Type)); | 383 | | | 384 | 70.9k | if (unlikely (overflows)) | 385 | 0 | { | 386 | 0 | allocated = -1; | 387 | 0 | return false; | 388 | 0 | } | 389 | | | 390 | 70.9k | Type *new_array = realloc_vector (new_allocated); | 391 | | | 392 | 70.9k | if (unlikely (new_allocated && !new_array)) | 393 | 259 | { | 394 | 259 | if (new_allocated <= (unsigned) allocated) | 395 | 0 | return true; // shrinking failed; it's okay; happens in our fuzzer | 396 | | | 397 | 259 | allocated = -1; | 398 | 259 | return false; | 399 | 259 | } | 400 | | | 401 | 70.6k | arrayZ = new_array; | 402 | 70.6k | allocated = new_allocated; | 403 | | | 404 | 70.6k | return true; | 405 | 70.9k | } |
hb_vector_t<CFF::op_str_t, false>::alloc(unsigned int, bool) Line | Count | Source | 351 | 206k | { | 352 | 206k | if (unlikely (in_error ())) | 353 | 1.24k | return false; | 354 | | | 355 | 204k | unsigned int new_allocated; | 356 | 204k | if (exact) | 357 | 0 | { | 358 | | /* If exact was specified, we allow shrinking the storage. */ | 359 | 0 | size = hb_max (size, length); | 360 | 0 | if (size <= (unsigned) allocated && | 361 | 0 | size >= (unsigned) allocated >> 2) | 362 | 0 | return true; | 363 | | | 364 | 0 | new_allocated = size; | 365 | 0 | } | 366 | 204k | else | 367 | 204k | { | 368 | 204k | if (likely (size <= (unsigned) allocated)) | 369 | 113k | return true; | 370 | | | 371 | 91.7k | new_allocated = allocated; | 372 | 183k | while (size > new_allocated) | 373 | 91.7k | new_allocated += (new_allocated >> 1) + 8; | 374 | 91.7k | } | 375 | | | 376 | | | 377 | | /* Reallocate */ | 378 | | | 379 | 91.7k | bool overflows = | 380 | 91.7k | (int) in_error () || | 381 | 91.7k | (new_allocated < size) || | 382 | 91.7k | hb_unsigned_mul_overflows (new_allocated, sizeof (Type)); | 383 | | | 384 | 91.7k | if (unlikely (overflows)) | 385 | 0 | { | 386 | 0 | allocated = -1; | 387 | 0 | return false; | 388 | 0 | } | 389 | | | 390 | 91.7k | Type *new_array = realloc_vector (new_allocated); | 391 | | | 392 | 91.7k | if (unlikely (new_allocated && !new_array)) | 393 | 513 | { | 394 | 513 | if (new_allocated <= (unsigned) allocated) | 395 | 0 | return true; // shrinking failed; it's okay; happens in our fuzzer | 396 | | | 397 | 513 | allocated = -1; | 398 | 513 | return false; | 399 | 513 | } | 400 | | | 401 | 91.2k | arrayZ = new_array; | 402 | 91.2k | allocated = new_allocated; | 403 | | | 404 | 91.2k | return true; | 405 | 91.7k | } |
hb_vector_t<CFF::dict_val_t, false>::alloc(unsigned int, bool) Line | Count | Source | 351 | 542k | { | 352 | 542k | if (unlikely (in_error ())) | 353 | 5.01k | return false; | 354 | | | 355 | 537k | unsigned int new_allocated; | 356 | 537k | if (exact) | 357 | 0 | { | 358 | | /* If exact was specified, we allow shrinking the storage. */ | 359 | 0 | size = hb_max (size, length); | 360 | 0 | if (size <= (unsigned) allocated && | 361 | 0 | size >= (unsigned) allocated >> 2) | 362 | 0 | return true; | 363 | | | 364 | 0 | new_allocated = size; | 365 | 0 | } | 366 | 537k | else | 367 | 537k | { | 368 | 537k | if (likely (size <= (unsigned) allocated)) | 369 | 433k | return true; | 370 | | | 371 | 103k | new_allocated = allocated; | 372 | 207k | while (size > new_allocated) | 373 | 103k | new_allocated += (new_allocated >> 1) + 8; | 374 | 103k | } | 375 | | | 376 | | | 377 | | /* Reallocate */ | 378 | | | 379 | 103k | bool overflows = | 380 | 103k | (int) in_error () || | 381 | 103k | (new_allocated < size) || | 382 | 103k | hb_unsigned_mul_overflows (new_allocated, sizeof (Type)); | 383 | | | 384 | 103k | if (unlikely (overflows)) | 385 | 0 | { | 386 | 0 | allocated = -1; | 387 | 0 | return false; | 388 | 0 | } | 389 | | | 390 | 103k | Type *new_array = realloc_vector (new_allocated); | 391 | | | 392 | 103k | if (unlikely (new_allocated && !new_array)) | 393 | 535 | { | 394 | 535 | if (new_allocated <= (unsigned) allocated) | 395 | 0 | return true; // shrinking failed; it's okay; happens in our fuzzer | 396 | | | 397 | 535 | allocated = -1; | 398 | 535 | return false; | 399 | 535 | } | 400 | | | 401 | 103k | arrayZ = new_array; | 402 | 103k | allocated = new_allocated; | 403 | | | 404 | 103k | return true; | 405 | 103k | } |
hb_vector_t<CFF::cff1_private_dict_values_base_t<CFF::dict_val_t>, false>::alloc(unsigned int, bool) Line | Count | Source | 351 | 32.8k | { | 352 | 32.8k | if (unlikely (in_error ())) | 353 | 0 | return false; | 354 | | | 355 | 32.8k | unsigned int new_allocated; | 356 | 32.8k | if (exact) | 357 | 0 | { | 358 | | /* If exact was specified, we allow shrinking the storage. */ | 359 | 0 | size = hb_max (size, length); | 360 | 0 | if (size <= (unsigned) allocated && | 361 | 0 | size >= (unsigned) allocated >> 2) | 362 | 0 | return true; | 363 | | | 364 | 0 | new_allocated = size; | 365 | 0 | } | 366 | 32.8k | else | 367 | 32.8k | { | 368 | 32.8k | if (likely (size <= (unsigned) allocated)) | 369 | 237 | return true; | 370 | | | 371 | 32.5k | new_allocated = allocated; | 372 | 69.2k | while (size > new_allocated) | 373 | 36.6k | new_allocated += (new_allocated >> 1) + 8; | 374 | 32.5k | } | 375 | | | 376 | | | 377 | | /* Reallocate */ | 378 | | | 379 | 32.5k | bool overflows = | 380 | 32.5k | (int) in_error () || | 381 | 32.5k | (new_allocated < size) || | 382 | 32.5k | hb_unsigned_mul_overflows (new_allocated, sizeof (Type)); | 383 | | | 384 | 32.5k | if (unlikely (overflows)) | 385 | 0 | { | 386 | 0 | allocated = -1; | 387 | 0 | return false; | 388 | 0 | } | 389 | | | 390 | 32.5k | Type *new_array = realloc_vector (new_allocated); | 391 | | | 392 | 32.5k | if (unlikely (new_allocated && !new_array)) | 393 | 28 | { | 394 | 28 | if (new_allocated <= (unsigned) allocated) | 395 | 0 | return true; // shrinking failed; it's okay; happens in our fuzzer | 396 | | | 397 | 28 | allocated = -1; | 398 | 28 | return false; | 399 | 28 | } | 400 | | | 401 | 32.5k | arrayZ = new_array; | 402 | 32.5k | allocated = new_allocated; | 403 | | | 404 | 32.5k | return true; | 405 | 32.5k | } |
hb_vector_t<CFF::cff1_font_dict_values_t, false>::alloc(unsigned int, bool) Line | Count | Source | 351 | 122k | { | 352 | 122k | if (unlikely (in_error ())) | 353 | 0 | return false; | 354 | | | 355 | 122k | unsigned int new_allocated; | 356 | 122k | if (exact) | 357 | 0 | { | 358 | | /* If exact was specified, we allow shrinking the storage. */ | 359 | 0 | size = hb_max (size, length); | 360 | 0 | if (size <= (unsigned) allocated && | 361 | 0 | size >= (unsigned) allocated >> 2) | 362 | 0 | return true; | 363 | | | 364 | 0 | new_allocated = size; | 365 | 0 | } | 366 | 122k | else | 367 | 122k | { | 368 | 122k | if (likely (size <= (unsigned) allocated)) | 369 | 117k | return true; | 370 | | | 371 | 5.33k | new_allocated = allocated; | 372 | 10.6k | while (size > new_allocated) | 373 | 5.33k | new_allocated += (new_allocated >> 1) + 8; | 374 | 5.33k | } | 375 | | | 376 | | | 377 | | /* Reallocate */ | 378 | | | 379 | 5.33k | bool overflows = | 380 | 5.33k | (int) in_error () || | 381 | 5.33k | (new_allocated < size) || | 382 | 5.33k | hb_unsigned_mul_overflows (new_allocated, sizeof (Type)); | 383 | | | 384 | 5.33k | if (unlikely (overflows)) | 385 | 0 | { | 386 | 0 | allocated = -1; | 387 | 0 | return false; | 388 | 0 | } | 389 | | | 390 | 5.33k | Type *new_array = realloc_vector (new_allocated); | 391 | | | 392 | 5.33k | if (unlikely (new_allocated && !new_array)) | 393 | 24 | { | 394 | 24 | if (new_allocated <= (unsigned) allocated) | 395 | 0 | return true; // shrinking failed; it's okay; happens in our fuzzer | 396 | | | 397 | 24 | allocated = -1; | 398 | 24 | return false; | 399 | 24 | } | 400 | | | 401 | 5.31k | arrayZ = new_array; | 402 | 5.31k | allocated = new_allocated; | 403 | | | 404 | 5.31k | return true; | 405 | 5.33k | } |
hb_vector_t<OT::cff1::accelerator_t::gname_t, true>::alloc(unsigned int, bool) Line | Count | Source | 351 | 6.13M | { | 352 | 6.13M | if (unlikely (in_error ())) | 353 | 0 | return false; | 354 | | | 355 | 6.13M | unsigned int new_allocated; | 356 | 6.13M | if (exact) | 357 | 0 | { | 358 | | /* If exact was specified, we allow shrinking the storage. */ | 359 | 0 | size = hb_max (size, length); | 360 | 0 | if (size <= (unsigned) allocated && | 361 | 0 | size >= (unsigned) allocated >> 2) | 362 | 0 | return true; | 363 | | | 364 | 0 | new_allocated = size; | 365 | 0 | } | 366 | 6.13M | else | 367 | 6.13M | { | 368 | 6.13M | if (likely (size <= (unsigned) allocated)) | 369 | 6.04M | return true; | 370 | | | 371 | 95.4k | new_allocated = allocated; | 372 | 190k | while (size > new_allocated) | 373 | 95.4k | new_allocated += (new_allocated >> 1) + 8; | 374 | 95.4k | } | 375 | | | 376 | | | 377 | | /* Reallocate */ | 378 | | | 379 | 95.4k | bool overflows = | 380 | 95.4k | (int) in_error () || | 381 | 95.4k | (new_allocated < size) || | 382 | 95.4k | hb_unsigned_mul_overflows (new_allocated, sizeof (Type)); | 383 | | | 384 | 95.4k | if (unlikely (overflows)) | 385 | 0 | { | 386 | 0 | allocated = -1; | 387 | 0 | return false; | 388 | 0 | } | 389 | | | 390 | 95.4k | Type *new_array = realloc_vector (new_allocated); | 391 | | | 392 | 95.4k | if (unlikely (new_allocated && !new_array)) | 393 | 0 | { | 394 | 0 | if (new_allocated <= (unsigned) allocated) | 395 | 0 | return true; // shrinking failed; it's okay; happens in our fuzzer | 396 | | | 397 | 0 | allocated = -1; | 398 | 0 | return false; | 399 | 0 | } | 400 | | | 401 | 95.4k | arrayZ = new_array; | 402 | 95.4k | allocated = new_allocated; | 403 | | | 404 | 95.4k | return true; | 405 | 95.4k | } |
hb_vector_t<CFF::cff2_private_dict_values_base_t<CFF::dict_val_t>, false>::alloc(unsigned int, bool) Line | Count | Source | 351 | 29.3k | { | 352 | 29.3k | if (unlikely (in_error ())) | 353 | 0 | return false; | 354 | | | 355 | 29.3k | unsigned int new_allocated; | 356 | 29.3k | if (exact) | 357 | 0 | { | 358 | | /* If exact was specified, we allow shrinking the storage. */ | 359 | 0 | size = hb_max (size, length); | 360 | 0 | if (size <= (unsigned) allocated && | 361 | 0 | size >= (unsigned) allocated >> 2) | 362 | 0 | return true; | 363 | | | 364 | 0 | new_allocated = size; | 365 | 0 | } | 366 | 29.3k | else | 367 | 29.3k | { | 368 | 29.3k | if (likely (size <= (unsigned) allocated)) | 369 | 7.94k | return true; | 370 | | | 371 | 21.3k | new_allocated = allocated; | 372 | 46.6k | while (size > new_allocated) | 373 | 25.2k | new_allocated += (new_allocated >> 1) + 8; | 374 | 21.3k | } | 375 | | | 376 | | | 377 | | /* Reallocate */ | 378 | | | 379 | 21.3k | bool overflows = | 380 | 21.3k | (int) in_error () || | 381 | 21.3k | (new_allocated < size) || | 382 | 21.3k | hb_unsigned_mul_overflows (new_allocated, sizeof (Type)); | 383 | | | 384 | 21.3k | if (unlikely (overflows)) | 385 | 0 | { | 386 | 0 | allocated = -1; | 387 | 0 | return false; | 388 | 0 | } | 389 | | | 390 | 21.3k | Type *new_array = realloc_vector (new_allocated); | 391 | | | 392 | 21.3k | if (unlikely (new_allocated && !new_array)) | 393 | 83 | { | 394 | 83 | if (new_allocated <= (unsigned) allocated) | 395 | 0 | return true; // shrinking failed; it's okay; happens in our fuzzer | 396 | | | 397 | 83 | allocated = -1; | 398 | 83 | return false; | 399 | 83 | } | 400 | | | 401 | 21.3k | arrayZ = new_array; | 402 | 21.3k | allocated = new_allocated; | 403 | | | 404 | 21.3k | return true; | 405 | 21.3k | } |
hb_vector_t<CFF::cff2_font_dict_values_t, false>::alloc(unsigned int, bool) Line | Count | Source | 351 | 1.02M | { | 352 | 1.02M | if (unlikely (in_error ())) | 353 | 0 | return false; | 354 | | | 355 | 1.02M | unsigned int new_allocated; | 356 | 1.02M | if (exact) | 357 | 0 | { | 358 | | /* If exact was specified, we allow shrinking the storage. */ | 359 | 0 | size = hb_max (size, length); | 360 | 0 | if (size <= (unsigned) allocated && | 361 | 0 | size >= (unsigned) allocated >> 2) | 362 | 0 | return true; | 363 | | | 364 | 0 | new_allocated = size; | 365 | 0 | } | 366 | 1.02M | else | 367 | 1.02M | { | 368 | 1.02M | if (likely (size <= (unsigned) allocated)) | 369 | 1.00M | return true; | 370 | | | 371 | 23.0k | new_allocated = allocated; | 372 | 46.1k | while (size > new_allocated) | 373 | 23.0k | new_allocated += (new_allocated >> 1) + 8; | 374 | 23.0k | } | 375 | | | 376 | | | 377 | | /* Reallocate */ | 378 | | | 379 | 23.0k | bool overflows = | 380 | 23.0k | (int) in_error () || | 381 | 23.0k | (new_allocated < size) || | 382 | 23.0k | hb_unsigned_mul_overflows (new_allocated, sizeof (Type)); | 383 | | | 384 | 23.0k | if (unlikely (overflows)) | 385 | 0 | { | 386 | 0 | allocated = -1; | 387 | 0 | return false; | 388 | 0 | } | 389 | | | 390 | 23.0k | Type *new_array = realloc_vector (new_allocated); | 391 | | | 392 | 23.0k | if (unlikely (new_allocated && !new_array)) | 393 | 127 | { | 394 | 127 | if (new_allocated <= (unsigned) allocated) | 395 | 0 | return true; // shrinking failed; it's okay; happens in our fuzzer | 396 | | | 397 | 127 | allocated = -1; | 398 | 127 | return false; | 399 | 127 | } | 400 | | | 401 | 22.9k | arrayZ = new_array; | 402 | 22.9k | allocated = new_allocated; | 403 | | | 404 | 22.9k | return true; | 405 | 23.0k | } |
Unexecuted instantiation: hb_vector_t<hb_ot_name_record_ids_t, false>::alloc(unsigned int, bool) hb_vector_t<hb_ot_name_entry_t, false>::alloc(unsigned int, bool) Line | Count | Source | 351 | 7.22M | { | 352 | 7.22M | if (unlikely (in_error ())) | 353 | 18.3k | return false; | 354 | | | 355 | 7.20M | unsigned int new_allocated; | 356 | 7.20M | if (exact) | 357 | 399k | { | 358 | | /* If exact was specified, we allow shrinking the storage. */ | 359 | 399k | size = hb_max (size, length); | 360 | 399k | if (size <= (unsigned) allocated && | 361 | 399k | size >= (unsigned) allocated >> 2) | 362 | 315k | return true; | 363 | | | 364 | 84.7k | new_allocated = size; | 365 | 84.7k | } | 366 | 6.80M | else | 367 | 6.80M | { | 368 | 6.80M | if (likely (size <= (unsigned) allocated)) | 369 | 6.80M | return true; | 370 | | | 371 | 0 | new_allocated = allocated; | 372 | 0 | while (size > new_allocated) | 373 | 0 | new_allocated += (new_allocated >> 1) + 8; | 374 | 0 | } | 375 | | | 376 | | | 377 | | /* Reallocate */ | 378 | | | 379 | 84.7k | bool overflows = | 380 | 84.7k | (int) in_error () || | 381 | 84.7k | (new_allocated < size) || | 382 | 84.7k | hb_unsigned_mul_overflows (new_allocated, sizeof (Type)); | 383 | | | 384 | 84.7k | if (unlikely (overflows)) | 385 | 0 | { | 386 | 0 | allocated = -1; | 387 | 0 | return false; | 388 | 0 | } | 389 | | | 390 | 84.7k | Type *new_array = realloc_vector (new_allocated); | 391 | | | 392 | 84.7k | if (unlikely (new_allocated && !new_array)) | 393 | 541 | { | 394 | 541 | if (new_allocated <= (unsigned) allocated) | 395 | 0 | return true; // shrinking failed; it's okay; happens in our fuzzer | 396 | | | 397 | 541 | allocated = -1; | 398 | 541 | return false; | 399 | 541 | } | 400 | | | 401 | 84.1k | arrayZ = new_array; | 402 | 84.1k | allocated = new_allocated; | 403 | | | 404 | 84.1k | return true; | 405 | 84.7k | } |
hb_vector_t<float, false>::alloc(unsigned int, bool) Line | Count | Source | 351 | 1.44k | { | 352 | 1.44k | if (unlikely (in_error ())) | 353 | 0 | return false; | 354 | | | 355 | 1.44k | unsigned int new_allocated; | 356 | 1.44k | if (exact) | 357 | 1.44k | { | 358 | | /* If exact was specified, we allow shrinking the storage. */ | 359 | 1.44k | size = hb_max (size, length); | 360 | 1.44k | if (size <= (unsigned) allocated && | 361 | 1.44k | size >= (unsigned) allocated >> 2) | 362 | 392 | return true; | 363 | | | 364 | 1.04k | new_allocated = size; | 365 | 1.04k | } | 366 | 0 | else | 367 | 0 | { | 368 | 0 | if (likely (size <= (unsigned) allocated)) | 369 | 0 | return true; | 370 | | | 371 | 0 | new_allocated = allocated; | 372 | 0 | while (size > new_allocated) | 373 | 0 | new_allocated += (new_allocated >> 1) + 8; | 374 | 0 | } | 375 | | | 376 | | | 377 | | /* Reallocate */ | 378 | | | 379 | 1.04k | bool overflows = | 380 | 1.04k | (int) in_error () || | 381 | 1.04k | (new_allocated < size) || | 382 | 1.04k | hb_unsigned_mul_overflows (new_allocated, sizeof (Type)); | 383 | | | 384 | 1.04k | if (unlikely (overflows)) | 385 | 0 | { | 386 | 0 | allocated = -1; | 387 | 0 | return false; | 388 | 0 | } | 389 | | | 390 | 1.04k | Type *new_array = realloc_vector (new_allocated); | 391 | | | 392 | 1.04k | if (unlikely (new_allocated && !new_array)) | 393 | 50 | { | 394 | 50 | if (new_allocated <= (unsigned) allocated) | 395 | 0 | return true; // shrinking failed; it's okay; happens in our fuzzer | 396 | | | 397 | 50 | allocated = -1; | 398 | 50 | return false; | 399 | 50 | } | 400 | | | 401 | 998 | arrayZ = new_array; | 402 | 998 | allocated = new_allocated; | 403 | | | 404 | 998 | return true; | 405 | 1.04k | } |
Unexecuted instantiation: hb_vector_t<CFF::number_t, false>::alloc(unsigned int, bool) hb_vector_t<hb_ot_map_builder_t::feature_info_t, false>::alloc(unsigned int, bool) Line | Count | Source | 351 | 17.4M | { | 352 | 17.4M | if (unlikely (in_error ())) | 353 | 313k | return false; | 354 | | | 355 | 17.0M | unsigned int new_allocated; | 356 | 17.0M | if (exact) | 357 | 86.0k | { | 358 | | /* If exact was specified, we allow shrinking the storage. */ | 359 | 86.0k | size = hb_max (size, length); | 360 | 86.0k | if (size <= (unsigned) allocated && | 361 | 86.0k | size >= (unsigned) allocated >> 2) | 362 | 86.0k | return true; | 363 | | | 364 | 0 | new_allocated = size; | 365 | 0 | } | 366 | 17.0M | else | 367 | 17.0M | { | 368 | 17.0M | if (likely (size <= (unsigned) allocated)) | 369 | 15.1M | return true; | 370 | | | 371 | 1.87M | new_allocated = allocated; | 372 | 3.75M | while (size > new_allocated) | 373 | 1.87M | new_allocated += (new_allocated >> 1) + 8; | 374 | 1.87M | } | 375 | | | 376 | | | 377 | | /* Reallocate */ | 378 | | | 379 | 1.87M | bool overflows = | 380 | 1.87M | (int) in_error () || | 381 | 1.87M | (new_allocated < size) || | 382 | 1.87M | hb_unsigned_mul_overflows (new_allocated, sizeof (Type)); | 383 | | | 384 | 1.87M | if (unlikely (overflows)) | 385 | 0 | { | 386 | 0 | allocated = -1; | 387 | 0 | return false; | 388 | 0 | } | 389 | | | 390 | 1.87M | Type *new_array = realloc_vector (new_allocated); | 391 | | | 392 | 1.87M | if (unlikely (new_allocated && !new_array)) | 393 | 17.3k | { | 394 | 17.3k | if (new_allocated <= (unsigned) allocated) | 395 | 0 | return true; // shrinking failed; it's okay; happens in our fuzzer | 396 | | | 397 | 17.3k | allocated = -1; | 398 | 17.3k | return false; | 399 | 17.3k | } | 400 | | | 401 | 1.86M | arrayZ = new_array; | 402 | 1.86M | allocated = new_allocated; | 403 | | | 404 | 1.86M | return true; | 405 | 1.87M | } |
hb_vector_t<hb_ot_map_t::lookup_map_t, false>::alloc(unsigned int, bool) Line | Count | Source | 351 | 33.9M | { | 352 | 33.9M | if (unlikely (in_error ())) | 353 | 309k | return false; | 354 | | | 355 | 33.6M | unsigned int new_allocated; | 356 | 33.6M | if (exact) | 357 | 127k | { | 358 | | /* If exact was specified, we allow shrinking the storage. */ | 359 | 127k | size = hb_max (size, length); | 360 | 127k | if (size <= (unsigned) allocated && | 361 | 127k | size >= (unsigned) allocated >> 2) | 362 | 27.9k | return true; | 363 | | | 364 | 99.3k | new_allocated = size; | 365 | 99.3k | } | 366 | 33.4M | else | 367 | 33.4M | { | 368 | 33.4M | if (likely (size <= (unsigned) allocated)) | 369 | 32.8M | return true; | 370 | | | 371 | 647k | new_allocated = allocated; | 372 | 1.29M | while (size > new_allocated) | 373 | 647k | new_allocated += (new_allocated >> 1) + 8; | 374 | 647k | } | 375 | | | 376 | | | 377 | | /* Reallocate */ | 378 | | | 379 | 746k | bool overflows = | 380 | 746k | (int) in_error () || | 381 | 746k | (new_allocated < size) || | 382 | 746k | hb_unsigned_mul_overflows (new_allocated, sizeof (Type)); | 383 | | | 384 | 746k | if (unlikely (overflows)) | 385 | 0 | { | 386 | 0 | allocated = -1; | 387 | 0 | return false; | 388 | 0 | } | 389 | | | 390 | 746k | Type *new_array = realloc_vector (new_allocated); | 391 | | | 392 | 746k | if (unlikely (new_allocated && !new_array)) | 393 | 3.53k | { | 394 | 3.53k | if (new_allocated <= (unsigned) allocated) | 395 | 465 | return true; // shrinking failed; it's okay; happens in our fuzzer | 396 | | | 397 | 3.06k | allocated = -1; | 398 | 3.06k | return false; | 399 | 3.53k | } | 400 | | | 401 | 743k | arrayZ = new_array; | 402 | 743k | allocated = new_allocated; | 403 | | | 404 | 743k | return true; | 405 | 746k | } |
hb_vector_t<hb_ot_map_builder_t::stage_info_t, false>::alloc(unsigned int, bool) Line | Count | Source | 351 | 2.83M | { | 352 | 2.83M | if (unlikely (in_error ())) | 353 | 14.7k | return false; | 354 | | | 355 | 2.81M | unsigned int new_allocated; | 356 | 2.81M | if (exact) | 357 | 0 | { | 358 | | /* If exact was specified, we allow shrinking the storage. */ | 359 | 0 | size = hb_max (size, length); | 360 | 0 | if (size <= (unsigned) allocated && | 361 | 0 | size >= (unsigned) allocated >> 2) | 362 | 0 | return true; | 363 | | | 364 | 0 | new_allocated = size; | 365 | 0 | } | 366 | 2.81M | else | 367 | 2.81M | { | 368 | 2.81M | if (likely (size <= (unsigned) allocated)) | 369 | 1.52M | return true; | 370 | | | 371 | 1.29M | new_allocated = allocated; | 372 | 2.58M | while (size > new_allocated) | 373 | 1.29M | new_allocated += (new_allocated >> 1) + 8; | 374 | 1.29M | } | 375 | | | 376 | | | 377 | | /* Reallocate */ | 378 | | | 379 | 1.29M | bool overflows = | 380 | 1.29M | (int) in_error () || | 381 | 1.29M | (new_allocated < size) || | 382 | 1.29M | hb_unsigned_mul_overflows (new_allocated, sizeof (Type)); | 383 | | | 384 | 1.29M | if (unlikely (overflows)) | 385 | 0 | { | 386 | 0 | allocated = -1; | 387 | 0 | return false; | 388 | 0 | } | 389 | | | 390 | 1.29M | Type *new_array = realloc_vector (new_allocated); | 391 | | | 392 | 1.29M | if (unlikely (new_allocated && !new_array)) | 393 | 12.3k | { | 394 | 12.3k | if (new_allocated <= (unsigned) allocated) | 395 | 0 | return true; // shrinking failed; it's okay; happens in our fuzzer | 396 | | | 397 | 12.3k | allocated = -1; | 398 | 12.3k | return false; | 399 | 12.3k | } | 400 | | | 401 | 1.27M | arrayZ = new_array; | 402 | 1.27M | allocated = new_allocated; | 403 | | | 404 | 1.27M | return true; | 405 | 1.29M | } |
hb_vector_t<hb_ot_map_t::feature_map_t, true>::alloc(unsigned int, bool) Line | Count | Source | 351 | 1.48M | { | 352 | 1.48M | if (unlikely (in_error ())) | 353 | 5.90k | return false; | 354 | | | 355 | 1.48M | unsigned int new_allocated; | 356 | 1.48M | if (exact) | 357 | 0 | { | 358 | | /* If exact was specified, we allow shrinking the storage. */ | 359 | 0 | size = hb_max (size, length); | 360 | 0 | if (size <= (unsigned) allocated && | 361 | 0 | size >= (unsigned) allocated >> 2) | 362 | 0 | return true; | 363 | | | 364 | 0 | new_allocated = size; | 365 | 0 | } | 366 | 1.48M | else | 367 | 1.48M | { | 368 | 1.48M | if (likely (size <= (unsigned) allocated)) | 369 | 877k | return true; | 370 | | | 371 | 606k | new_allocated = allocated; | 372 | 1.21M | while (size > new_allocated) | 373 | 606k | new_allocated += (new_allocated >> 1) + 8; | 374 | 606k | } | 375 | | | 376 | | | 377 | | /* Reallocate */ | 378 | | | 379 | 606k | bool overflows = | 380 | 606k | (int) in_error () || | 381 | 606k | (new_allocated < size) || | 382 | 606k | hb_unsigned_mul_overflows (new_allocated, sizeof (Type)); | 383 | | | 384 | 606k | if (unlikely (overflows)) | 385 | 0 | { | 386 | 0 | allocated = -1; | 387 | 0 | return false; | 388 | 0 | } | 389 | | | 390 | 606k | Type *new_array = realloc_vector (new_allocated); | 391 | | | 392 | 606k | if (unlikely (new_allocated && !new_array)) | 393 | 4.82k | { | 394 | 4.82k | if (new_allocated <= (unsigned) allocated) | 395 | 0 | return true; // shrinking failed; it's okay; happens in our fuzzer | 396 | | | 397 | 4.82k | allocated = -1; | 398 | 4.82k | return false; | 399 | 4.82k | } | 400 | | | 401 | 601k | arrayZ = new_array; | 402 | 601k | allocated = new_allocated; | 403 | | | 404 | 601k | return true; | 405 | 606k | } |
hb_vector_t<hb_ot_map_t::stage_map_t, false>::alloc(unsigned int, bool) Line | Count | Source | 351 | 2.80M | { | 352 | 2.80M | if (unlikely (in_error ())) | 353 | 14.2k | return false; | 354 | | | 355 | 2.79M | unsigned int new_allocated; | 356 | 2.79M | if (exact) | 357 | 0 | { | 358 | | /* If exact was specified, we allow shrinking the storage. */ | 359 | 0 | size = hb_max (size, length); | 360 | 0 | if (size <= (unsigned) allocated && | 361 | 0 | size >= (unsigned) allocated >> 2) | 362 | 0 | return true; | 363 | | | 364 | 0 | new_allocated = size; | 365 | 0 | } | 366 | 2.79M | else | 367 | 2.79M | { | 368 | 2.79M | if (likely (size <= (unsigned) allocated)) | 369 | 1.51M | return true; | 370 | | | 371 | 1.27M | new_allocated = allocated; | 372 | 2.55M | while (size > new_allocated) | 373 | 1.27M | new_allocated += (new_allocated >> 1) + 8; | 374 | 1.27M | } | 375 | | | 376 | | | 377 | | /* Reallocate */ | 378 | | | 379 | 1.27M | bool overflows = | 380 | 1.27M | (int) in_error () || | 381 | 1.27M | (new_allocated < size) || | 382 | 1.27M | hb_unsigned_mul_overflows (new_allocated, sizeof (Type)); | 383 | | | 384 | 1.27M | if (unlikely (overflows)) | 385 | 0 | { | 386 | 0 | allocated = -1; | 387 | 0 | return false; | 388 | 0 | } | 389 | | | 390 | 1.27M | Type *new_array = realloc_vector (new_allocated); | 391 | | | 392 | 1.27M | if (unlikely (new_allocated && !new_array)) | 393 | 12.1k | { | 394 | 12.1k | if (new_allocated <= (unsigned) allocated) | 395 | 0 | return true; // shrinking failed; it's okay; happens in our fuzzer | 396 | | | 397 | 12.1k | allocated = -1; | 398 | 12.1k | return false; | 399 | 12.1k | } | 400 | | | 401 | 1.26M | arrayZ = new_array; | 402 | 1.26M | allocated = new_allocated; | 403 | | | 404 | 1.26M | return true; | 405 | 1.27M | } |
|
406 | | |
407 | | bool resize (int size_, bool initialize = true, bool exact = false) |
408 | 100M | { |
409 | 100M | unsigned int size = size_ < 0 ? 0u : (unsigned int) size_; |
410 | 100M | if (!alloc (size, exact)) |
411 | 934k | return false; |
412 | | |
413 | 99.8M | if (size > length) |
414 | 94.7M | { |
415 | 94.7M | if (initialize) |
416 | 92.9M | grow_vector (size); |
417 | 94.7M | } |
418 | 5.11M | else if (size < length) |
419 | 1.32M | { |
420 | 1.32M | if (initialize) |
421 | 1.32M | shrink_vector (size); |
422 | 1.32M | } |
423 | | |
424 | 99.8M | length = size; |
425 | 99.8M | return true; |
426 | 100M | } hb_vector_t<hb_vector_t<hb_aat_map_t::range_flags_t, true>, false>::resize(int, bool, bool) Line | Count | Source | 408 | 272k | { | 409 | 272k | unsigned int size = size_ < 0 ? 0u : (unsigned int) size_; | 410 | 272k | if (!alloc (size, exact)) | 411 | 5.57k | return false; | 412 | | | 413 | 266k | if (size > length) | 414 | 211k | { | 415 | 211k | if (initialize) | 416 | 211k | grow_vector (size); | 417 | 211k | } | 418 | 55.3k | else if (size < length) | 419 | 0 | { | 420 | 0 | if (initialize) | 421 | 0 | shrink_vector (size); | 422 | 0 | } | 423 | | | 424 | 266k | length = size; | 425 | 266k | return true; | 426 | 272k | } |
hb_vector_t<hb_bit_page_t, false>::resize(int, bool, bool) Line | Count | Source | 408 | 10.2M | { | 409 | 10.2M | unsigned int size = size_ < 0 ? 0u : (unsigned int) size_; | 410 | 10.2M | if (!alloc (size, exact)) | 411 | 13.0k | return false; | 412 | | | 413 | 10.2M | if (size > length) | 414 | 10.1M | { | 415 | 10.1M | if (initialize) | 416 | 10.1M | grow_vector (size); | 417 | 10.1M | } | 418 | 147k | else if (size < length) | 419 | 147k | { | 420 | 147k | if (initialize) | 421 | 147k | shrink_vector (size); | 422 | 147k | } | 423 | | | 424 | 10.2M | length = size; | 425 | 10.2M | return true; | 426 | 10.2M | } |
hb_vector_t<hb_bit_set_t::page_map_t, true>::resize(int, bool, bool) Line | Count | Source | 408 | 10.2M | { | 409 | 10.2M | unsigned int size = size_ < 0 ? 0u : (unsigned int) size_; | 410 | 10.2M | if (!alloc (size, exact)) | 411 | 5.31k | return false; | 412 | | | 413 | 10.2M | if (size > length) | 414 | 10.0M | { | 415 | 10.0M | if (initialize) | 416 | 10.0M | grow_vector (size); | 417 | 10.0M | } | 418 | 142k | else if (size < length) | 419 | 142k | { | 420 | 142k | if (initialize) | 421 | 142k | shrink_vector (size); | 422 | 142k | } | 423 | | | 424 | 10.2M | length = size; | 425 | 10.2M | return true; | 426 | 10.2M | } |
hb_vector_t<hb_serialize_context_t::object_t::link_t, false>::resize(int, bool, bool) Line | Count | Source | 408 | 293k | { | 409 | 293k | unsigned int size = size_ < 0 ? 0u : (unsigned int) size_; | 410 | 293k | if (!alloc (size, exact)) | 411 | 1.81k | return false; | 412 | | | 413 | 291k | if (size > length) | 414 | 291k | { | 415 | 291k | if (initialize) | 416 | 291k | grow_vector (size); | 417 | 291k | } | 418 | 0 | else if (size < length) | 419 | 0 | { | 420 | 0 | if (initialize) | 421 | 0 | shrink_vector (size); | 422 | 0 | } | 423 | | | 424 | 291k | length = size; | 425 | 291k | return true; | 426 | 293k | } |
Unexecuted instantiation: hb_vector_t<hb_vector_t<unsigned int, false>, false>::resize(int, bool, bool) hb_vector_t<unsigned int, false>::resize(int, bool, bool) Line | Count | Source | 408 | 322k | { | 409 | 322k | unsigned int size = size_ < 0 ? 0u : (unsigned int) size_; | 410 | 322k | if (!alloc (size, exact)) | 411 | 2.40k | return false; | 412 | | | 413 | 320k | if (size > length) | 414 | 215k | { | 415 | 215k | if (initialize) | 416 | 142k | grow_vector (size); | 417 | 215k | } | 418 | 105k | else if (size < length) | 419 | 717 | { | 420 | 717 | if (initialize) | 421 | 0 | shrink_vector (size); | 422 | 717 | } | 423 | | | 424 | 320k | length = size; | 425 | 320k | return true; | 426 | 322k | } |
Unexecuted instantiation: hb_vector_t<OT::VarData::serialize(hb_serialize_context_t*, OT::VarData const*, hb_inc_bimap_t const&, hb_bimap_t const&)::delta_size_t, false>::resize(int, bool, bool) Unexecuted instantiation: hb_vector_t<hb_inc_bimap_t, false>::resize(int, bool, bool) Unexecuted instantiation: hb_vector_t<hb_set_t, false>::resize(int, bool, bool) Unexecuted instantiation: hb_vector_t<unsigned int, true>::resize(int, bool, bool) hb_vector_t<OT::hb_accelerate_subtables_context_t::hb_applicable_t, false>::resize(int, bool, bool) Line | Count | Source | 408 | 2.91M | { | 409 | 2.91M | unsigned int size = size_ < 0 ? 0u : (unsigned int) size_; | 410 | 2.91M | if (!alloc (size, exact)) | 411 | 115k | return false; | 412 | | | 413 | 2.79M | if (size > length) | 414 | 2.79M | { | 415 | 2.79M | if (initialize) | 416 | 2.79M | grow_vector (size); | 417 | 2.79M | } | 418 | 0 | else if (size < length) | 419 | 0 | { | 420 | 0 | if (initialize) | 421 | 0 | shrink_vector (size); | 422 | 0 | } | 423 | | | 424 | 2.79M | length = size; | 425 | 2.79M | return true; | 426 | 2.91M | } |
Unexecuted instantiation: hb_vector_t<hb_aat_map_builder_t::feature_range_t, true>::resize(int, bool, bool) hb_vector_t<hb_aat_map_builder_t::feature_event_t, false>::resize(int, bool, bool) Line | Count | Source | 408 | 278k | { | 409 | 278k | unsigned int size = size_ < 0 ? 0u : (unsigned int) size_; | 410 | 278k | if (!alloc (size, exact)) | 411 | 6.35k | return false; | 412 | | | 413 | 272k | if (size > length) | 414 | 272k | { | 415 | 272k | if (initialize) | 416 | 272k | grow_vector (size); | 417 | 272k | } | 418 | 0 | else if (size < length) | 419 | 0 | { | 420 | 0 | if (initialize) | 421 | 0 | shrink_vector (size); | 422 | 0 | } | 423 | | | 424 | 272k | length = size; | 425 | 272k | return true; | 426 | 278k | } |
hb_vector_t<hb_aat_map_builder_t::feature_info_t, true>::resize(int, bool, bool) Line | Count | Source | 408 | 272k | { | 409 | 272k | unsigned int size = size_ < 0 ? 0u : (unsigned int) size_; | 410 | 272k | if (!alloc (size, exact)) | 411 | 0 | return false; | 412 | | | 413 | 272k | if (size > length) | 414 | 0 | { | 415 | 0 | if (initialize) | 416 | 0 | grow_vector (size); | 417 | 0 | } | 418 | 272k | else if (size < length) | 419 | 0 | { | 420 | 0 | if (initialize) | 421 | 0 | shrink_vector (size); | 422 | 0 | } | 423 | | | 424 | 272k | length = size; | 425 | 272k | return true; | 426 | 272k | } |
Unexecuted instantiation: hb_vector_t<OT::LayerRecord, false>::resize(int, bool, bool) Unexecuted instantiation: hb_vector_t<OT::index_map_subset_plan_t, false>::resize(int, bool, bool) Unexecuted instantiation: hb_vector_t<hb_set_t*, false>::resize(int, bool, bool) hb_vector_t<OT::contour_point_t, false>::resize(int, bool, bool) Line | Count | Source | 408 | 8.75M | { | 409 | 8.75M | unsigned int size = size_ < 0 ? 0u : (unsigned int) size_; | 410 | 8.75M | if (!alloc (size, exact)) | 411 | 28.3k | return false; | 412 | | | 413 | 8.72M | if (size > length) | 414 | 4.76M | { | 415 | 4.76M | if (initialize) | 416 | 3.20M | grow_vector (size); | 417 | 4.76M | } | 418 | 3.96M | else if (size < length) | 419 | 995k | { | 420 | 995k | if (initialize) | 421 | 995k | shrink_vector (size); | 422 | 995k | } | 423 | | | 424 | 8.72M | length = size; | 425 | 8.72M | return true; | 426 | 8.75M | } |
hb_vector_t<int, false>::resize(int, bool, bool) Line | Count | Source | 408 | 886k | { | 409 | 886k | unsigned int size = size_ < 0 ? 0u : (unsigned int) size_; | 410 | 886k | if (!alloc (size, exact)) | 411 | 31.6k | return false; | 412 | | | 413 | 854k | if (size > length) | 414 | 835k | { | 415 | 835k | if (initialize) | 416 | 670k | grow_vector (size); | 417 | 835k | } | 418 | 18.7k | else if (size < length) | 419 | 1.72k | { | 420 | 1.72k | if (initialize) | 421 | 0 | shrink_vector (size); | 422 | 1.72k | } | 423 | | | 424 | 854k | length = size; | 425 | 854k | return true; | 426 | 886k | } |
Unexecuted instantiation: hb_vector_t<OT::glyf_impl::SubsetGlyph, false>::resize(int, bool, bool) Unexecuted instantiation: hb_vector_t<OT::IndexSubtableRecord, false>::resize(int, bool, bool) Unexecuted instantiation: hb_vector_t<hb_array_t<unsigned char const>, false>::resize(int, bool, bool) hb_vector_t<CFF::cff1_private_dict_values_base_t<CFF::dict_val_t>, false>::resize(int, bool, bool) Line | Count | Source | 408 | 32.8k | { | 409 | 32.8k | unsigned int size = size_ < 0 ? 0u : (unsigned int) size_; | 410 | 32.8k | if (!alloc (size, exact)) | 411 | 28 | return false; | 412 | | | 413 | 32.7k | if (size > length) | 414 | 32.5k | { | 415 | 32.5k | if (initialize) | 416 | 32.5k | grow_vector (size); | 417 | 32.5k | } | 418 | 237 | else if (size < length) | 419 | 0 | { | 420 | 0 | if (initialize) | 421 | 0 | shrink_vector (size); | 422 | 0 | } | 423 | | | 424 | 32.7k | length = size; | 425 | 32.7k | return true; | 426 | 32.8k | } |
hb_vector_t<CFF::cff1_font_dict_values_t, false>::resize(int, bool, bool) Line | Count | Source | 408 | 122k | { | 409 | 122k | unsigned int size = size_ < 0 ? 0u : (unsigned int) size_; | 410 | 122k | if (!alloc (size, exact)) | 411 | 24 | return false; | 412 | | | 413 | 122k | if (size > length) | 414 | 122k | { | 415 | 122k | if (initialize) | 416 | 122k | grow_vector (size); | 417 | 122k | } | 418 | 0 | else if (size < length) | 419 | 0 | { | 420 | 0 | if (initialize) | 421 | 0 | shrink_vector (size); | 422 | 0 | } | 423 | | | 424 | 122k | length = size; | 425 | 122k | return true; | 426 | 122k | } |
hb_vector_t<CFF::cff2_private_dict_values_base_t<CFF::dict_val_t>, false>::resize(int, bool, bool) Line | Count | Source | 408 | 29.3k | { | 409 | 29.3k | unsigned int size = size_ < 0 ? 0u : (unsigned int) size_; | 410 | 29.3k | if (!alloc (size, exact)) | 411 | 83 | return false; | 412 | | | 413 | 29.2k | if (size > length) | 414 | 21.3k | { | 415 | 21.3k | if (initialize) | 416 | 21.3k | grow_vector (size); | 417 | 21.3k | } | 418 | 7.94k | else if (size < length) | 419 | 0 | { | 420 | 0 | if (initialize) | 421 | 0 | shrink_vector (size); | 422 | 0 | } | 423 | | | 424 | 29.2k | length = size; | 425 | 29.2k | return true; | 426 | 29.3k | } |
hb_vector_t<CFF::cff2_font_dict_values_t, false>::resize(int, bool, bool) Line | Count | Source | 408 | 1.02M | { | 409 | 1.02M | unsigned int size = size_ < 0 ? 0u : (unsigned int) size_; | 410 | 1.02M | if (!alloc (size, exact)) | 411 | 127 | return false; | 412 | | | 413 | 1.02M | if (size > length) | 414 | 1.02M | { | 415 | 1.02M | if (initialize) | 416 | 1.02M | grow_vector (size); | 417 | 1.02M | } | 418 | 0 | else if (size < length) | 419 | 0 | { | 420 | 0 | if (initialize) | 421 | 0 | shrink_vector (size); | 422 | 0 | } | 423 | | | 424 | 1.02M | length = size; | 425 | 1.02M | return true; | 426 | 1.02M | } |
hb_vector_t<hb_ot_name_entry_t, false>::resize(int, bool, bool) Line | Count | Source | 408 | 6.82M | { | 409 | 6.82M | unsigned int size = size_ < 0 ? 0u : (unsigned int) size_; | 410 | 6.82M | if (!alloc (size, exact)) | 411 | 18.3k | return false; | 412 | | | 413 | 6.80M | if (size > length) | 414 | 6.40M | { | 415 | 6.40M | if (initialize) | 416 | 6.40M | grow_vector (size); | 417 | 6.40M | } | 418 | 399k | else if (size < length) | 419 | 35.6k | { | 420 | 35.6k | if (initialize) | 421 | 35.6k | shrink_vector (size); | 422 | 35.6k | } | 423 | | | 424 | 6.80M | length = size; | 425 | 6.80M | return true; | 426 | 6.82M | } |
hb_vector_t<char, false>::resize(int, bool, bool) Line | Count | Source | 408 | 10.4k | { | 409 | 10.4k | unsigned int size = size_ < 0 ? 0u : (unsigned int) size_; | 410 | 10.4k | if (!alloc (size, exact)) | 411 | 551 | return false; | 412 | | | 413 | 9.86k | if (size > length) | 414 | 9.86k | { | 415 | 9.86k | if (initialize) | 416 | 9.86k | grow_vector (size); | 417 | 9.86k | } | 418 | 0 | else if (size < length) | 419 | 0 | { | 420 | 0 | if (initialize) | 421 | 0 | shrink_vector (size); | 422 | 0 | } | 423 | | | 424 | 9.86k | length = size; | 425 | 9.86k | return true; | 426 | 10.4k | } |
hb_vector_t<float, false>::resize(int, bool, bool) Line | Count | Source | 408 | 1.44k | { | 409 | 1.44k | unsigned int size = size_ < 0 ? 0u : (unsigned int) size_; | 410 | 1.44k | if (!alloc (size, exact)) | 411 | 50 | return false; | 412 | | | 413 | 1.39k | if (size > length) | 414 | 998 | { | 415 | 998 | if (initialize) | 416 | 998 | grow_vector (size); | 417 | 998 | } | 418 | 392 | else if (size < length) | 419 | 0 | { | 420 | 0 | if (initialize) | 421 | 0 | shrink_vector (size); | 422 | 0 | } | 423 | | | 424 | 1.39k | length = size; | 425 | 1.39k | return true; | 426 | 1.44k | } |
Unexecuted instantiation: hb_vector_t<CFF::number_t, false>::resize(int, bool, bool) hb_vector_t<hb_ot_map_builder_t::feature_info_t, false>::resize(int, bool, bool) Line | Count | Source | 408 | 17.3M | { | 409 | 17.3M | unsigned int size = size_ < 0 ? 0u : (unsigned int) size_; | 410 | 17.3M | if (!alloc (size, exact)) | 411 | 330k | return false; | 412 | | | 413 | 16.9M | if (size > length) | 414 | 16.9M | { | 415 | 16.9M | if (initialize) | 416 | 16.9M | grow_vector (size); | 417 | 16.9M | } | 418 | 0 | else if (size < length) | 419 | 0 | { | 420 | 0 | if (initialize) | 421 | 0 | shrink_vector (size); | 422 | 0 | } | 423 | | | 424 | 16.9M | length = size; | 425 | 16.9M | return true; | 426 | 17.3M | } |
hb_vector_t<hb_ot_map_t::lookup_map_t, false>::resize(int, bool, bool) Line | Count | Source | 408 | 33.7M | { | 409 | 33.7M | unsigned int size = size_ < 0 ? 0u : (unsigned int) size_; | 410 | 33.7M | if (!alloc (size, exact)) | 411 | 310k | return false; | 412 | | | 413 | 33.4M | if (size > length) | 414 | 33.4M | { | 415 | 33.4M | if (initialize) | 416 | 33.4M | grow_vector (size); | 417 | 33.4M | } | 418 | 0 | else if (size < length) | 419 | 0 | { | 420 | 0 | if (initialize) | 421 | 0 | shrink_vector (size); | 422 | 0 | } | 423 | | | 424 | 33.4M | length = size; | 425 | 33.4M | return true; | 426 | 33.7M | } |
hb_vector_t<hb_ot_map_builder_t::stage_info_t, false>::resize(int, bool, bool) Line | Count | Source | 408 | 2.83M | { | 409 | 2.83M | unsigned int size = size_ < 0 ? 0u : (unsigned int) size_; | 410 | 2.83M | if (!alloc (size, exact)) | 411 | 27.1k | return false; | 412 | | | 413 | 2.80M | if (size > length) | 414 | 2.80M | { | 415 | 2.80M | if (initialize) | 416 | 2.80M | grow_vector (size); | 417 | 2.80M | } | 418 | 0 | else if (size < length) | 419 | 0 | { | 420 | 0 | if (initialize) | 421 | 0 | shrink_vector (size); | 422 | 0 | } | 423 | | | 424 | 2.80M | length = size; | 425 | 2.80M | return true; | 426 | 2.83M | } |
hb_vector_t<hb_ot_map_t::feature_map_t, true>::resize(int, bool, bool) Line | Count | Source | 408 | 1.48M | { | 409 | 1.48M | unsigned int size = size_ < 0 ? 0u : (unsigned int) size_; | 410 | 1.48M | if (!alloc (size, exact)) | 411 | 10.7k | return false; | 412 | | | 413 | 1.47M | if (size > length) | 414 | 1.47M | { | 415 | 1.47M | if (initialize) | 416 | 1.47M | grow_vector (size); | 417 | 1.47M | } | 418 | 0 | else if (size < length) | 419 | 0 | { | 420 | 0 | if (initialize) | 421 | 0 | shrink_vector (size); | 422 | 0 | } | 423 | | | 424 | 1.47M | length = size; | 425 | 1.47M | return true; | 426 | 1.48M | } |
hb_vector_t<hb_ot_map_t::stage_map_t, false>::resize(int, bool, bool) Line | Count | Source | 408 | 2.80M | { | 409 | 2.80M | unsigned int size = size_ < 0 ? 0u : (unsigned int) size_; | 410 | 2.80M | if (!alloc (size, exact)) | 411 | 26.4k | return false; | 412 | | | 413 | 2.77M | if (size > length) | 414 | 2.77M | { | 415 | 2.77M | if (initialize) | 416 | 2.77M | grow_vector (size); | 417 | 2.77M | } | 418 | 0 | else if (size < length) | 419 | 0 | { | 420 | 0 | if (initialize) | 421 | 0 | shrink_vector (size); | 422 | 0 | } | 423 | | | 424 | 2.77M | length = size; | 425 | 2.77M | return true; | 426 | 2.80M | } |
|
427 | | bool resize_exact (int size_, bool initialize = true) |
428 | 143k | { |
429 | 143k | return resize (size_, initialize, true); |
430 | 143k | } hb_vector_t<unsigned int, false>::resize_exact(int, bool) Line | Count | Source | 428 | 142k | { | 429 | 142k | return resize (size_, initialize, true); | 430 | 142k | } |
hb_vector_t<float, false>::resize_exact(int, bool) Line | Count | Source | 428 | 1.44k | { | 429 | 1.44k | return resize (size_, initialize, true); | 430 | 1.44k | } |
Unexecuted instantiation: hb_vector_t<CFF::number_t, false>::resize_exact(int, bool) |
431 | | |
432 | | Type pop () |
433 | 57.0M | { |
434 | 57.0M | if (!length) return Null (Type); |
435 | 53.1M | Type v {std::move (arrayZ[length - 1])}; |
436 | 53.1M | arrayZ[length - 1].~Type (); |
437 | 53.1M | length--; |
438 | 53.1M | return v; |
439 | 57.0M | } hb_vector_t<hb_user_data_array_t::hb_user_data_item_t, false>::pop() Line | Count | Source | 433 | 397k | { | 434 | 397k | if (!length) return Null (Type); | 435 | 397k | Type v {std::move (arrayZ[length - 1])}; | 436 | 397k | arrayZ[length - 1].~Type (); | 437 | 397k | length--; | 438 | 397k | return v; | 439 | 397k | } |
Unexecuted instantiation: hb_vector_t<hb_serialize_context_t::object_t*, false>::pop() Unexecuted instantiation: hb_vector_t<hb_set_t, false>::pop() hb_vector_t<hb_transform_t, false>::pop() Line | Count | Source | 433 | 5.94M | { | 434 | 5.94M | if (!length) return Null (Type); | 435 | 5.73M | Type v {std::move (arrayZ[length - 1])}; | 436 | 5.73M | arrayZ[length - 1].~Type (); | 437 | 5.73M | length--; | 438 | 5.73M | return v; | 439 | 5.94M | } |
hb_vector_t<hb_bounds_t, false>::pop() Line | Count | Source | 433 | 50.6M | { | 434 | 50.6M | if (!length) return Null (Type); | 435 | 46.9M | Type v {std::move (arrayZ[length - 1])}; | 436 | 46.9M | arrayZ[length - 1].~Type (); | 437 | 46.9M | length--; | 438 | 46.9M | return v; | 439 | 50.6M | } |
|
440 | | |
441 | | void remove_ordered (unsigned int i) |
442 | 0 | { |
443 | 0 | if (unlikely (i >= length)) |
444 | 0 | return; |
445 | 0 | shift_down_vector (i + 1); |
446 | 0 | arrayZ[length - 1].~Type (); |
447 | 0 | length--; |
448 | 0 | } |
449 | | |
450 | | template <bool Sorted = sorted, |
451 | | hb_enable_if (!Sorted)> |
452 | | void remove_unordered (unsigned int i) |
453 | | { |
454 | | if (unlikely (i >= length)) |
455 | | return; |
456 | | if (i != length - 1) |
457 | | arrayZ[i] = std::move (arrayZ[length - 1]); |
458 | | arrayZ[length - 1].~Type (); |
459 | | length--; |
460 | | } |
461 | | |
462 | | void shrink (int size_) |
463 | 825k | { |
464 | 825k | unsigned int size = size_ < 0 ? 0u : (unsigned int) size_; |
465 | 825k | if (size >= length) |
466 | 609k | return; |
467 | | |
468 | 215k | shrink_vector (size); |
469 | | |
470 | 215k | alloc (size, true); /* To force shrinking memory if needed. */ |
471 | 215k | } Unexecuted instantiation: hb_vector_t<hb_serialize_context_t::object_t::link_t, false>::shrink(int) Unexecuted instantiation: hb_vector_t<hb_aat_map_builder_t::feature_info_t, true>::shrink(int) Unexecuted instantiation: hb_vector_t<char, false>::shrink(int) Unexecuted instantiation: hb_vector_t<CFF::number_t, false>::shrink(int) hb_vector_t<hb_ot_map_builder_t::feature_info_t, false>::shrink(int) Line | Count | Source | 463 | 599k | { | 464 | 599k | unsigned int size = size_ < 0 ? 0u : (unsigned int) size_; | 465 | 599k | if (size >= length) | 466 | 513k | return; | 467 | | | 468 | 86.6k | shrink_vector (size); | 469 | | | 470 | 86.6k | alloc (size, true); /* To force shrinking memory if needed. */ | 471 | 86.6k | } |
hb_vector_t<hb_ot_map_t::lookup_map_t, false>::shrink(int) Line | Count | Source | 463 | 225k | { | 464 | 225k | unsigned int size = size_ < 0 ? 0u : (unsigned int) size_; | 465 | 225k | if (size >= length) | 466 | 96.4k | return; | 467 | | | 468 | 129k | shrink_vector (size); | 469 | | | 470 | 129k | alloc (size, true); /* To force shrinking memory if needed. */ | 471 | 129k | } |
|
472 | | |
473 | | |
474 | | /* Sorting API. */ |
475 | | void qsort (int (*cmp)(const void*, const void*) = Type::cmp) |
476 | 1.30M | { as_array ().qsort (cmp); }Unexecuted instantiation: hb_vector_t<unsigned int, false>::qsort(int (*)(void const*, void const*)) hb_vector_t<hb_aat_map_builder_t::feature_event_t, false>::qsort(int (*)(void const*, void const*)) Line | Count | Source | 476 | 278k | { as_array ().qsort (cmp); } |
Unexecuted instantiation: hb_vector_t<hb_aat_map_builder_t::feature_info_t, true>::qsort(int (*)(void const*, void const*)) hb_vector_t<OT::cff1::accelerator_t::gname_t, true>::qsort(int (*)(void const*, void const*)) Line | Count | Source | 476 | 22.4k | { as_array ().qsort (cmp); } |
hb_vector_t<hb_ot_name_entry_t, false>::qsort(int (*)(void const*, void const*)) Line | Count | Source | 476 | 399k | { as_array ().qsort (cmp); } |
hb_vector_t<hb_ot_map_builder_t::feature_info_t, false>::qsort(int (*)(void const*, void const*)) Line | Count | Source | 476 | 599k | { as_array ().qsort (cmp); } |
|
477 | | |
478 | | /* Unsorted search API. */ |
479 | | template <typename T> |
480 | | Type *lsearch (const T &x, Type *not_found = nullptr) |
481 | 1.46M | { return as_array ().lsearch (x, not_found); }hb_user_data_array_t::hb_user_data_item_t* hb_vector_t<hb_user_data_array_t::hb_user_data_item_t, false>::lsearch<hb_user_data_key_t*>(hb_user_data_key_t* const&, hb_user_data_array_t::hb_user_data_item_t*) Line | Count | Source | 481 | 784k | { return as_array ().lsearch (x, not_found); } |
hb_user_data_array_t::hb_user_data_item_t* hb_vector_t<hb_user_data_array_t::hb_user_data_item_t, false>::lsearch<hb_user_data_array_t::hb_user_data_item_t>(hb_user_data_array_t::hb_user_data_item_t const&, hb_user_data_array_t::hb_user_data_item_t*) Line | Count | Source | 481 | 411k | { return as_array ().lsearch (x, not_found); } |
hb_aat_map_builder_t::feature_info_t* hb_vector_t<hb_aat_map_builder_t::feature_info_t, true>::lsearch<hb_aat_map_builder_t::feature_info_t>(hb_aat_map_builder_t::feature_info_t const&, hb_aat_map_builder_t::feature_info_t*) Line | Count | Source | 481 | 272k | { return as_array ().lsearch (x, not_found); } |
|
482 | | template <typename T> |
483 | | const Type *lsearch (const T &x, const Type *not_found = nullptr) const |
484 | | { return as_array ().lsearch (x, not_found); } |
485 | | template <typename T> |
486 | | bool lfind (const T &x, unsigned *pos = nullptr) const |
487 | | { return as_array ().lfind (x, pos); } |
488 | | |
489 | | /* Sorted search API. */ |
490 | | template <typename T, |
491 | | bool Sorted=sorted, hb_enable_if (Sorted)> |
492 | | Type *bsearch (const T &x, Type *not_found = nullptr) |
493 | 22.4k | { return as_array ().bsearch (x, not_found); } |
494 | | template <typename T, |
495 | | bool Sorted=sorted, hb_enable_if (Sorted)> |
496 | | const Type *bsearch (const T &x, const Type *not_found = nullptr) const |
497 | 10.8M | { return as_array ().bsearch (x, not_found); }hb_aat_map_builder_t::feature_info_t const* hb_vector_t<hb_aat_map_builder_t::feature_info_t, true>::bsearch<hb_aat_map_builder_t::feature_info_t, true, (void*)0>(hb_aat_map_builder_t::feature_info_t const&, hb_aat_map_builder_t::feature_info_t const*) const Line | Count | Source | 497 | 4.37M | { return as_array ().bsearch (x, not_found); } |
hb_ot_map_t::feature_map_t const* hb_vector_t<hb_ot_map_t::feature_map_t, true>::bsearch<unsigned int, true, (void*)0>(unsigned int const&, hb_ot_map_t::feature_map_t const*) const Line | Count | Source | 497 | 6.43M | { return as_array ().bsearch (x, not_found); } |
|
498 | | template <typename T, |
499 | | bool Sorted=sorted, hb_enable_if (Sorted)> |
500 | | bool bfind (const T &x, unsigned int *i = nullptr, |
501 | | hb_not_found_t not_found = HB_NOT_FOUND_DONT_STORE, |
502 | | unsigned int to_store = (unsigned int) -1) const |
503 | 13.0M | { return as_array ().bfind (x, i, not_found, to_store); }Unexecuted instantiation: bool hb_vector_t<hb_bit_set_t::page_map_t, true>::bfind<unsigned int, true, (void*)0>(unsigned int const&, unsigned int*, hb_not_found_t, unsigned int) const bool hb_vector_t<hb_bit_set_t::page_map_t, true>::bfind<hb_bit_set_t::page_map_t, true, (void*)0>(hb_bit_set_t::page_map_t const&, unsigned int*, hb_not_found_t, unsigned int) const Line | Count | Source | 503 | 13.0M | { return as_array ().bfind (x, i, not_found, to_store); } |
|
504 | | }; |
505 | | |
506 | | template <typename Type> |
507 | | using hb_sorted_vector_t = hb_vector_t<Type, true>; |
508 | | |
509 | | #endif /* HB_VECTOR_HH */ |