def in.name.go

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

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

2097def in.name.go(~H: Data, ~io: H -> Hs.AmlHostOp -> Result<&2, &2, E.AcpiError, Hs.AmlHostAns<H>>, r: Result<&2, &2, E.AcpiError, AmlNameC>, k: AmlArgK, fs: List<&2, AmlFrame>, +w: AmlWorld<H>) -> AmlMachine<H>:
2098  match r:
2099    case Fail{e}:
2100      AmlMachine{AmlMFail{e}, in.no.cur(), fs, w}
2101    case Done{AmlNameC{+n, c}}:
2102      match k:
2103        case AmlKName{}:
2104          in.give(H, V.AmlRef{V.AmlLName{S.AmlPath.of_name(in.scope(H, w), n)}}, c, fs, w)
2105        case _:
2106          in.name.res(~H, ~io, k, S.AmlNs.resolve(AmlWorld.ns(H, w), in.scope(H, w), n), n, c, fs, w)

Uses (20)

Used by (2)