@@ -66,12 +66,12 @@ impl Direction for Backward {
6666 {
6767 let terminator = block_data. terminator ( ) ;
6868 let location = Location { block, statement_index : block_data. statements . len ( ) } ;
69- analysis. apply_before_terminator_effect ( state, terminator, location) ;
70- analysis. apply_terminator_effect ( state, terminator, location) ;
69+ analysis. apply_early_terminator_effect ( state, terminator, location) ;
70+ analysis. apply_primary_terminator_effect ( state, terminator, location) ;
7171 for ( statement_index, statement) in block_data. statements . iter ( ) . enumerate ( ) . rev ( ) {
7272 let location = Location { block, statement_index } ;
73- analysis. apply_before_statement_effect ( state, statement, location) ;
74- analysis. apply_statement_effect ( state, statement, location) ;
73+ analysis. apply_early_statement_effect ( state, statement, location) ;
74+ analysis. apply_primary_statement_effect ( state, statement, location) ;
7575 }
7676
7777 let exit_state = state;
@@ -159,14 +159,14 @@ impl Direction for Backward {
159159 let location = Location { block, statement_index : from. statement_index } ;
160160 let terminator = block_data. terminator ( ) ;
161161
162- if from. effect == Effect :: Before {
163- analysis. apply_before_terminator_effect ( state, terminator, location) ;
164- if to == Effect :: Before . at_index ( terminator_index) {
162+ if from. effect == Effect :: Early {
163+ analysis. apply_early_terminator_effect ( state, terminator, location) ;
164+ if to == Effect :: Early . at_index ( terminator_index) {
165165 return ;
166166 }
167167 }
168168
169- analysis. apply_terminator_effect ( state, terminator, location) ;
169+ analysis. apply_primary_terminator_effect ( state, terminator, location) ;
170170 if to == Effect :: Primary . at_index ( terminator_index) {
171171 return ;
172172 }
@@ -180,37 +180,37 @@ impl Direction for Backward {
180180 let location = Location { block, statement_index : from. statement_index } ;
181181 let statement = & block_data. statements [ from. statement_index ] ;
182182
183- analysis. apply_statement_effect ( state, statement, location) ;
183+ analysis. apply_primary_statement_effect ( state, statement, location) ;
184184 if to == Effect :: Primary . at_index ( from. statement_index ) {
185185 return ;
186186 }
187187
188188 from. statement_index - 1
189189 }
190190
191- Effect :: Before => from. statement_index ,
191+ Effect :: Early => from. statement_index ,
192192 } ;
193193
194194 // Handle all statements between `first_unapplied_idx` and `to.statement_index`.
195195
196196 for statement_index in ( to. statement_index ..next_effect) . rev ( ) . map ( |i| i + 1 ) {
197197 let location = Location { block, statement_index } ;
198198 let statement = & block_data. statements [ statement_index] ;
199- analysis. apply_before_statement_effect ( state, statement, location) ;
200- analysis. apply_statement_effect ( state, statement, location) ;
199+ analysis. apply_early_statement_effect ( state, statement, location) ;
200+ analysis. apply_primary_statement_effect ( state, statement, location) ;
201201 }
202202
203203 // Handle the statement at `to`.
204204
205205 let location = Location { block, statement_index : to. statement_index } ;
206206 let statement = & block_data. statements [ to. statement_index ] ;
207- analysis. apply_before_statement_effect ( state, statement, location) ;
207+ analysis. apply_early_statement_effect ( state, statement, location) ;
208208
209- if to. effect == Effect :: Before {
209+ if to. effect == Effect :: Early {
210210 return ;
211211 }
212212
213- analysis. apply_statement_effect ( state, statement, location) ;
213+ analysis. apply_primary_statement_effect ( state, statement, location) ;
214214 }
215215
216216 fn visit_results_in_block < ' mir , ' tcx , A > (
@@ -228,17 +228,17 @@ impl Direction for Backward {
228228
229229 let loc = Location { block, statement_index : block_data. statements . len ( ) } ;
230230 let term = block_data. terminator ( ) ;
231- results. analysis . apply_before_terminator_effect ( state, term, loc) ;
232- vis. visit_terminator_before_primary_effect ( results, state, term, loc) ;
233- results. analysis . apply_terminator_effect ( state, term, loc) ;
234- vis. visit_terminator_after_primary_effect ( results, state, term, loc) ;
231+ results. analysis . apply_early_terminator_effect ( state, term, loc) ;
232+ vis. visit_after_early_terminator_effect ( results, state, term, loc) ;
233+ results. analysis . apply_primary_terminator_effect ( state, term, loc) ;
234+ vis. visit_after_primary_terminator_effect ( results, state, term, loc) ;
235235
236236 for ( statement_index, stmt) in block_data. statements . iter ( ) . enumerate ( ) . rev ( ) {
237237 let loc = Location { block, statement_index } ;
238- results. analysis . apply_before_statement_effect ( state, stmt, loc) ;
239- vis. visit_statement_before_primary_effect ( results, state, stmt, loc) ;
240- results. analysis . apply_statement_effect ( state, stmt, loc) ;
241- vis. visit_statement_after_primary_effect ( results, state, stmt, loc) ;
238+ results. analysis . apply_early_statement_effect ( state, stmt, loc) ;
239+ vis. visit_after_early_statement_effect ( results, state, stmt, loc) ;
240+ results. analysis . apply_primary_statement_effect ( state, stmt, loc) ;
241+ vis. visit_after_primary_statement_effect ( results, state, stmt, loc) ;
242242 }
243243
244244 vis. visit_block_start ( state) ;
@@ -294,13 +294,13 @@ impl Direction for Forward {
294294 {
295295 for ( statement_index, statement) in block_data. statements . iter ( ) . enumerate ( ) {
296296 let location = Location { block, statement_index } ;
297- analysis. apply_before_statement_effect ( state, statement, location) ;
298- analysis. apply_statement_effect ( state, statement, location) ;
297+ analysis. apply_early_statement_effect ( state, statement, location) ;
298+ analysis. apply_primary_statement_effect ( state, statement, location) ;
299299 }
300300 let terminator = block_data. terminator ( ) ;
301301 let location = Location { block, statement_index : block_data. statements . len ( ) } ;
302- analysis. apply_before_terminator_effect ( state, terminator, location) ;
303- let edges = analysis. apply_terminator_effect ( state, terminator, location) ;
302+ analysis. apply_early_terminator_effect ( state, terminator, location) ;
303+ let edges = analysis. apply_primary_terminator_effect ( state, terminator, location) ;
304304
305305 let exit_state = state;
306306 match edges {
@@ -368,21 +368,21 @@ impl Direction for Forward {
368368 // after effect, do so now and start the loop below from the next statement.
369369
370370 let first_unapplied_index = match from. effect {
371- Effect :: Before => from. statement_index ,
371+ Effect :: Early => from. statement_index ,
372372
373373 Effect :: Primary if from. statement_index == terminator_index => {
374374 debug_assert_eq ! ( from, to) ;
375375
376376 let location = Location { block, statement_index : terminator_index } ;
377377 let terminator = block_data. terminator ( ) ;
378- analysis. apply_terminator_effect ( state, terminator, location) ;
378+ analysis. apply_primary_terminator_effect ( state, terminator, location) ;
379379 return ;
380380 }
381381
382382 Effect :: Primary => {
383383 let location = Location { block, statement_index : from. statement_index } ;
384384 let statement = & block_data. statements [ from. statement_index ] ;
385- analysis. apply_statement_effect ( state, statement, location) ;
385+ analysis. apply_primary_statement_effect ( state, statement, location) ;
386386
387387 // If we only needed to apply the after effect of the statement at `idx`, we are
388388 // done.
@@ -399,26 +399,26 @@ impl Direction for Forward {
399399 for statement_index in first_unapplied_index..to. statement_index {
400400 let location = Location { block, statement_index } ;
401401 let statement = & block_data. statements [ statement_index] ;
402- analysis. apply_before_statement_effect ( state, statement, location) ;
403- analysis. apply_statement_effect ( state, statement, location) ;
402+ analysis. apply_early_statement_effect ( state, statement, location) ;
403+ analysis. apply_primary_statement_effect ( state, statement, location) ;
404404 }
405405
406406 // Handle the statement or terminator at `to`.
407407
408408 let location = Location { block, statement_index : to. statement_index } ;
409409 if to. statement_index == terminator_index {
410410 let terminator = block_data. terminator ( ) ;
411- analysis. apply_before_terminator_effect ( state, terminator, location) ;
411+ analysis. apply_early_terminator_effect ( state, terminator, location) ;
412412
413413 if to. effect == Effect :: Primary {
414- analysis. apply_terminator_effect ( state, terminator, location) ;
414+ analysis. apply_primary_terminator_effect ( state, terminator, location) ;
415415 }
416416 } else {
417417 let statement = & block_data. statements [ to. statement_index ] ;
418- analysis. apply_before_statement_effect ( state, statement, location) ;
418+ analysis. apply_early_statement_effect ( state, statement, location) ;
419419
420420 if to. effect == Effect :: Primary {
421- analysis. apply_statement_effect ( state, statement, location) ;
421+ analysis. apply_primary_statement_effect ( state, statement, location) ;
422422 }
423423 }
424424 }
@@ -438,18 +438,18 @@ impl Direction for Forward {
438438
439439 for ( statement_index, stmt) in block_data. statements . iter ( ) . enumerate ( ) {
440440 let loc = Location { block, statement_index } ;
441- results. analysis . apply_before_statement_effect ( state, stmt, loc) ;
442- vis. visit_statement_before_primary_effect ( results, state, stmt, loc) ;
443- results. analysis . apply_statement_effect ( state, stmt, loc) ;
444- vis. visit_statement_after_primary_effect ( results, state, stmt, loc) ;
441+ results. analysis . apply_early_statement_effect ( state, stmt, loc) ;
442+ vis. visit_after_early_statement_effect ( results, state, stmt, loc) ;
443+ results. analysis . apply_primary_statement_effect ( state, stmt, loc) ;
444+ vis. visit_after_primary_statement_effect ( results, state, stmt, loc) ;
445445 }
446446
447447 let loc = Location { block, statement_index : block_data. statements . len ( ) } ;
448448 let term = block_data. terminator ( ) ;
449- results. analysis . apply_before_terminator_effect ( state, term, loc) ;
450- vis. visit_terminator_before_primary_effect ( results, state, term, loc) ;
451- results. analysis . apply_terminator_effect ( state, term, loc) ;
452- vis. visit_terminator_after_primary_effect ( results, state, term, loc) ;
449+ results. analysis . apply_early_terminator_effect ( state, term, loc) ;
450+ vis. visit_after_early_terminator_effect ( results, state, term, loc) ;
451+ results. analysis . apply_primary_terminator_effect ( state, term, loc) ;
452+ vis. visit_after_primary_terminator_effect ( results, state, term, loc) ;
453453
454454 vis. visit_block_end ( state) ;
455455 }
0 commit comments