diff --git a/crates/plotnik-lib/src/bytecode/dump.rs b/crates/plotnik-lib/src/bytecode/dump.rs index 01fec032..7d3dc0d0 100644 --- a/crates/plotnik-lib/src/bytecode/dump.rs +++ b/crates/plotnik-lib/src/bytecode/dump.rs @@ -45,8 +45,6 @@ struct DumpContext { node_type_names: BTreeMap, /// Maps node field ID to name (linked mode only). node_field_names: BTreeMap, - /// Entrypoint names by index (for Return formatting). - entrypoint_names: Vec, /// All strings (for unlinked mode lookups). all_strings: Vec, } @@ -61,12 +59,10 @@ impl DumpContext { let node_fields = module.node_fields(); let mut step_labels = BTreeMap::new(); - let mut entrypoint_names = Vec::with_capacity(entrypoints.len()); for i in 0..entrypoints.len() { let ep = entrypoints.get(i); let name = strings.get(ep.name).to_string(); - step_labels.insert(ep.target.0, name.clone()); - entrypoint_names.push(name); + step_labels.insert(ep.target.0, name); } let mut node_type_names = BTreeMap::new(); @@ -92,7 +88,6 @@ impl DumpContext { step_labels, node_type_names, node_field_names, - entrypoint_names, all_strings, } } @@ -126,10 +121,6 @@ impl DumpContext { self.all_strings.get(id as usize).map(|s| s.as_str()) } } - - fn entrypoint_name(&self, index: usize) -> Option<&str> { - self.entrypoint_names.get(index).map(|s| s.as_str()) - } } fn dump_strings(out: &mut String, module: &Module) { @@ -367,6 +358,36 @@ fn instruction_step_count(instr: &Instruction) -> u16 { } } +// ============================================================================= +// Instruction Line Format +// ============================================================================= +// +// Each instruction line follows this column layout: +// +//