AmlInterp.in.read_obj: def of bend-osdev-acpi@0.1.1.0 Import: import bend-osdev-acpi@0.1.1.0/aml_interp.bend as AmlInterp Lines 590-605 of bend-osdev-acpi@0.1.1.0/aml_interp.bend: https://jend.leeeet.dev/read.txt?path=bend-osdev-acpi@0.1.1.0/aml_interp.bend&start_line=590&end_line=605 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 # the value of a named object (alias followed): a field unit is read # through the host def in.read_obj(~H: Data, ~io: H -> Hs.AmlHostOp -> Result<&2, &2, E.AcpiError, Hs.AmlHostAns>, +w: AmlWorld, +p: String, o: Maybe<&2, S.AmlObject>) -> Result<&2, &2, E.AcpiError, AmlRead>: match o: case None{}: Fail{E.AcpiAmlUndefined{p}} case Some{S.AmlOData{v}}: Done{AmlRead{w, v}} case Some{S.AmlOField{r, +off, +bits, +flags}}: in.field.rd(~H, ~io, Nat.is_le(bits, 64n), w, in.desc(AmlWorld.ns(H, w), r, off, bits, flags)) case Some{S.AmlOIndexField{i, d, +off, +bits, +flags}}: in.ixfield.rd(~H, ~io, in.fdesc(S.AmlNs.get(AmlWorld.ns(H, w), i), AmlWorld.ns(H, w)), in.fdesc(S.AmlNs.get(AmlWorld.ns(H, w), d), AmlWorld.ns(H, w)), in.ix.desc(AmlWorld.ns(H, w), off, bits, flags), w) case Some{S.AmlOBufField{l, +off, +bits}}: in.bf.rd(H, in.wide(H, w), w, in.read_data(H, w, l), off, bits) case Some{+obj}: Done{AmlRead{w, V.AmlObj{p, S.AmlObject.type(obj)}}} Uses (22): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Maybe https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.is_le https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Result https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=bend-osdev-acpi@0.1.1.0/aml_host.bend&name=AmlHostAns https://jend.leeeet.dev/definition.txt?path=bend-osdev-acpi@0.1.1.0/aml_host.bend&name=AmlHostOp https://jend.leeeet.dev/definition.txt?path=bend-osdev-acpi@0.1.1.0/aml_interp.bend&name=AmlRead https://jend.leeeet.dev/definition.txt?path=bend-osdev-acpi@0.1.1.0/aml_interp.bend&name=AmlWorld https://jend.leeeet.dev/definition.txt?path=bend-osdev-acpi@0.1.1.0/aml_interp.bend&name=AmlWorld.ns https://jend.leeeet.dev/definition.txt?path=bend-osdev-acpi@0.1.1.0/aml_interp.bend&name=in.bf.rd https://jend.leeeet.dev/definition.txt?path=bend-osdev-acpi@0.1.1.0/aml_interp.bend&name=in.desc https://jend.leeeet.dev/definition.txt?path=bend-osdev-acpi@0.1.1.0/aml_interp.bend&name=in.fdesc https://jend.leeeet.dev/definition.txt?path=bend-osdev-acpi@0.1.1.0/aml_interp.bend&name=in.field.rd https://jend.leeeet.dev/definition.txt?path=bend-osdev-acpi@0.1.1.0/aml_interp.bend&name=in.ix.desc https://jend.leeeet.dev/definition.txt?path=bend-osdev-acpi@0.1.1.0/aml_interp.bend&name=in.ixfield.rd https://jend.leeeet.dev/definition.txt?path=bend-osdev-acpi@0.1.1.0/aml_interp.bend&name=in.read_data https://jend.leeeet.dev/definition.txt?path=bend-osdev-acpi@0.1.1.0/aml_interp.bend&name=in.wide https://jend.leeeet.dev/definition.txt?path=bend-osdev-acpi@0.1.1.0/aml_ns.bend&name=AmlNs.get https://jend.leeeet.dev/definition.txt?path=bend-osdev-acpi@0.1.1.0/aml_ns.bend&name=AmlObject https://jend.leeeet.dev/definition.txt?path=bend-osdev-acpi@0.1.1.0/aml_ns.bend&name=AmlObject.type https://jend.leeeet.dev/definition.txt?path=bend-osdev-acpi@0.1.1.0/aml_value.bend&name=AmlValue https://jend.leeeet.dev/definition.txt?path=bend-osdev-acpi@0.1.1.0/error.bend&name=AcpiError