|
REAL
Regular Expression Algorithmic Library — constexpr C++20 regex
|
Compile-time-storage VM scratch, all fixed-capacity (zero heap), keyed on DIMENSIONS ONLY. More...
#include <storage.hpp>
Public Attributes | |
| basic_capture_pool< static_vec< std::size_t, max_blocks *SlotCount >, static_vec< std::int32_t, max_blocks >, static_vec< std::uint32_t, max_blocks > > | pool |
| COW capture blocks (zero heap). | |
Public Attributes inherited from real::detail::basic_pike_state< basic_thread_list< static_vec< std::int32_t, CodeSize >, static_vec< std::size_t, CodeSize >, static_vec< std::uint64_t, CodeSize > >, static_vec< eps_entry,(3 *CodeSize)+4 > > | |
| basic_thread_list< static_vec< std::int32_t, CodeSize >, static_vec< std::size_t, CodeSize >, static_vec< std::uint64_t, CodeSize > > | list_a |
| One of the two thread lists; the run rotates pointers, not indices. | |
| basic_thread_list< static_vec< std::int32_t, CodeSize >, static_vec< std::size_t, CodeSize >, static_vec< std::uint64_t, CodeSize > > | list_b |
| The other one — see list_a. | |
| static_vec< eps_entry,(3 *CodeSize)+4 > | stack |
| Epsilon-closure DFS stack. | |
| std::int32_t | table_class |
| Flat 256-byte membership table for the hot single-class scan, and the class index it was built for (-1 = none). | |
| std::array< std::uint8_t, 256 > | table |
| 1 where the byte is in table_class (filled on a class_table miss). | |
| std::int32_t | cp_page_class |
Membership bitmap for a cp_class over the 2-byte UTF-8 range [U+0080, U+07FF], and the class it was built for. European text lives almost entirely in this range (Latin, IPA, Greek, Cyrillic, Hebrew, Arabic…), so a 240-byte bitmap answers it in one load. Built once per class and reused across a find_all-style walk. | |
| std::array< std::uint64_t, 30 > | cp_page |
| 1 where the code point (U+0080..U+07FF) is a member (filled on a cp_page_table miss). | |
| const void * | rows_verified_for |
Program whose membership rows this state has already verified as filled. Lets a walk skip the two acquire loads class_table would otherwise do once per run() — see there. | |
| const std::uint8_t * | row_ptr |
| The verified byte row, cached so the hot path returns it without re-deriving the address. | |
| const std::uint64_t * | page_ptr |
| As row_ptr, for the two-byte page bitmap. | |
| std::int32_t | hi_class |
| Class hi_ptr / hi_never were resolved for; -1 while unresolved. | |
| const cp_hi_table * | hi_ptr |
| The resolved sparse hi table for hi_class, or null when it has none usable. | |
| bool | hi_never |
| Set when hi_class has no high ranges at all, so every cp past the page bitmap misses. | |
Additional Inherited Members | |
Public Member Functions inherited from real::detail::basic_pike_state< basic_thread_list< static_vec< std::int32_t, CodeSize >, static_vec< std::size_t, CodeSize >, static_vec< std::uint64_t, CodeSize > >, static_vec< eps_entry,(3 *CodeSize)+4 > > | |
| constexpr | basic_pike_state () noexcept |
| Value-initializes table and cp_page during constant evaluation only. | |
Compile-time-storage VM scratch, all fixed-capacity (zero heap), keyed on DIMENSIONS ONLY.
The epsilon DFS stack is bounded because each pc is processed once and pushes at most two explore entries plus one restore entry. Capture slots live in a copy-on-write basic_capture_pool (a thread carries one block index, not a slot run), sized for the worst-case block count — the same zero-heap, compile-sized discipline.
| CodeSize | Scratch capacity in instructions — a TIER (see scratch_code_tier), not the exact program length, so neighbouring shapes share one instantiation. |
| SlotCount | Capture slots. |
| WantsIL | Whether the inner-literal route is compiled in. |