def in.unwind.ret

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

import bend-osdev-acpi@0.1.1.0/aml_interp.bend as AmlInterp
import Base
import bend-osdev-acpi@0.1.1.0/aml_value.bend as V

1672# Return: frames dropped to the method call (or the bottom)
1673def in.unwind.ret(-H: Data, fs: List<&2, AmlFrame>, v: V.AmlValue, w: AmlWorld<H>) -> AmlMachine<H>:
1674  match fs:
1675    case Nil{}:
1676      AmlMachine{AmlMDone{v}, in.no.cur(), Nil{}, w}
1677    case Con{AmlFCall{saved, back}, rest}:
1678      AmlMachine{AmlMGive{v}, back, rest, in.back(H, w, saved)}
1679    case Con{AmlFTop{}, rest}:
1680      AmlMachine{AmlMDone{v}, in.no.cur(), [AmlFTop{}], w}
1681    case Con{f, rest}:
1682      in.unwind.ret(H, rest, v, w)

Uses (8)

Used by (1)