@@ -138,43 +138,43 @@ impl<N: Idx> LivenessValues<N> {
138138
139139 /// Adds the given element to the value for the given region. Returns whether
140140 /// the element is newly added (i.e., was not already present).
141- pub ( crate ) fn add_element ( & mut self , row : N , location : Location ) -> bool {
142- debug ! ( "LivenessValues::add(r ={:?}, location={:?})" , row , location) ;
141+ pub ( crate ) fn add_element ( & mut self , region : N , location : Location ) -> bool {
142+ debug ! ( "LivenessValues::add_element(region ={:?}, location={:?})" , region , location) ;
143143 let index = self . elements . point_from_location ( location) ;
144- self . points . insert ( row , index)
144+ self . points . insert ( region , index)
145145 }
146146
147147 /// Adds all the elements in the given bit array into the given
148148 /// region. Returns whether any of them are newly added.
149- pub ( crate ) fn add_elements ( & mut self , row : N , locations : & IntervalSet < PointIndex > ) -> bool {
150- debug ! ( "LivenessValues::add_elements(row ={:?}, locations={:?})" , row , locations) ;
151- self . points . union_row ( row , locations)
149+ pub ( crate ) fn add_elements ( & mut self , region : N , locations : & IntervalSet < PointIndex > ) -> bool {
150+ debug ! ( "LivenessValues::add_elements(region ={:?}, locations={:?})" , region , locations) ;
151+ self . points . union_row ( region , locations)
152152 }
153153
154- /// Adds all the control-flow points to the values for `r` .
155- pub ( crate ) fn add_all_points ( & mut self , row : N ) {
156- self . points . insert_all_into_row ( row ) ;
154+ /// Record `region` as being live at all the control-flow points.
155+ pub ( crate ) fn add_all_points ( & mut self , region : N ) {
156+ self . points . insert_all_into_row ( region ) ;
157157 }
158158
159- /// Returns `true` if the region `r ` contains the given element.
160- pub ( crate ) fn contains ( & self , row : N , location : Location ) -> bool {
159+ /// Returns `true` if the region `region ` contains the given element.
160+ pub ( crate ) fn contains ( & self , region : N , location : Location ) -> bool {
161161 let index = self . elements . point_from_location ( location) ;
162- self . points . row ( row ) . is_some_and ( |r| r. contains ( index) )
162+ self . points . row ( region ) . is_some_and ( |r| r. contains ( index) )
163163 }
164164
165- /// Returns an iterator of all the elements contained by the region `r`
166- pub ( crate ) fn get_elements ( & self , row : N ) -> impl Iterator < Item = Location > + ' _ {
165+ /// Returns an iterator of all the elements contained by ` region`.
166+ pub ( crate ) fn get_elements ( & self , region : N ) -> impl Iterator < Item = Location > + ' _ {
167167 self . points
168- . row ( row )
168+ . row ( region )
169169 . into_iter ( )
170170 . flat_map ( |set| set. iter ( ) )
171171 . take_while ( move |& p| self . elements . point_in_range ( p) )
172172 . map ( move |p| self . elements . to_location ( p) )
173173 }
174174
175175 /// Returns a "pretty" string value of the region. Meant for debugging.
176- pub ( crate ) fn region_value_str ( & self , r : N ) -> String {
177- region_value_str ( self . get_elements ( r ) . map ( RegionElement :: Location ) )
176+ pub ( crate ) fn region_value_str ( & self , region : N ) -> String {
177+ region_value_str ( self . get_elements ( region ) . map ( RegionElement :: Location ) )
178178 }
179179
180180 #[ inline]
0 commit comments