Coverage Report

Created: 2025-12-03 07:00

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/mupdf/thirdparty/harfbuzz/src/hb-bit-page.hh
Line
Count
Source
1
/*
2
 * Copyright © 2012,2017  Google, Inc.
3
 * Copyright © 2021 Behdad Esfahbod
4
 *
5
 *  This is part of HarfBuzz, a text shaping library.
6
 *
7
 * Permission is hereby granted, without written agreement and without
8
 * license or royalty fees, to use, copy, modify, and distribute this
9
 * software and its documentation for any purpose, provided that the
10
 * above copyright notice and the following two paragraphs appear in
11
 * all copies of this software.
12
 *
13
 * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
14
 * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
15
 * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
16
 * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
17
 * DAMAGE.
18
 *
19
 * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
20
 * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
21
 * FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
22
 * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
23
 * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
24
 *
25
 * Google Author(s): Behdad Esfahbod
26
 */
27
28
#ifndef HB_BIT_PAGE_HH
29
#define HB_BIT_PAGE_HH
30
31
#include "hb.hh"
32
33
34
/* Compiler-assisted vectorization. */
35
36
/* Type behaving similar to vectorized vars defined using __attribute__((vector_size(...))),
37
 * basically a fixed-size bitset. */
38
template <typename elt_t, unsigned int byte_size>
39
struct hb_vector_size_t
40
{
41
0
  elt_t& operator [] (unsigned int i) { return v[i]; }
42
0
  const elt_t& operator [] (unsigned int i) const { return v[i]; }
43
44
0
  void clear (unsigned char v = 0) { hb_memset (this, v, sizeof (*this)); }
45
46
  template <typename Op>
47
  hb_vector_size_t process (const Op& op) const
48
0
  {
49
0
    hb_vector_size_t r;
50
0
    for (unsigned int i = 0; i < ARRAY_LENGTH (v); i++)
51
0
      r.v[i] = op (v[i]);
52
0
    return r;
53
0
  }
Unexecuted instantiation: hb-buffer.cc:hb_vector_size_t<unsigned long long, 64u> hb_vector_size_t<unsigned long long, 64u>::process<$_22>($_22 const&) const
Unexecuted instantiation: hb-font.cc:hb_vector_size_t<unsigned long long, 64u> hb_vector_size_t<unsigned long long, 64u>::process<$_23>($_23 const&) const
Unexecuted instantiation: hb-ft.cc:hb_vector_size_t<unsigned long long, 64u> hb_vector_size_t<unsigned long long, 64u>::process<$_22>($_22 const&) const
Unexecuted instantiation: hb-ot-font.cc:hb_vector_size_t<unsigned long long, 64u> hb_vector_size_t<unsigned long long, 64u>::process<$_21>($_21 const&) const
Unexecuted instantiation: hb-ot-metrics.cc:hb_vector_size_t<unsigned long long, 64u> hb_vector_size_t<unsigned long long, 64u>::process<$_23>($_23 const&) const
Unexecuted instantiation: hb-ot-shape.cc:hb_vector_size_t<unsigned long long, 64u> hb_vector_size_t<unsigned long long, 64u>::process<$_22>($_22 const&) const
Unexecuted instantiation: hb-ot-shape-fallback.cc:hb_vector_size_t<unsigned long long, 64u> hb_vector_size_t<unsigned long long, 64u>::process<$_24>($_24 const&) const
Unexecuted instantiation: hb-ot-shape-normalize.cc:hb_vector_size_t<unsigned long long, 64u> hb_vector_size_t<unsigned long long, 64u>::process<$_22>($_22 const&) const
Unexecuted instantiation: hb-ot-shaper-arabic.cc:hb_vector_size_t<unsigned long long, 64u> hb_vector_size_t<unsigned long long, 64u>::process<$_24>($_24 const&) const
Unexecuted instantiation: hb-ot-shaper-default.cc:hb_vector_size_t<unsigned long long, 64u> hb_vector_size_t<unsigned long long, 64u>::process<$_22>($_22 const&) const
Unexecuted instantiation: hb-ot-shaper-hangul.cc:hb_vector_size_t<unsigned long long, 64u> hb_vector_size_t<unsigned long long, 64u>::process<$_22>($_22 const&) const
Unexecuted instantiation: hb-ot-shaper-hebrew.cc:hb_vector_size_t<unsigned long long, 64u> hb_vector_size_t<unsigned long long, 64u>::process<$_22>($_22 const&) const
Unexecuted instantiation: hb-ot-shaper-indic.cc:hb_vector_size_t<unsigned long long, 64u> hb_vector_size_t<unsigned long long, 64u>::process<$_22>($_22 const&) const
Unexecuted instantiation: hb-ot-shaper-indic-table.cc:hb_vector_size_t<unsigned long long, 64u> hb_vector_size_t<unsigned long long, 64u>::process<$_22>($_22 const&) const
Unexecuted instantiation: hb-ot-shaper-khmer.cc:hb_vector_size_t<unsigned long long, 64u> hb_vector_size_t<unsigned long long, 64u>::process<$_22>($_22 const&) const
Unexecuted instantiation: hb-ot-shaper-myanmar.cc:hb_vector_size_t<unsigned long long, 64u> hb_vector_size_t<unsigned long long, 64u>::process<$_22>($_22 const&) const
Unexecuted instantiation: hb-ot-shaper-syllabic.cc:hb_vector_size_t<unsigned long long, 64u> hb_vector_size_t<unsigned long long, 64u>::process<$_22>($_22 const&) const
Unexecuted instantiation: hb-ot-shaper-thai.cc:hb_vector_size_t<unsigned long long, 64u> hb_vector_size_t<unsigned long long, 64u>::process<$_22>($_22 const&) const
Unexecuted instantiation: hb-ot-shaper-use.cc:hb_vector_size_t<unsigned long long, 64u> hb_vector_size_t<unsigned long long, 64u>::process<$_22>($_22 const&) const
Unexecuted instantiation: hb-ot-shaper-vowel-constraints.cc:hb_vector_size_t<unsigned long long, 64u> hb_vector_size_t<unsigned long long, 64u>::process<$_22>($_22 const&) const
Unexecuted instantiation: hb-ot-var.cc:hb_vector_size_t<unsigned long long, 64u> hb_vector_size_t<unsigned long long, 64u>::process<$_23>($_23 const&) const
Unexecuted instantiation: hb-set.cc:hb_vector_size_t<unsigned long long, 64u> hb_vector_size_t<unsigned long long, 64u>::process<$_22>($_22 const&) const
Unexecuted instantiation: hb-static.cc:hb_vector_size_t<unsigned long long, 64u> hb_vector_size_t<unsigned long long, 64u>::process<$_21>($_21 const&) const
Unexecuted instantiation: hb-aat-layout.cc:hb_vector_size_t<unsigned long long, 64u> hb_vector_size_t<unsigned long long, 64u>::process<$_24>($_24 const&) const
Unexecuted instantiation: hb-aat-map.cc:hb_vector_size_t<unsigned long long, 64u> hb_vector_size_t<unsigned long long, 64u>::process<$_22>($_22 const&) const
Unexecuted instantiation: hb-face.cc:hb_vector_size_t<unsigned long long, 64u> hb_vector_size_t<unsigned long long, 64u>::process<$_22>($_22 const&) const
Unexecuted instantiation: hb-ot-cff1-table.cc:hb_vector_size_t<unsigned long long, 64u> hb_vector_size_t<unsigned long long, 64u>::process<$_23>($_23 const&) const
Unexecuted instantiation: hb-ot-cff2-table.cc:hb_vector_size_t<unsigned long long, 64u> hb_vector_size_t<unsigned long long, 64u>::process<$_23>($_23 const&) const
Unexecuted instantiation: hb-ot-face.cc:hb_vector_size_t<unsigned long long, 64u> hb_vector_size_t<unsigned long long, 64u>::process<$_22>($_22 const&) const
Unexecuted instantiation: hb-ot-layout.cc:hb_vector_size_t<unsigned long long, 64u> hb_vector_size_t<unsigned long long, 64u>::process<$_24>($_24 const&) const
Unexecuted instantiation: hb-ot-map.cc:hb_vector_size_t<unsigned long long, 64u> hb_vector_size_t<unsigned long long, 64u>::process<$_22>($_22 const&) const
54
  template <typename Op>
55
  hb_vector_size_t process (const Op& op, const hb_vector_size_t &o) const
56
0
  {
57
0
    hb_vector_size_t r;
58
0
    for (unsigned int i = 0; i < ARRAY_LENGTH (v); i++)
59
0
      r.v[i] = op (v[i], o.v[i]);
60
0
    return r;
61
0
  }
Unexecuted instantiation: hb-buffer.cc:hb_vector_size_t<unsigned long long, 64u> hb_vector_size_t<unsigned long long, 64u>::process<$_19>($_19 const&, hb_vector_size_t<unsigned long long, 64u> const&) const
Unexecuted instantiation: hb-buffer.cc:hb_vector_size_t<unsigned long long, 64u> hb_vector_size_t<unsigned long long, 64u>::process<$_20>($_20 const&, hb_vector_size_t<unsigned long long, 64u> const&) const
Unexecuted instantiation: hb-buffer.cc:hb_vector_size_t<unsigned long long, 64u> hb_vector_size_t<unsigned long long, 64u>::process<$_23>($_23 const&, hb_vector_size_t<unsigned long long, 64u> const&) const
Unexecuted instantiation: hb-font.cc:hb_vector_size_t<unsigned long long, 64u> hb_vector_size_t<unsigned long long, 64u>::process<$_20>($_20 const&, hb_vector_size_t<unsigned long long, 64u> const&) const
Unexecuted instantiation: hb-font.cc:hb_vector_size_t<unsigned long long, 64u> hb_vector_size_t<unsigned long long, 64u>::process<$_21>($_21 const&, hb_vector_size_t<unsigned long long, 64u> const&) const
Unexecuted instantiation: hb-font.cc:hb_vector_size_t<unsigned long long, 64u> hb_vector_size_t<unsigned long long, 64u>::process<$_24>($_24 const&, hb_vector_size_t<unsigned long long, 64u> const&) const
Unexecuted instantiation: hb-ft.cc:hb_vector_size_t<unsigned long long, 64u> hb_vector_size_t<unsigned long long, 64u>::process<$_19>($_19 const&, hb_vector_size_t<unsigned long long, 64u> const&) const
Unexecuted instantiation: hb-ft.cc:hb_vector_size_t<unsigned long long, 64u> hb_vector_size_t<unsigned long long, 64u>::process<$_20>($_20 const&, hb_vector_size_t<unsigned long long, 64u> const&) const
Unexecuted instantiation: hb-ft.cc:hb_vector_size_t<unsigned long long, 64u> hb_vector_size_t<unsigned long long, 64u>::process<$_23>($_23 const&, hb_vector_size_t<unsigned long long, 64u> const&) const
Unexecuted instantiation: hb-ot-font.cc:hb_vector_size_t<unsigned long long, 64u> hb_vector_size_t<unsigned long long, 64u>::process<$_18>($_18 const&, hb_vector_size_t<unsigned long long, 64u> const&) const
Unexecuted instantiation: hb-ot-font.cc:hb_vector_size_t<unsigned long long, 64u> hb_vector_size_t<unsigned long long, 64u>::process<$_19>($_19 const&, hb_vector_size_t<unsigned long long, 64u> const&) const
Unexecuted instantiation: hb-ot-font.cc:hb_vector_size_t<unsigned long long, 64u> hb_vector_size_t<unsigned long long, 64u>::process<$_22>($_22 const&, hb_vector_size_t<unsigned long long, 64u> const&) const
Unexecuted instantiation: hb-ot-metrics.cc:hb_vector_size_t<unsigned long long, 64u> hb_vector_size_t<unsigned long long, 64u>::process<$_20>($_20 const&, hb_vector_size_t<unsigned long long, 64u> const&) const
Unexecuted instantiation: hb-ot-metrics.cc:hb_vector_size_t<unsigned long long, 64u> hb_vector_size_t<unsigned long long, 64u>::process<$_21>($_21 const&, hb_vector_size_t<unsigned long long, 64u> const&) const
Unexecuted instantiation: hb-ot-metrics.cc:hb_vector_size_t<unsigned long long, 64u> hb_vector_size_t<unsigned long long, 64u>::process<$_24>($_24 const&, hb_vector_size_t<unsigned long long, 64u> const&) const
Unexecuted instantiation: hb-ot-shape.cc:hb_vector_size_t<unsigned long long, 64u> hb_vector_size_t<unsigned long long, 64u>::process<$_19>($_19 const&, hb_vector_size_t<unsigned long long, 64u> const&) const
Unexecuted instantiation: hb-ot-shape.cc:hb_vector_size_t<unsigned long long, 64u> hb_vector_size_t<unsigned long long, 64u>::process<$_20>($_20 const&, hb_vector_size_t<unsigned long long, 64u> const&) const
Unexecuted instantiation: hb-ot-shape.cc:hb_vector_size_t<unsigned long long, 64u> hb_vector_size_t<unsigned long long, 64u>::process<$_23>($_23 const&, hb_vector_size_t<unsigned long long, 64u> const&) const
Unexecuted instantiation: hb-ot-shape-fallback.cc:hb_vector_size_t<unsigned long long, 64u> hb_vector_size_t<unsigned long long, 64u>::process<$_21>($_21 const&, hb_vector_size_t<unsigned long long, 64u> const&) const
Unexecuted instantiation: hb-ot-shape-fallback.cc:hb_vector_size_t<unsigned long long, 64u> hb_vector_size_t<unsigned long long, 64u>::process<$_22>($_22 const&, hb_vector_size_t<unsigned long long, 64u> const&) const
Unexecuted instantiation: hb-ot-shape-fallback.cc:hb_vector_size_t<unsigned long long, 64u> hb_vector_size_t<unsigned long long, 64u>::process<$_25>($_25 const&, hb_vector_size_t<unsigned long long, 64u> const&) const
Unexecuted instantiation: hb-ot-shape-normalize.cc:hb_vector_size_t<unsigned long long, 64u> hb_vector_size_t<unsigned long long, 64u>::process<$_19>($_19 const&, hb_vector_size_t<unsigned long long, 64u> const&) const
Unexecuted instantiation: hb-ot-shape-normalize.cc:hb_vector_size_t<unsigned long long, 64u> hb_vector_size_t<unsigned long long, 64u>::process<$_20>($_20 const&, hb_vector_size_t<unsigned long long, 64u> const&) const
Unexecuted instantiation: hb-ot-shape-normalize.cc:hb_vector_size_t<unsigned long long, 64u> hb_vector_size_t<unsigned long long, 64u>::process<$_23>($_23 const&, hb_vector_size_t<unsigned long long, 64u> const&) const
Unexecuted instantiation: hb-ot-shaper-arabic.cc:hb_vector_size_t<unsigned long long, 64u> hb_vector_size_t<unsigned long long, 64u>::process<$_21>($_21 const&, hb_vector_size_t<unsigned long long, 64u> const&) const
Unexecuted instantiation: hb-ot-shaper-arabic.cc:hb_vector_size_t<unsigned long long, 64u> hb_vector_size_t<unsigned long long, 64u>::process<$_22>($_22 const&, hb_vector_size_t<unsigned long long, 64u> const&) const
Unexecuted instantiation: hb-ot-shaper-arabic.cc:hb_vector_size_t<unsigned long long, 64u> hb_vector_size_t<unsigned long long, 64u>::process<$_25>($_25 const&, hb_vector_size_t<unsigned long long, 64u> const&) const
Unexecuted instantiation: hb-ot-shaper-default.cc:hb_vector_size_t<unsigned long long, 64u> hb_vector_size_t<unsigned long long, 64u>::process<$_19>($_19 const&, hb_vector_size_t<unsigned long long, 64u> const&) const
Unexecuted instantiation: hb-ot-shaper-default.cc:hb_vector_size_t<unsigned long long, 64u> hb_vector_size_t<unsigned long long, 64u>::process<$_20>($_20 const&, hb_vector_size_t<unsigned long long, 64u> const&) const
Unexecuted instantiation: hb-ot-shaper-default.cc:hb_vector_size_t<unsigned long long, 64u> hb_vector_size_t<unsigned long long, 64u>::process<$_23>($_23 const&, hb_vector_size_t<unsigned long long, 64u> const&) const
Unexecuted instantiation: hb-ot-shaper-hangul.cc:hb_vector_size_t<unsigned long long, 64u> hb_vector_size_t<unsigned long long, 64u>::process<$_19>($_19 const&, hb_vector_size_t<unsigned long long, 64u> const&) const
Unexecuted instantiation: hb-ot-shaper-hangul.cc:hb_vector_size_t<unsigned long long, 64u> hb_vector_size_t<unsigned long long, 64u>::process<$_20>($_20 const&, hb_vector_size_t<unsigned long long, 64u> const&) const
Unexecuted instantiation: hb-ot-shaper-hangul.cc:hb_vector_size_t<unsigned long long, 64u> hb_vector_size_t<unsigned long long, 64u>::process<$_23>($_23 const&, hb_vector_size_t<unsigned long long, 64u> const&) const
Unexecuted instantiation: hb-ot-shaper-hebrew.cc:hb_vector_size_t<unsigned long long, 64u> hb_vector_size_t<unsigned long long, 64u>::process<$_19>($_19 const&, hb_vector_size_t<unsigned long long, 64u> const&) const
Unexecuted instantiation: hb-ot-shaper-hebrew.cc:hb_vector_size_t<unsigned long long, 64u> hb_vector_size_t<unsigned long long, 64u>::process<$_20>($_20 const&, hb_vector_size_t<unsigned long long, 64u> const&) const
Unexecuted instantiation: hb-ot-shaper-hebrew.cc:hb_vector_size_t<unsigned long long, 64u> hb_vector_size_t<unsigned long long, 64u>::process<$_23>($_23 const&, hb_vector_size_t<unsigned long long, 64u> const&) const
Unexecuted instantiation: hb-ot-shaper-indic.cc:hb_vector_size_t<unsigned long long, 64u> hb_vector_size_t<unsigned long long, 64u>::process<$_19>($_19 const&, hb_vector_size_t<unsigned long long, 64u> const&) const
Unexecuted instantiation: hb-ot-shaper-indic.cc:hb_vector_size_t<unsigned long long, 64u> hb_vector_size_t<unsigned long long, 64u>::process<$_20>($_20 const&, hb_vector_size_t<unsigned long long, 64u> const&) const
Unexecuted instantiation: hb-ot-shaper-indic.cc:hb_vector_size_t<unsigned long long, 64u> hb_vector_size_t<unsigned long long, 64u>::process<$_23>($_23 const&, hb_vector_size_t<unsigned long long, 64u> const&) const
Unexecuted instantiation: hb-ot-shaper-indic-table.cc:hb_vector_size_t<unsigned long long, 64u> hb_vector_size_t<unsigned long long, 64u>::process<$_19>($_19 const&, hb_vector_size_t<unsigned long long, 64u> const&) const
Unexecuted instantiation: hb-ot-shaper-indic-table.cc:hb_vector_size_t<unsigned long long, 64u> hb_vector_size_t<unsigned long long, 64u>::process<$_20>($_20 const&, hb_vector_size_t<unsigned long long, 64u> const&) const
Unexecuted instantiation: hb-ot-shaper-indic-table.cc:hb_vector_size_t<unsigned long long, 64u> hb_vector_size_t<unsigned long long, 64u>::process<$_23>($_23 const&, hb_vector_size_t<unsigned long long, 64u> const&) const
Unexecuted instantiation: hb-ot-shaper-khmer.cc:hb_vector_size_t<unsigned long long, 64u> hb_vector_size_t<unsigned long long, 64u>::process<$_19>($_19 const&, hb_vector_size_t<unsigned long long, 64u> const&) const
Unexecuted instantiation: hb-ot-shaper-khmer.cc:hb_vector_size_t<unsigned long long, 64u> hb_vector_size_t<unsigned long long, 64u>::process<$_20>($_20 const&, hb_vector_size_t<unsigned long long, 64u> const&) const
Unexecuted instantiation: hb-ot-shaper-khmer.cc:hb_vector_size_t<unsigned long long, 64u> hb_vector_size_t<unsigned long long, 64u>::process<$_23>($_23 const&, hb_vector_size_t<unsigned long long, 64u> const&) const
Unexecuted instantiation: hb-ot-shaper-myanmar.cc:hb_vector_size_t<unsigned long long, 64u> hb_vector_size_t<unsigned long long, 64u>::process<$_19>($_19 const&, hb_vector_size_t<unsigned long long, 64u> const&) const
Unexecuted instantiation: hb-ot-shaper-myanmar.cc:hb_vector_size_t<unsigned long long, 64u> hb_vector_size_t<unsigned long long, 64u>::process<$_20>($_20 const&, hb_vector_size_t<unsigned long long, 64u> const&) const
Unexecuted instantiation: hb-ot-shaper-myanmar.cc:hb_vector_size_t<unsigned long long, 64u> hb_vector_size_t<unsigned long long, 64u>::process<$_23>($_23 const&, hb_vector_size_t<unsigned long long, 64u> const&) const
Unexecuted instantiation: hb-ot-shaper-syllabic.cc:hb_vector_size_t<unsigned long long, 64u> hb_vector_size_t<unsigned long long, 64u>::process<$_19>($_19 const&, hb_vector_size_t<unsigned long long, 64u> const&) const
Unexecuted instantiation: hb-ot-shaper-syllabic.cc:hb_vector_size_t<unsigned long long, 64u> hb_vector_size_t<unsigned long long, 64u>::process<$_20>($_20 const&, hb_vector_size_t<unsigned long long, 64u> const&) const
Unexecuted instantiation: hb-ot-shaper-syllabic.cc:hb_vector_size_t<unsigned long long, 64u> hb_vector_size_t<unsigned long long, 64u>::process<$_23>($_23 const&, hb_vector_size_t<unsigned long long, 64u> const&) const
Unexecuted instantiation: hb-ot-shaper-thai.cc:hb_vector_size_t<unsigned long long, 64u> hb_vector_size_t<unsigned long long, 64u>::process<$_19>($_19 const&, hb_vector_size_t<unsigned long long, 64u> const&) const
Unexecuted instantiation: hb-ot-shaper-thai.cc:hb_vector_size_t<unsigned long long, 64u> hb_vector_size_t<unsigned long long, 64u>::process<$_20>($_20 const&, hb_vector_size_t<unsigned long long, 64u> const&) const
Unexecuted instantiation: hb-ot-shaper-thai.cc:hb_vector_size_t<unsigned long long, 64u> hb_vector_size_t<unsigned long long, 64u>::process<$_23>($_23 const&, hb_vector_size_t<unsigned long long, 64u> const&) const
Unexecuted instantiation: hb-ot-shaper-use.cc:hb_vector_size_t<unsigned long long, 64u> hb_vector_size_t<unsigned long long, 64u>::process<$_19>($_19 const&, hb_vector_size_t<unsigned long long, 64u> const&) const
Unexecuted instantiation: hb-ot-shaper-use.cc:hb_vector_size_t<unsigned long long, 64u> hb_vector_size_t<unsigned long long, 64u>::process<$_20>($_20 const&, hb_vector_size_t<unsigned long long, 64u> const&) const
Unexecuted instantiation: hb-ot-shaper-use.cc:hb_vector_size_t<unsigned long long, 64u> hb_vector_size_t<unsigned long long, 64u>::process<$_23>($_23 const&, hb_vector_size_t<unsigned long long, 64u> const&) const
Unexecuted instantiation: hb-ot-shaper-vowel-constraints.cc:hb_vector_size_t<unsigned long long, 64u> hb_vector_size_t<unsigned long long, 64u>::process<$_19>($_19 const&, hb_vector_size_t<unsigned long long, 64u> const&) const
Unexecuted instantiation: hb-ot-shaper-vowel-constraints.cc:hb_vector_size_t<unsigned long long, 64u> hb_vector_size_t<unsigned long long, 64u>::process<$_20>($_20 const&, hb_vector_size_t<unsigned long long, 64u> const&) const
Unexecuted instantiation: hb-ot-shaper-vowel-constraints.cc:hb_vector_size_t<unsigned long long, 64u> hb_vector_size_t<unsigned long long, 64u>::process<$_23>($_23 const&, hb_vector_size_t<unsigned long long, 64u> const&) const
Unexecuted instantiation: hb-ot-var.cc:hb_vector_size_t<unsigned long long, 64u> hb_vector_size_t<unsigned long long, 64u>::process<$_20>($_20 const&, hb_vector_size_t<unsigned long long, 64u> const&) const
Unexecuted instantiation: hb-ot-var.cc:hb_vector_size_t<unsigned long long, 64u> hb_vector_size_t<unsigned long long, 64u>::process<$_21>($_21 const&, hb_vector_size_t<unsigned long long, 64u> const&) const
Unexecuted instantiation: hb-ot-var.cc:hb_vector_size_t<unsigned long long, 64u> hb_vector_size_t<unsigned long long, 64u>::process<$_24>($_24 const&, hb_vector_size_t<unsigned long long, 64u> const&) const
Unexecuted instantiation: hb-set.cc:hb_vector_size_t<unsigned long long, 64u> hb_vector_size_t<unsigned long long, 64u>::process<$_20>($_20 const&, hb_vector_size_t<unsigned long long, 64u> const&) const
Unexecuted instantiation: hb-set.cc:hb_vector_size_t<unsigned long long, 64u> hb_vector_size_t<unsigned long long, 64u>::process<$_19>($_19 const&, hb_vector_size_t<unsigned long long, 64u> const&) const
Unexecuted instantiation: hb-set.cc:hb_vector_size_t<unsigned long long, 64u> hb_vector_size_t<unsigned long long, 64u>::process<$_23>($_23 const&, hb_vector_size_t<unsigned long long, 64u> const&) const
Unexecuted instantiation: hb-static.cc:hb_vector_size_t<unsigned long long, 64u> hb_vector_size_t<unsigned long long, 64u>::process<$_18>($_18 const&, hb_vector_size_t<unsigned long long, 64u> const&) const
Unexecuted instantiation: hb-static.cc:hb_vector_size_t<unsigned long long, 64u> hb_vector_size_t<unsigned long long, 64u>::process<$_19>($_19 const&, hb_vector_size_t<unsigned long long, 64u> const&) const
Unexecuted instantiation: hb-static.cc:hb_vector_size_t<unsigned long long, 64u> hb_vector_size_t<unsigned long long, 64u>::process<$_22>($_22 const&, hb_vector_size_t<unsigned long long, 64u> const&) const
Unexecuted instantiation: hb-aat-layout.cc:hb_vector_size_t<unsigned long long, 64u> hb_vector_size_t<unsigned long long, 64u>::process<$_21>($_21 const&, hb_vector_size_t<unsigned long long, 64u> const&) const
Unexecuted instantiation: hb-aat-layout.cc:hb_vector_size_t<unsigned long long, 64u> hb_vector_size_t<unsigned long long, 64u>::process<$_22>($_22 const&, hb_vector_size_t<unsigned long long, 64u> const&) const
Unexecuted instantiation: hb-aat-layout.cc:hb_vector_size_t<unsigned long long, 64u> hb_vector_size_t<unsigned long long, 64u>::process<$_25>($_25 const&, hb_vector_size_t<unsigned long long, 64u> const&) const
Unexecuted instantiation: hb-aat-map.cc:hb_vector_size_t<unsigned long long, 64u> hb_vector_size_t<unsigned long long, 64u>::process<$_19>($_19 const&, hb_vector_size_t<unsigned long long, 64u> const&) const
Unexecuted instantiation: hb-aat-map.cc:hb_vector_size_t<unsigned long long, 64u> hb_vector_size_t<unsigned long long, 64u>::process<$_20>($_20 const&, hb_vector_size_t<unsigned long long, 64u> const&) const
Unexecuted instantiation: hb-aat-map.cc:hb_vector_size_t<unsigned long long, 64u> hb_vector_size_t<unsigned long long, 64u>::process<$_23>($_23 const&, hb_vector_size_t<unsigned long long, 64u> const&) const
Unexecuted instantiation: hb-face.cc:hb_vector_size_t<unsigned long long, 64u> hb_vector_size_t<unsigned long long, 64u>::process<$_19>($_19 const&, hb_vector_size_t<unsigned long long, 64u> const&) const
Unexecuted instantiation: hb-face.cc:hb_vector_size_t<unsigned long long, 64u> hb_vector_size_t<unsigned long long, 64u>::process<$_20>($_20 const&, hb_vector_size_t<unsigned long long, 64u> const&) const
Unexecuted instantiation: hb-face.cc:hb_vector_size_t<unsigned long long, 64u> hb_vector_size_t<unsigned long long, 64u>::process<$_23>($_23 const&, hb_vector_size_t<unsigned long long, 64u> const&) const
Unexecuted instantiation: hb-ot-cff1-table.cc:hb_vector_size_t<unsigned long long, 64u> hb_vector_size_t<unsigned long long, 64u>::process<$_20>($_20 const&, hb_vector_size_t<unsigned long long, 64u> const&) const
Unexecuted instantiation: hb-ot-cff1-table.cc:hb_vector_size_t<unsigned long long, 64u> hb_vector_size_t<unsigned long long, 64u>::process<$_21>($_21 const&, hb_vector_size_t<unsigned long long, 64u> const&) const
Unexecuted instantiation: hb-ot-cff1-table.cc:hb_vector_size_t<unsigned long long, 64u> hb_vector_size_t<unsigned long long, 64u>::process<$_24>($_24 const&, hb_vector_size_t<unsigned long long, 64u> const&) const
Unexecuted instantiation: hb-ot-cff2-table.cc:hb_vector_size_t<unsigned long long, 64u> hb_vector_size_t<unsigned long long, 64u>::process<$_20>($_20 const&, hb_vector_size_t<unsigned long long, 64u> const&) const
Unexecuted instantiation: hb-ot-cff2-table.cc:hb_vector_size_t<unsigned long long, 64u> hb_vector_size_t<unsigned long long, 64u>::process<$_21>($_21 const&, hb_vector_size_t<unsigned long long, 64u> const&) const
Unexecuted instantiation: hb-ot-cff2-table.cc:hb_vector_size_t<unsigned long long, 64u> hb_vector_size_t<unsigned long long, 64u>::process<$_24>($_24 const&, hb_vector_size_t<unsigned long long, 64u> const&) const
Unexecuted instantiation: hb-ot-face.cc:hb_vector_size_t<unsigned long long, 64u> hb_vector_size_t<unsigned long long, 64u>::process<$_19>($_19 const&, hb_vector_size_t<unsigned long long, 64u> const&) const
Unexecuted instantiation: hb-ot-face.cc:hb_vector_size_t<unsigned long long, 64u> hb_vector_size_t<unsigned long long, 64u>::process<$_20>($_20 const&, hb_vector_size_t<unsigned long long, 64u> const&) const
Unexecuted instantiation: hb-ot-face.cc:hb_vector_size_t<unsigned long long, 64u> hb_vector_size_t<unsigned long long, 64u>::process<$_23>($_23 const&, hb_vector_size_t<unsigned long long, 64u> const&) const
Unexecuted instantiation: hb-ot-layout.cc:hb_vector_size_t<unsigned long long, 64u> hb_vector_size_t<unsigned long long, 64u>::process<$_22>($_22 const&, hb_vector_size_t<unsigned long long, 64u> const&) const
Unexecuted instantiation: hb-ot-layout.cc:hb_vector_size_t<unsigned long long, 64u> hb_vector_size_t<unsigned long long, 64u>::process<$_21>($_21 const&, hb_vector_size_t<unsigned long long, 64u> const&) const
Unexecuted instantiation: hb-ot-layout.cc:hb_vector_size_t<unsigned long long, 64u> hb_vector_size_t<unsigned long long, 64u>::process<$_25>($_25 const&, hb_vector_size_t<unsigned long long, 64u> const&) const
Unexecuted instantiation: hb-ot-map.cc:hb_vector_size_t<unsigned long long, 64u> hb_vector_size_t<unsigned long long, 64u>::process<$_19>($_19 const&, hb_vector_size_t<unsigned long long, 64u> const&) const
Unexecuted instantiation: hb-ot-map.cc:hb_vector_size_t<unsigned long long, 64u> hb_vector_size_t<unsigned long long, 64u>::process<$_20>($_20 const&, hb_vector_size_t<unsigned long long, 64u> const&) const
Unexecuted instantiation: hb-ot-map.cc:hb_vector_size_t<unsigned long long, 64u> hb_vector_size_t<unsigned long long, 64u>::process<$_23>($_23 const&, hb_vector_size_t<unsigned long long, 64u> const&) const
62
  hb_vector_size_t operator | (const hb_vector_size_t &o) const
63
0
  { return process (hb_bitwise_or, o); }
64
  hb_vector_size_t operator & (const hb_vector_size_t &o) const
65
0
  { return process (hb_bitwise_and, o); }
66
  hb_vector_size_t operator ^ (const hb_vector_size_t &o) const
67
0
  { return process (hb_bitwise_xor, o); }
68
  hb_vector_size_t operator ~ () const
69
0
  { return process (hb_bitwise_neg); }
70
71
  hb_array_t<const elt_t> iter () const
72
0
  { return hb_array (v); }
73
74
  private:
75
  static_assert (0 == byte_size % sizeof (elt_t), "");
76
  elt_t v[byte_size / sizeof (elt_t)];
77
};
78
79
80
struct hb_bit_page_t
81
{
82
0
  void init0 () { v.clear (); }
83
0
  void init1 () { v.clear (0xFF); }
84
85
  constexpr unsigned len () const
86
0
  { return ARRAY_LENGTH_CONST (v); }
87
88
  bool is_empty () const
89
0
  {
90
0
    return
91
0
    + hb_iter (v)
92
0
    | hb_none
93
0
    ;
94
0
  }
95
  uint32_t hash () const
96
0
  {
97
0
    return
98
0
    + hb_iter (v)
99
0
    | hb_reduce ([] (uint32_t h, const elt_t &_) { return h * 31 + hb_hash (_); }, (uint32_t) 0u)
100
0
    ;
101
0
  }
102
103
0
  void add (hb_codepoint_t g) { elt (g) |= mask (g); }
104
0
  void del (hb_codepoint_t g) { elt (g) &= ~mask (g); }
105
0
  void set (hb_codepoint_t g, bool value) { if (value) add (g); else del (g); }
106
0
  bool get (hb_codepoint_t g) const { return elt (g) & mask (g); }
107
108
  void add_range (hb_codepoint_t a, hb_codepoint_t b)
109
0
  {
110
0
    elt_t *la = &elt (a);
111
0
    elt_t *lb = &elt (b);
112
0
    if (la == lb)
113
0
      *la |= (mask (b) << 1) - mask(a);
114
0
    else
115
0
    {
116
0
      *la |= ~(mask (a) - 1);
117
0
      la++;
118
119
0
      hb_memset (la, 0xff, (char *) lb - (char *) la);
120
121
0
      *lb |= ((mask (b) << 1) - 1);
122
0
    }
123
0
  }
124
  void del_range (hb_codepoint_t a, hb_codepoint_t b)
125
0
  {
126
0
    elt_t *la = &elt (a);
127
0
    elt_t *lb = &elt (b);
128
0
    if (la == lb)
129
0
      *la &= ~((mask (b) << 1) - mask(a));
130
0
    else
131
0
    {
132
0
      *la &= mask (a) - 1;
133
0
      la++;
134
135
0
      hb_memset (la, 0, (char *) lb - (char *) la);
136
137
0
      *lb &= ~((mask (b) << 1) - 1);
138
0
    }
139
0
  }
140
  void set_range (hb_codepoint_t a, hb_codepoint_t b, bool v)
141
0
  { if (v) add_range (a, b); else del_range (a, b); }
142
143
144
  // Writes out page values to the array p. Returns the number of values
145
  // written. At most size codepoints will be written.
146
  unsigned int write (uint32_t        base,
147
          unsigned int    start_value,
148
          hb_codepoint_t *p,
149
          unsigned int    size) const
150
0
  {
151
0
    unsigned int start_v = start_value / ELT_BITS;
152
0
    unsigned int start_bit = start_value & ELT_MASK;
153
0
    unsigned int count = 0;
154
0
    for (unsigned i = start_v; i < len () && count < size; i++)
155
0
    {
156
0
      elt_t bits = v[i];
157
0
      uint32_t v_base = base | (i * ELT_BITS);
158
0
      for (unsigned int j = start_bit; j < ELT_BITS && count < size; j++)
159
0
      {
160
0
  if ((elt_t(1) << j) & bits) {
161
0
    *p++ = v_base | j;
162
0
    count++;
163
0
  }
164
0
      }
165
0
      start_bit = 0;
166
0
    }
167
0
    return count;
168
0
  }
169
170
  // Writes out the values NOT in this page to the array p. Returns the
171
  // number of values written. At most size codepoints will be written.
172
  // Returns the number of codepoints written. next_value holds the next value
173
  // that should be written (if not present in this page). This is used to fill
174
  // any missing value gaps between this page and the previous page, if any.
175
  // next_value is updated to one more than the last value present in this page.
176
  unsigned int write_inverted (uint32_t        base,
177
             unsigned int    start_value,
178
             hb_codepoint_t *p,
179
             unsigned int    size,
180
             hb_codepoint_t *next_value) const
181
0
  {
182
0
    unsigned int start_v = start_value / ELT_BITS;
183
0
    unsigned int start_bit = start_value & ELT_MASK;
184
0
    unsigned int count = 0;
185
0
    for (unsigned i = start_v; i < len () && count < size; i++)
186
0
    {
187
0
      elt_t bits = v[i];
188
0
      uint32_t v_offset = i * ELT_BITS;
189
0
      for (unsigned int j = start_bit; j < ELT_BITS && count < size; j++)
190
0
      {
191
0
  if ((elt_t(1) << j) & bits)
192
0
  {
193
0
    hb_codepoint_t value = base | v_offset | j;
194
    // Emit all the missing values from next_value up to value - 1.
195
0
    for (hb_codepoint_t k = *next_value; k < value && count < size; k++)
196
0
    {
197
0
      *p++ = k;
198
0
      count++;
199
0
    }
200
    // Skip over this value;
201
0
    *next_value = value + 1;
202
0
  }
203
0
      }
204
0
      start_bit = 0;
205
0
    }
206
0
    return count;
207
0
  }
208
209
  bool is_equal (const hb_bit_page_t &other) const
210
0
  {
211
0
    for (unsigned i = 0; i < len (); i++)
212
0
      if (v[i] != other.v[i])
213
0
  return false;
214
0
    return true;
215
0
  }
216
  bool is_subset (const hb_bit_page_t &larger_page) const
217
0
  {
218
0
    for (unsigned i = 0; i < len (); i++)
219
0
      if (~larger_page.v[i] & v[i])
220
0
  return false;
221
0
    return true;
222
0
  }
223
224
  unsigned int get_population () const
225
0
  {
226
0
    return
227
0
    + hb_iter (v)
228
0
    | hb_reduce ([] (unsigned pop, const elt_t &_) { return pop + hb_popcount (_); }, 0u)
229
0
    ;
230
0
  }
231
232
  bool next (hb_codepoint_t *codepoint) const
233
0
  {
234
0
    unsigned int m = (*codepoint + 1) & MASK;
235
0
    if (!m)
236
0
    {
237
0
      *codepoint = INVALID;
238
0
      return false;
239
0
    }
240
0
    unsigned int i = m / ELT_BITS;
241
0
    unsigned int j = m & ELT_MASK;
242
243
0
    const elt_t vv = v[i] & ~((elt_t (1) << j) - 1);
244
0
    for (const elt_t *p = &vv; i < len (); p = &v[++i])
245
0
      if (*p)
246
0
      {
247
0
  *codepoint = i * ELT_BITS + elt_get_min (*p);
248
0
  return true;
249
0
      }
250
251
0
    *codepoint = INVALID;
252
0
    return false;
253
0
  }
254
  bool previous (hb_codepoint_t *codepoint) const
255
0
  {
256
0
    unsigned int m = (*codepoint - 1) & MASK;
257
0
    if (m == MASK)
258
0
    {
259
0
      *codepoint = INVALID;
260
0
      return false;
261
0
    }
262
0
    unsigned int i = m / ELT_BITS;
263
0
    unsigned int j = m & ELT_MASK;
264
265
    /* Fancy mask to avoid shifting by elt_t bitsize, which is undefined. */
266
0
    const elt_t mask = j < 8 * sizeof (elt_t) - 1 ?
267
0
           ((elt_t (1) << (j + 1)) - 1) :
268
0
           (elt_t) -1;
269
0
    const elt_t vv = v[i] & mask;
270
0
    const elt_t *p = &vv;
271
0
    while (true)
272
0
    {
273
0
      if (*p)
274
0
      {
275
0
  *codepoint = i * ELT_BITS + elt_get_max (*p);
276
0
  return true;
277
0
      }
278
0
      if ((int) i <= 0) break;
279
0
      p = &v[--i];
280
0
    }
281
282
0
    *codepoint = INVALID;
283
0
    return false;
284
0
  }
285
  hb_codepoint_t get_min () const
286
0
  {
287
0
    for (unsigned int i = 0; i < len (); i++)
288
0
      if (v[i])
289
0
  return i * ELT_BITS + elt_get_min (v[i]);
290
0
    return INVALID;
291
0
  }
292
  hb_codepoint_t get_max () const
293
0
  {
294
0
    for (int i = len () - 1; i >= 0; i--)
295
0
      if (v[i])
296
0
  return i * ELT_BITS + elt_get_max (v[i]);
297
0
    return 0;
298
0
  }
299
300
  static constexpr hb_codepoint_t INVALID = HB_SET_VALUE_INVALID;
301
302
  typedef unsigned long long elt_t;
303
  static constexpr unsigned PAGE_BITS = 512;
304
  static_assert ((PAGE_BITS & ((PAGE_BITS) - 1)) == 0, "");
305
  static constexpr unsigned PAGE_BITS_LOG_2 = 9;
306
  static_assert (1 << PAGE_BITS_LOG_2 == PAGE_BITS, "");
307
  static constexpr unsigned PAGE_BITMASK = PAGE_BITS - 1;
308
309
0
  static unsigned int elt_get_min (const elt_t &elt) { return hb_ctz (elt); }
310
0
  static unsigned int elt_get_max (const elt_t &elt) { return hb_bit_storage (elt) - 1; }
311
312
  typedef hb_vector_size_t<elt_t, PAGE_BITS / 8> vector_t;
313
314
  static constexpr unsigned ELT_BITS = sizeof (elt_t) * 8;
315
  static constexpr unsigned ELT_MASK = ELT_BITS - 1;
316
317
  static constexpr unsigned BITS = sizeof (vector_t) * 8;
318
  static constexpr unsigned MASK = BITS - 1;
319
  static_assert ((unsigned) PAGE_BITS == (unsigned) BITS, "");
320
321
0
  elt_t &elt (hb_codepoint_t g) { return v[(g & MASK) / ELT_BITS]; }
322
0
  const elt_t& elt (hb_codepoint_t g) const { return v[(g & MASK) / ELT_BITS]; }
323
0
  static constexpr elt_t mask (hb_codepoint_t g) { return elt_t (1) << (g & ELT_MASK); }
324
325
  vector_t v;
326
};
327
static_assert (hb_bit_page_t::PAGE_BITS == sizeof (hb_bit_page_t) * 8, "");
328
329
330
#endif /* HB_BIT_PAGE_HH */