def in.give.to

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

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
import bend-osdev-acpi@0.1.1.0/aml_value.bend as V
import bend-osdev-acpi@0.1.1.0/aml_host.bend as Hs

2873# Give: a value for the frame on top
2874def in.give.to(~H: Data, ~io: H -> Hs.AmlHostOp -> Result<&2, &2, E.AcpiError, Hs.AmlHostAns<H>>, fs: List<&2, AmlFrame>, v: V.AmlValue, +c: AmlCur, +w: AmlWorld<H>) -> AmlMachine<H>:
2875  match fs:
2876    case Con{AmlFArgs{op, got, todo}, rest}:
2877      in.give.args(~H, ~io, op, got, todo, v, c, rest, w)
2878    case Con{AmlFIf{+after}, rest}:
2879      in.if.k(H, in.truth(in.wide(H, w), v), c, after, rest, w)
2880    case Con{AmlFWhile{start, after, False{}}, rest}:
2881      in.while.k(H, in.truth(in.wide(H, w), v), c, start, after, rest, w)
2882    case Con{AmlFBuffer{after}, rest}:
2883      in.buf.k(H, in.small.int(in.wide(H, w), v), c, after, rest, w)
2884    case Con{AmlFPkg{+n, got, after}, rest}:
2885      in.pkg.k(H, cur.at_end(c), n, Con{v, got}, c, after, rest, w)
2886    case Con{AmlFVarPkg{after}, rest}:
2887      in.varpkg.k(H, in.small.int(in.wide(H, w), v), c, after, rest, w)
2888    case _:
2889      AmlMachine{AmlMExec{}, c, fs, w}

Uses (22)

Used by (1)