def in.unwind.brk

bend-osdev-acpi@0.1.1.0 · aml_interp.bend:1684

import bend-osdev-acpi@0.1.1.0/aml_interp.bend as AmlInterp
import Base
import bend-osdev-acpi@0.1.1.0/error.bend as E

1684# Break: frames dropped to the While, then on after it
1685def in.unwind.brk(-H: Data, fs: List<&2, AmlFrame>, w: AmlWorld<H>) -> AmlMachine<H>:
1686  match fs:
1687    case Nil{}:
1688      AmlMachine{AmlMFail{E.AcpiAmlBadControl{}}, in.no.cur(), Nil{}, w}
1689    case Con{AmlFWhile{s, after, b}, rest}:
1690      AmlMachine{AmlMExec{}, after, rest, w}
1691    case Con{AmlFCall{saved, back}, rest}:
1692      AmlMachine{AmlMFail{E.AcpiAmlBadControl{}}, back, rest, w}
1693    case Con{AmlFTop{}, rest}:
1694      AmlMachine{AmlMFail{E.AcpiAmlBadControl{}}, in.no.cur(), rest, w}
1695    case Con{f, rest}:
1696      in.unwind.brk(H, rest, w)

Uses (7)

Used by (1)