File tree Expand file tree Collapse file tree
crates/cranelift/src/func_environ/stack_switching Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -255,11 +255,6 @@ impl FunctionStencil {
255255 self . get_dyn_scale ( dyn_ty)
256256 }
257257
258- /// Find the data for the given stack slot
259- pub fn get_stack_slot_data ( & self , stack_slot : StackSlot ) -> & StackSlotData {
260- & self . sized_stack_slots [ stack_slot]
261- }
262-
263258 /// Get a concrete `Type` from a user defined `DynamicType`.
264259 pub fn get_concrete_dynamic_ty ( & self , ty : DynamicType ) -> Option < Type > {
265260 self . dfg
Original file line number Diff line number Diff line change @@ -307,14 +307,13 @@ pub(crate) mod stack_switching_helpers {
307307 let required_size = required_capacity * entry_size;
308308
309309 match existing_slot {
310- Some ( slot) if builder. func . get_stack_slot_data ( slot) . size >= required_size => {
311- let slot_data = builder. func . get_stack_slot_data ( slot) . clone ( ) ;
310+ Some ( slot) if builder. func . sized_stack_slots [ slot] . size >= required_size => {
311+ let slot_data = & builder. func . sized_stack_slots [ slot] ;
312+ debug_assert ! ( align <= slot_data. align_shift) ;
313+ debug_assert_eq ! ( slot_data. kind, ExplicitSlot ) ;
312314 let existing_capacity = slot_data. size / entry_size;
313315
314316 let capacity_value = builder. ins ( ) . iconst ( I32 , i64:: from ( existing_capacity) ) ;
315- debug_assert ! ( align <= builder. func. get_stack_slot_data( slot) . align_shift) ;
316- debug_assert_eq ! ( builder. func. get_stack_slot_data( slot) . kind, ExplicitSlot ) ;
317-
318317 let existing_data = builder. ins ( ) . stack_addr ( env. pointer_type ( ) , slot, 0 ) ;
319318
320319 self . set_capacity ( env, builder, capacity_value) ;
You can’t perform that action at this time.
0 commit comments