libsnobol4 1.0.2
High-performance SNOBOL4-style pattern matching library
Loading...
Searching...
No Matches
UndoRecord Struct Reference

A single trail undo record. More...

#include <vm.h>

Public Attributes

uint8_t kind
uint8_t index
uint8_t sub
uint32_t prior_u
size_t prior_a
size_t prior_b
size_t prior_lp

Detailed Description

A single trail undo record.

Records what was mutated and the prior value so it can be restored on backtrack. Bit-packed to keep the trail small: every choice point that abandons a thread replays only the records it owns.

Definition at line 361 of file vm.h.

Member Data Documentation

◆ index

uint8_t UndoRecord::index

Register index (counter / capture / variable id)

Definition at line 363 of file vm.h.

◆ kind

uint8_t UndoRecord::kind

UndoKind

Definition at line 362 of file vm.h.

◆ prior_a

size_t UndoRecord::prior_a

Prior value A (cap_start / var_start / old_start)

Definition at line 366 of file vm.h.

◆ prior_b

size_t UndoRecord::prior_b

Prior value B (cap_end / var_end / old_end)

Definition at line 367 of file vm.h.

◆ prior_lp

size_t UndoRecord::prior_lp

Prior loop_last_pos (UNDO_COUNTER_DEC)

Definition at line 368 of file vm.h.

◆ prior_u

uint32_t UndoRecord::prior_u

Prior counter value (UNDO_COUNTER_DEC)

Definition at line 365 of file vm.h.

◆ sub

uint8_t UndoRecord::sub

0 = start field, 1 = end field (CAP/VAR), 0 otherwise

Definition at line 364 of file vm.h.


The documentation for this struct was generated from the following file:
  • core/include/snobol/vm.h