def replay.vm

bend-kit-regex@0.8.0.0 · regex.bend:1752

import bend-kit-regex@0.8.0.0/regex.bend as Regex
import Base

1752# A learned transition on the real threads; next is the char after the new position.
1753def replay.vm(fresh: Bool, +hit: U32, outs: List<&2, Op>, st: Vm, +init: List<&2, Maybe<&2, U32>>, +pos: U32, +start: Maybe<&2, List<&2, Inst>>, +next: Maybe<&2, Char>) -> Vm:
1754  match fresh:
1755    case True{}:
1756      Vm{+ths, best} = st
1757      replay.fresh(seed.skip(Nil{}, None{}, start, next), outs, ths, init, pos)
1758    case False{}:
1759      Vm{+ths, best} = st
1760      Vm{replay(outs, ths, init, pos), replay.best(U32.is_eq(hit, 0), hit, ths, init, best)}

Uses (13)

Used by (1)