MCPcopy Create free account
hub / github.com/bytecodealliance/wasmtime / visit_seq

Method visit_seq

cranelift/codegen/src/ir/layout.rs:732–759  ·  view source on GitHub ↗
(self, mut access: M)

Source from the content-addressed store, hash-verified

730 }
731
732 fn visit_seq<M>(self, mut access: M) -> Result<Self::Value, M::Error>
733 where
734 M: SeqAccess<'de>,
735 {
736 let mut layout = Layout::new();
737
738 while let Some(block) = access.next_element::<Block>()? {
739 layout.append_block(block);
740
741 let cold = access
742 .next_element::<bool>()?
743 .ok_or_else(|| Error::missing_field("cold"))?;
744 layout.blocks[block].cold = cold;
745
746 let count = access
747 .next_element::<u32>()?
748 .ok_or_else(|| Error::missing_field("count"))?;
749
750 for _ in 0..count {
751 let inst = access
752 .next_element::<Inst>()?
753 .ok_or_else(|| Error::missing_field("inst"))?;
754 layout.append_inst(inst, block);
755 }
756 }
757
758 Ok(layout)
759 }
760 }
761}
762

Callers

nothing calls this directly

Calls 4

OkFunction · 0.85
append_blockMethod · 0.80
append_instMethod · 0.80
newFunction · 0.50

Tested by

no test coverage detected