@@ -139,12 +139,14 @@ impl ExprCompiled {
139139 }
140140 }
141141 ExprCompiled :: Compr ( compr) => compr. mark_definitely_assigned_after ( bc) ,
142- ExprCompiled :: If ( box ( c, _t, _f) ) => {
142+ ExprCompiled :: If ( c_t_f) => {
143+ let ( c, _t, _f) = & * * c_t_f;
143144 // Condition is executed unconditionally, so we use it to mark definitely assigned.
144145 // But we don't know which of the branches will be executed.
145146 c. mark_definitely_assigned_after ( bc) ;
146147 }
147- ExprCompiled :: Slice ( box ( l, a, b, c) ) => {
148+ ExprCompiled :: Slice ( l_a_b_c) => {
149+ let ( l, a, b, c) = & * * l_a_b_c;
148150 l. mark_definitely_assigned_after ( bc) ;
149151 if let Some ( a) = a {
150152 a. mark_definitely_assigned_after ( bc) ;
@@ -159,17 +161,20 @@ impl ExprCompiled {
159161 ExprCompiled :: Builtin1 ( _op, expr) => {
160162 expr. mark_definitely_assigned_after ( bc) ;
161163 }
162- ExprCompiled :: LogicalBinOp ( _op, box ( a, b) ) => {
164+ ExprCompiled :: LogicalBinOp ( _op, a_b) => {
165+ let ( a, b) = & * * a_b;
163166 // `a` is executed unconditionally, but `b` is not,
164167 // so we mark only `a` as definitely assigned.
165168 a. mark_definitely_assigned_after ( bc) ;
166169 let _ = b;
167170 }
168- ExprCompiled :: Seq ( box ( a, b) ) => {
171+ ExprCompiled :: Seq ( a_b) => {
172+ let ( a, b) = & * * a_b;
169173 a. mark_definitely_assigned_after ( bc) ;
170174 b. mark_definitely_assigned_after ( bc) ;
171175 }
172- ExprCompiled :: Builtin2 ( _op, box ( a, b) ) => {
176+ ExprCompiled :: Builtin2 ( _op, a_b) => {
177+ let ( a, b) = & * * a_b;
173178 a. mark_definitely_assigned_after ( bc) ;
174179 b. mark_definitely_assigned_after ( bc) ;
175180 }
@@ -293,20 +298,20 @@ impl IrSpanned<ExprCompiled> {
293298
294299 pub ( crate ) fn write_bc ( & self , target : BcSlotOut , bc : & mut BcWriter ) {
295300 let span = self . span ;
296- match self . node {
301+ match & self . node {
297302 ExprCompiled :: Value ( v) => {
298- bc. write_const ( span, v, target) ;
303+ bc. write_const ( span, * v, target) ;
299304 }
300305 ExprCompiled :: Local ( slot) => {
301- bc. write_load_local ( span, slot, target) ;
306+ bc. write_load_local ( span, * slot, target) ;
302307 }
303308 ExprCompiled :: LocalCaptured ( slot) => {
304- bc. write_load_local_captured ( span, slot, target) ;
309+ bc. write_load_local_captured ( span, * slot, target) ;
305310 }
306311 ExprCompiled :: Module ( slot) => {
307- bc. write_instr :: < InstrLoadModule > ( span, ( slot, target) ) ;
312+ bc. write_instr :: < InstrLoadModule > ( span, ( * slot, target) ) ;
308313 }
309- ExprCompiled :: Tuple ( ref xs) => {
314+ ExprCompiled :: Tuple ( xs) => {
310315 write_exprs ( xs, bc, |xs, bc| {
311316 bc. write_instr :: < InstrTupleNPop > ( span, ( xs, target) ) ;
312317 } ) ;
@@ -325,7 +330,8 @@ impl IrSpanned<ExprCompiled> {
325330 }
326331 ExprCompiled :: Dict ( ref xs) => Self :: write_dict ( span, xs, target, bc) ,
327332 ExprCompiled :: Compr ( ref compr) => compr. write_bc ( span, target, bc) ,
328- ExprCompiled :: Slice ( box ( ref l, ref start, ref stop, ref step) ) => {
333+ ExprCompiled :: Slice ( l_start_stop_step) => {
334+ let ( l, start, stop, step) = & * * l_start_stop_step;
329335 l. write_bc_cb ( bc, |l, bc| {
330336 write_expr_opt ( start, bc, |start, bc| {
331337 write_expr_opt ( stop, bc, |stop, bc| {
@@ -336,10 +342,8 @@ impl IrSpanned<ExprCompiled> {
336342 } )
337343 } ) ;
338344 }
339- ExprCompiled :: Builtin1 ( Builtin1 :: Not , box ref expr) => {
340- Self :: write_not ( expr, target, bc)
341- }
342- ExprCompiled :: Builtin1 ( ref op, ref expr) => {
345+ ExprCompiled :: Builtin1 ( Builtin1 :: Not , expr) => Self :: write_not ( expr, target, bc) ,
346+ ExprCompiled :: Builtin1 ( op, expr) => {
343347 expr. write_bc_cb ( bc, |expr, bc| {
344348 let arg = ( expr, target) ;
345349 match op {
@@ -361,15 +365,17 @@ impl IrSpanned<ExprCompiled> {
361365 }
362366 } ) ;
363367 }
364- ExprCompiled :: If ( box ( ref cond, ref t, ref f) ) => {
368+ ExprCompiled :: If ( cond_t_f) => {
369+ let ( cond, t, f) = & * * cond_t_f;
365370 write_if_else (
366371 cond,
367372 |bc| t. write_bc ( target, bc) ,
368373 |bc| f. write_bc ( target, bc) ,
369374 bc,
370375 ) ;
371376 }
372- ExprCompiled :: LogicalBinOp ( op, box ( ref l, ref r) ) => {
377+ ExprCompiled :: LogicalBinOp ( op, l_r) => {
378+ let ( l, r) = & * * l_r;
373379 l. write_bc_cb ( bc, |l_slot, bc| {
374380 let maybe_not = match op {
375381 ExprLogicalBinOp :: And => MaybeNot :: Id ,
@@ -384,14 +390,17 @@ impl IrSpanned<ExprCompiled> {
384390 ) ;
385391 } ) ;
386392 }
387- ExprCompiled :: Seq ( box ( ref l, ref r) ) => {
393+ ExprCompiled :: Seq ( l_r) => {
394+ let ( l, r) = & * * l_r;
388395 l. write_bc_for_effect ( bc) ;
389396 r. write_bc ( target, bc) ;
390397 }
391- ExprCompiled :: Builtin2 ( Builtin2 :: Equals , box ( ref l, ref r) ) => {
398+ ExprCompiled :: Builtin2 ( Builtin2 :: Equals , l_r) => {
399+ let ( l, r) = & * * l_r;
392400 Self :: write_equals ( span, l, r, target, bc)
393401 }
394- ExprCompiled :: Builtin2 ( op, box ( ref l, ref r) ) => {
402+ ExprCompiled :: Builtin2 ( op, l_r) => {
403+ let ( l, r) = & * * l_r;
395404 write_n_exprs ( [ l, r] , bc, |[ l, r] , bc| {
396405 let arg = ( l, r, target) ;
397406 match op {
0 commit comments