pub type DebugSourceNode = SourceNode<MastNodeId, DebugSourceNodeId>;Expand description
A source/debug occurrence for code that produced an executable MAST node.
The exec_node field points into the package MastForest after executable
MAST reduction and deduplication. More than one DebugSourceNode may point at the same
exec_node: for example, two source procedures can compile to the same MAST root while still
carrying different source spans, assembly-op rows, or debug-variable rows. Consumers should
treat the DebugSourceNodeId as the identity of the source occurrence and use exec_node
only to find the executable node it describes.
Assembly-operation, variable, and inline-call rows are stored directly on each source occurrence.
Aliased Type§
pub struct DebugSourceNode {
pub exec_node: MastNodeId,
pub children: Vec<DebugSourceNodeId>,
pub op_start: u32,
pub op_end: u32,
pub asm_ops: Vec<DebugSourceAsmOp>,
pub debug_vars: Vec<DebugSourceVar>,
pub inline_calls: Vec<DebugSourceInlineCall>,
}Fields§
§exec_node: MastNodeIdThe executable MAST node represented by this source occurrence.
children: Vec<DebugSourceNodeId>Child source occurrences, in the same order as the executable node’s children.
op_start: u32Inclusive start operation index in the executable node.
op_end: u32Exclusive end operation index in the executable node.
asm_ops: Vec<DebugSourceAsmOp>Operation metadata for operations attached to this node
debug_vars: Vec<DebugSourceVar>Debug variable metadata for operations attached to this node
inline_calls: Vec<DebugSourceInlineCall>Inline-call metadata for operations attached to this node.
A zero-width external occurrence may carry rows at its start index. Those rows describe the inline chain inherited by the resolved target rather than an operation on the external node.
Trait Implementations§
Source§impl Deserializable for DebugSourceNode
Available on little-endian only.
impl Deserializable for DebugSourceNode
Source§fn read_from<R: ByteReader>(
source: &mut R,
) -> Result<Self, DeserializationError>
fn read_from<R: ByteReader>( source: &mut R, ) -> Result<Self, DeserializationError>
source, attempts to deserialize these bytes
into Self, and returns the result. Read moreSource§fn min_serialized_size() -> usize
fn min_serialized_size() -> usize
Source§fn read_from_bytes(bytes: &[u8]) -> Result<Self, DeserializationError>
fn read_from_bytes(bytes: &[u8]) -> Result<Self, DeserializationError>
Source§fn read_from_bytes_with_budget(
bytes: &[u8],
budget: usize,
) -> Result<Self, DeserializationError>
fn read_from_bytes_with_budget( bytes: &[u8], budget: usize, ) -> Result<Self, DeserializationError>
Self from bytes with a byte budget limit. Read moreSource§impl Serializable for DebugSourceNode
Available on little-endian only.Fixed-size child and assembly-op tables use the same certified row format as
PackageDebugInfo.
impl Serializable for DebugSourceNode
Fixed-size child and assembly-op tables use the same certified row format as
PackageDebugInfo.
Source§fn write_into<W: ByteWriter>(&self, target: &mut W)
fn write_into<W: ByteWriter>(&self, target: &mut W)
self into bytes and writes these bytes into the target.