@@ -26,7 +26,6 @@ pub enum InstructionType {
2626 PrintStringIndex = 0x01 , // print "string" (using string table index)
2727 PrintVariableIndex = 0x02 , // print variable (using variable name index)
2828 PrintComplexVariable = 0x03 , // print complex variable (with full type info)
29- PrintFormat = 0x04 , // print "format {} {}", var1, var2 (formatted print)
3029 PrintComplexFormat = 0x05 , // print with complex variables in format args
3130 Backtrace = 0x10 , // backtrace instruction
3231
@@ -88,18 +87,6 @@ pub struct PrintComplexVariableData {
8887 // Followed by access_path (UTF-8 string) then variable data
8988}
9089
91- /// Format print instruction data
92- #[ repr( C , packed) ]
93- #[ derive( Debug , Clone , Copy , FromBytes , KnownLayout , Immutable , Unaligned ) ]
94- pub struct PrintFormatData {
95- pub format_string_index : u16 , // Index into string table for format string
96- pub arg_count : u8 , // Number of arguments
97- pub reserved : u8 , // Padding for alignment
98- // Followed by argument data in struct order (8 bytes header):
99- // [var_name_index:u16, type_encoding:u8, data_len:u16, type_index:u16, status:u8, data:bytes] * arg_count
100- // Note: In fast path (script variables/literals), status is always 0 (VariableStatus::Ok)
101- }
102-
10390/// Complex format print instruction data (with full type info)
10491#[ repr( C , packed) ]
10592#[ derive( Debug , Clone , Copy , FromBytes , KnownLayout , Immutable , Unaligned ) ]
@@ -113,7 +100,7 @@ pub struct PrintComplexFormatData {
113100}
114101
115102// Note: historical PrintVariableError has been removed; per-variable errors
116- // are carried via status in PrintVariableIndex/Format/ ComplexFormat.
103+ // are carried via status in PrintVariableIndex/ComplexFormat.
117104
118105/// Backtrace instruction data
119106#[ repr( C , packed) ]
@@ -146,10 +133,6 @@ pub enum Instruction {
146133 type_index : u16 , // Index into type table (new field)
147134 data : Vec < u8 > ,
148135 } ,
149- PrintFormat {
150- format_string_index : u16 ,
151- variables : Vec < VariableData > ,
152- } ,
153136 Backtrace {
154137 depth : u8 ,
155138 flags : u8 ,
@@ -161,22 +144,12 @@ pub enum Instruction {
161144 } ,
162145}
163146
164- /// Variable data for PrintFormat instruction
165- #[ derive( Debug , Clone , Serialize , Deserialize ) ]
166- pub struct VariableData {
167- pub var_name_index : u16 ,
168- pub type_encoding : TypeKind ,
169- pub type_index : u16 , // Index into type table (new field)
170- pub data : Vec < u8 > ,
171- }
172-
173147impl Instruction {
174148 /// Get the instruction type
175149 pub fn instruction_type ( & self ) -> InstructionType {
176150 match self {
177151 Instruction :: PrintStringIndex { .. } => InstructionType :: PrintStringIndex ,
178152 Instruction :: PrintVariableIndex { .. } => InstructionType :: PrintVariableIndex ,
179- Instruction :: PrintFormat { .. } => InstructionType :: PrintFormat ,
180153 Instruction :: Backtrace { .. } => InstructionType :: Backtrace ,
181154 Instruction :: EndInstruction { .. } => InstructionType :: EndInstruction ,
182155 }
@@ -191,12 +164,6 @@ mod tests {
191164 fn test_instruction_types ( ) {
192165 let inst1 = Instruction :: PrintStringIndex { string_index : 0 } ;
193166 assert_eq ! ( inst1. instruction_type( ) , InstructionType :: PrintStringIndex ) ;
194-
195- let inst2 = Instruction :: PrintFormat {
196- format_string_index : 0 ,
197- variables : vec ! [ ] ,
198- } ;
199- assert_eq ! ( inst2. instruction_type( ) , InstructionType :: PrintFormat ) ;
200167 }
201168
202169 #[ test]
0 commit comments