|
REAL
Regular Expression Algorithmic Library — constexpr C++20 regex
|
Opt-in route/work counters, compiled out unless the profiling build flag is set. More...
Enumerations | |
| enum class | route : std::uint8_t { class_loop = 0 , cp_class_loop , exact_literal , inner_literal , fixed_shape , fixed_shape_pair , codepoint_class , alternation , aho_corasick , onepass_full , onepass_window , lazy_dfa_anchored , lazy_dfa_fwd_rev , general_full , general_window , trailing_la , possessive_byte_loop , possessive_class_loop , possessive_cp_class_loop , possessive_delimited , count_ } |
| Named once-per-dispatch routes (Tier 1). Always visible so tick call sites compile OFF. More... | |
| enum class | event : std::uint8_t { first_byte_skip = 0 , cascade , rare_byte , memmem , wb_b1_drop , wb_b2_wrap , il_abandoned , pool_incref , pool_decref , pool_cow_write , count_ } |
| Secondary events: prefilter work, word-boundary handling, abandons, capture-pool traffic. More... | |
Functions | |
| constexpr void | tick_route (route r) noexcept |
Bill one dispatch to route r. Erased entirely unless REAL_PROFILE is defined. | |
| constexpr void | tick_event (event e) noexcept |
Bill one occurrence of e. Erased entirely unless REAL_PROFILE is defined. | |
| constexpr void | tick_thread_count (std::size_t n) noexcept |
Bill one step() carrying n live threads. Erased entirely unless REAL_PROFILE is defined. | |
| constexpr void | tick_prefilter_candidate () noexcept |
Bill one candidate a prefilter produced. Erased entirely unless REAL_PROFILE is defined. | |
| constexpr void | tick_prefilter_rejected () noexcept |
| Bill one prefilter candidate REJECTED by confirmation. See tick_prefilter_candidate for the scope these two share. | |
| constexpr void | tick_bytes (std::uint64_t n) noexcept |
Bill n scanned bytes. Erased entirely unless REAL_PROFILE is defined. | |
| constexpr void | tick_run_len (std::size_t n) noexcept |
Record a run of n accepted units. Erased entirely unless REAL_PROFILE is defined. | |
Opt-in route/work counters, compiled out unless the profiling build flag is set.
|
strong |
Secondary events: prefilter work, word-boundary handling, abandons, capture-pool traffic.
|
strong |
Named once-per-dispatch routes (Tier 1). Always visible so tick call sites compile OFF.
|
constexprnoexcept |
Bill n scanned bytes. Erased entirely unless REAL_PROFILE is defined.
| [in] | n | Bytes the caller just consumed. |
|
constexprnoexcept |
Bill one occurrence of e. Erased entirely unless REAL_PROFILE is defined.
| [in] | e | The event to count. |
|
constexprnoexcept |
Bill one candidate a prefilter produced. Erased entirely unless REAL_PROFILE is defined.
SCOPE, STATED because a counter whose meaning is guessed is barely better than a dead one: counters::prefilter_candidates and counters::prefilter_rejected (named here as code because they exist only in a REAL_PROFILE build) cover the INNER-LITERAL route's memmem loop and nothing else. One candidate is one hit find_literal returned; one rejection is one hit whose reverse walk reached no match start, so the loop advanced. Other routes have their own notion of a candidate and are deliberately not folded in, so a zero here is not a statement about them.
|
constexprnoexcept |
Bill one dispatch to route r. Erased entirely unless REAL_PROFILE is defined.
| [in] | r | The route that handled the search. |
|
constexprnoexcept |
Record a run of n accepted units. Erased entirely unless REAL_PROFILE is defined.
| [in] | n | The run's length. |
|
constexprnoexcept |
Bill one step() carrying n live threads. Erased entirely unless REAL_PROFILE is defined.
| [in] | n | Threads in the current list as the step begins. |