def in.eval

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

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_host.bend as Hs

2759# Eval: one operand
2760def in.eval(~H: Data, ~io: H -> Hs.AmlHostOp -> Result<&2, &2, E.AcpiError, Hs.AmlHostAns<H>>, k: AmlArgK, +c: AmlCur, fs: List<&2, AmlFrame>, +w: AmlWorld<H>) -> AmlMachine<H>:
2761  match k:
2762    case AmlKByte{}:
2763      in.imm.give(H, True{}, cur.imm(1n, c), fs, w)
2764    case AmlKWord{}:
2765      in.imm.give(H, True{}, cur.imm(2n, c), fs, w)
2766    case AmlKDWord{}:
2767      in.imm.give(H, True{}, cur.imm(4n, c), fs, w)
2768    case AmlKName{}:
2769      in.name.go(~H, ~io, cur.name(c), AmlKName{}, fs, w)
2770    case _:
2771      in.read.term(~H, ~io, k, cur.byte(c), False{}, fs, w)

Uses (17)

Used by (1)