def bpf_mem.go

bend-osdev-bpf@0.1.0.0 · validate.bend:210

import bend-osdev-bpf@0.1.0.0/validate.bend as Validate
import Base
import bend-osdev-bpf@0.1.0.0/insn.bend as I

210def bpf_mem.go(xs: List<&2, I.BpfOp>, +pc: Nat, st: BpfInitStep) -> Result<&2, &2, I.BpfError, Unit>:
211  match xs:
212    case Nil{}:
213      match st:
214        case BpfInitStep{ok, fall, ahead}:
215          ok
216    case Con{op, t}:
217      match st:
218        case BpfInitStep{ok, fall, +ahead}:
219          match ok:
220            case Fail{e}:
221              Fail{e}
222            case Done{u}:
223              bpf_mem.go(t, 1n+pc, bpf_mem.step(op, pc, U32.and(fall, bpf_mem.head(ahead)), bpf_mem.tail(ahead)))

Uses (11)

Used by (1)