@@ -215,25 +215,25 @@ template<Lattice L> class StackLattice {
215215 }
216216 }
217217
218- // When taking the LUB , we take the LUBs of the elements of each stack
219- // starting from the top of the stack. So, LUB ([b, a], [b', a']) is
220- // [LUB(b, b '), LUB (a, a')]. If one stack is higher than the other,
221- // the bottom of the higher stack will be kept, while the LUB of the
222- // corresponding tops of each stack will be taken. For instance,
223- // LUB([d, c, b, a], [b', a']) is [d, c, LUB(b, b'), LUB (a, a')].
218+ // When taking the join , we take the joins of the elements of each stack
219+ // starting from the top of the stack. So, join ([b, a], [b', a']) is [join(b,
220+ // b '), join (a, a')]. If one stack is higher than the other, the bottom of the
221+ // higher stack will be kept, while the join of the corresponding tops of each
222+ // stack will be taken. For instance, join([d, c, b, a], [b', a']) is [d, c ,
223+ // join( b, b'), join (a, a')].
224224 //
225- // We start at the top because it makes taking the LUB of stacks with
226- // different scope easier, as mentioned at the top of the file. It also
227- // fits with the conception of the stack starting at the top and having
228- // an infinite bottom, which allows stacks of different height and scope
229- // to be easily joined.
230- bool join (Element& self , const Element& other ) const noexcept {
225+ // We start at the top because it makes taking the join of stacks with
226+ // different scope easier, as mentioned at the top of the file. It also fits
227+ // with the conception of the stack starting at the top and having an infinite
228+ // bottom, which allows stacks of different height and scope to be easily
229+ // joined.
230+ bool join (Element& joinee , const Element& joiner ) const noexcept {
231231 // Top element cases, since top elements don't actually have the stack
232232 // value.
233- if (self .isTop ()) {
233+ if (joinee .isTop ()) {
234234 return false ;
235- } else if (other .isTop ()) {
236- self .stackValue .reset ();
235+ } else if (joiner .isTop ()) {
236+ joinee .stackValue .reset ();
237237 return true ;
238238 }
239239
@@ -242,18 +242,18 @@ template<Lattice L> class StackLattice {
242242 // Merge the shorter height stack with the top of the longer height
243243 // stack. We do this by taking the LUB of each pair of matching elements
244244 // from both stacks.
245- auto selfIt = self .stackValue ->rbegin ();
246- auto otherIt = other .stackValue ->crbegin ();
247- for (; selfIt != self .stackValue ->rend () &&
248- otherIt != other .stackValue ->crend ();
249- ++selfIt , ++otherIt ) {
250- modified |= lattice.join (*selfIt , *otherIt );
245+ auto joineeIt = joinee .stackValue ->rbegin ();
246+ auto joinerIt = joiner .stackValue ->crbegin ();
247+ for (; joineeIt != joinee .stackValue ->rend () &&
248+ joinerIt != joiner .stackValue ->crend ();
249+ ++joineeIt , ++joinerIt ) {
250+ modified |= lattice.join (*joineeIt , *joinerIt );
251251 }
252252
253- // If the other stack is higher, append the bottom of it to our current
253+ // If the joiner stack is higher, append the bottom of it to our current
254254 // stack.
255- for (; otherIt != other .stackValue ->crend (); ++otherIt ) {
256- self .stackValue ->push_front (*otherIt );
255+ for (; joinerIt != joiner .stackValue ->crend (); ++joinerIt ) {
256+ joinee .stackValue ->push_front (*joinerIt );
257257 modified = true ;
258258 }
259259
0 commit comments