@@ -12,7 +12,7 @@ use crate::{
1212 FrameInstPos , FrameStackShape , FrameStateSlotOffset , FrameTableDescriptorIndex , FrameValType ,
1313 FuncKey , WasmHeapTopType , WasmValType , prelude:: * ,
1414} ;
15- use object:: { LittleEndian , U32Bytes } ;
15+ use object:: { LittleEndian , U32 } ;
1616use std:: collections:: { HashMap , hash_map:: Entry } ;
1717
1818/// Builder for a stackslot descriptor.
@@ -230,19 +230,19 @@ impl FrameStateSlotBuilder {
230230pub struct FrameTableBuilder {
231231 /// (offset, length) pairs into `frame_descriptor_data`, indexed
232232 /// by frame descriptor number.
233- frame_descriptor_ranges : Vec < U32Bytes < LittleEndian > > ,
233+ frame_descriptor_ranges : Vec < U32 < LittleEndian > > ,
234234 frame_descriptor_data : Vec < u8 > ,
235235
236236 /// Offset from frame slot up to FP for each frame descriptor.
237- frame_descriptor_fp_offsets : Vec < U32Bytes < LittleEndian > > ,
237+ frame_descriptor_fp_offsets : Vec < U32 < LittleEndian > > ,
238238
239- progpoint_pcs : Vec < U32Bytes < LittleEndian > > ,
240- progpoint_descriptor_offsets : Vec < U32Bytes < LittleEndian > > ,
241- progpoint_descriptor_data : Vec < U32Bytes < LittleEndian > > ,
239+ progpoint_pcs : Vec < U32 < LittleEndian > > ,
240+ progpoint_descriptor_offsets : Vec < U32 < LittleEndian > > ,
241+ progpoint_descriptor_data : Vec < U32 < LittleEndian > > ,
242242
243- breakpoint_pcs : Vec < U32Bytes < LittleEndian > > ,
244- breakpoint_patch_offsets : Vec < U32Bytes < LittleEndian > > ,
245- breakpoint_patch_data_ends : Vec < U32Bytes < LittleEndian > > ,
243+ breakpoint_pcs : Vec < U32 < LittleEndian > > ,
244+ breakpoint_patch_offsets : Vec < U32 < LittleEndian > > ,
245+ breakpoint_patch_data_ends : Vec < U32 < LittleEndian > > ,
246246
247247 breakpoint_patch_data : Vec < u8 > ,
248248}
@@ -264,11 +264,11 @@ impl FrameTableBuilder {
264264 u32:: try_from ( self . frame_descriptor_fp_offsets . len ( ) ) . unwrap ( ) ,
265265 ) ;
266266 self . frame_descriptor_fp_offsets
267- . push ( U32Bytes :: new ( LittleEndian , slot_to_fp_offset) ) ;
267+ . push ( U32 :: new ( LittleEndian , slot_to_fp_offset) ) ;
268268 self . frame_descriptor_ranges
269- . push ( U32Bytes :: new ( LittleEndian , start) ) ;
269+ . push ( U32 :: new ( LittleEndian , start) ) ;
270270 self . frame_descriptor_ranges
271- . push ( U32Bytes :: new ( LittleEndian , end) ) ;
271+ . push ( U32 :: new ( LittleEndian , end) ) ;
272272
273273 index
274274 }
@@ -295,34 +295,32 @@ impl FrameTableBuilder {
295295 }
296296
297297 let start = u32:: try_from ( self . progpoint_descriptor_data . len ( ) ) . unwrap ( ) ;
298- self . progpoint_pcs
299- . push ( U32Bytes :: new ( LittleEndian , pc_and_pos) ) ;
298+ self . progpoint_pcs . push ( U32 :: new ( LittleEndian , pc_and_pos) ) ;
300299 self . progpoint_descriptor_offsets
301- . push ( U32Bytes :: new ( LittleEndian , start) ) ;
300+ . push ( U32 :: new ( LittleEndian , start) ) ;
302301
303302 for ( i, & ( wasm_pc, frame_descriptor, stack_shape) ) in frames. iter ( ) . enumerate ( ) {
304303 debug_assert ! ( wasm_pc < 0x8000_0000 ) ;
305304 let not_last = i < ( frames. len ( ) - 1 ) ;
306305 let wasm_pc = wasm_pc | if not_last { 0x8000_0000 } else { 0 } ;
307306 self . progpoint_descriptor_data
308- . push ( U32Bytes :: new ( LittleEndian , wasm_pc) ) ;
307+ . push ( U32 :: new ( LittleEndian , wasm_pc) ) ;
309308 self . progpoint_descriptor_data
310- . push ( U32Bytes :: new ( LittleEndian , frame_descriptor. 0 ) ) ;
309+ . push ( U32 :: new ( LittleEndian , frame_descriptor. 0 ) ) ;
311310 self . progpoint_descriptor_data
312- . push ( U32Bytes :: new ( LittleEndian , stack_shape. 0 ) ) ;
311+ . push ( U32 :: new ( LittleEndian , stack_shape. 0 ) ) ;
313312 }
314313 }
315314
316315 /// Add one breakpoint patch.
317316 pub fn add_breakpoint_patch ( & mut self , wasm_pc : u32 , patch_start_native_pc : u32 , patch : & [ u8 ] ) {
318- self . breakpoint_pcs
319- . push ( U32Bytes :: new ( LittleEndian , wasm_pc) ) ;
317+ self . breakpoint_pcs . push ( U32 :: new ( LittleEndian , wasm_pc) ) ;
320318 self . breakpoint_patch_offsets
321- . push ( U32Bytes :: new ( LittleEndian , patch_start_native_pc) ) ;
319+ . push ( U32 :: new ( LittleEndian , patch_start_native_pc) ) ;
322320 self . breakpoint_patch_data . extend ( patch. iter ( ) . cloned ( ) ) ;
323321 let end = u32:: try_from ( self . breakpoint_patch_data . len ( ) ) . unwrap ( ) ;
324322 self . breakpoint_patch_data_ends
325- . push ( U32Bytes :: new ( LittleEndian , end) ) ;
323+ . push ( U32 :: new ( LittleEndian , end) ) ;
326324 }
327325
328326 /// Serialize the framd-table data section, taking a closure to
0 commit comments