@@ -13,11 +13,11 @@ use std::u32;
1313// physical DOM node that reflects `old` into something that reflects `new`.
1414//
1515// Upon entry to this function, the physical DOM node must be on the top of the
16−// stack:
16+// change list stack:
1717//
1818// [... node]
1919//
20−// The stack is in the same state when this function exits.
20+// The change list stack is in the same state when this function exits.
2121pub(crate) fn diff(
2222 cached_set: &CachedSet,
2323 change_list: &mut ChangeListBuilder,
@@ -122,11 +122,11 @@ pub(crate) fn diff(
122122
123123// Diff event listeners between `old` and `new`.
124124//
125−// The listeners' node must be on top of the stack:
125+// The listeners' node must be on top of the change list stack:
126126//
127127// [... node]
128128//
129−// The stack is left unchanged.
129+// The change list stack is left unchanged.
130130fn diff_listeners(
131131 change_list: &mut ChangeListBuilder,
132132 registry: &mut EventsRegistry,
@@ -165,11 +165,11 @@ fn diff_listeners(
165165
166166// Diff a node's attributes.
167167//
168−// The attributes' node must be on top of the stack:
168+// The attributes' node must be on top of the change list stack:
169169//
170170// [... node]
171171//
172−// The stack is left unchanged.
172+// The change list stack is left unchanged.
173173fn diff_attributes(change_list: &mut ChangeListBuilder, old: &[Attribute], new: &[Attribute]) {
174174 // Do O(n^2) passes to add/update and remove attributes, since
175175 // there are almost always very few attributes.
@@ -201,11 +201,12 @@ fn diff_attributes(change_list: &mut ChangeListBuilder, old: &[Attribute], new:
201201
202202// Diff the given set of old and new children.
203203//
204−// The parent must be on top of the stack when this function is entered:
204+// The parent must be on top of the change list stack when this function is
205+// entered:
205206//
206207// [... parent]
207208//
208−// The stack is in the same state when this function returns.
209+// the change list stack is in the same state when this function returns.
209210fn diff_children(
210211 cached_set: &CachedSet,
211212 change_list: &mut ChangeListBuilder,
@@ -262,11 +263,12 @@ fn diff_children(
262263//
263264// https://github.com/infernojs/inferno/blob/36fd96/packages/inferno/src/DOM/patching.ts#L530-L739
264265//
265−// When entering this function, the parent must be on top of the stack:
266+// When entering this function, the parent must be on top of the change list
267+// stack:
266268//
267269// [... parent]
268270//
269−// Upon exiting, the stack is in the same state.
271+// Upon exiting, the change list stack is in the same state.
270272fn diff_keyed_children(
271273 cached_set: &CachedSet,
272274 change_list: &mut ChangeListBuilder,
@@ -369,11 +371,11 @@ enum KeyedPrefixResult {
369371// Diff the prefix of children in `new` and `old` that share the same keys in
370372// the same order.
371373//
372−// Upon entry of this function, the stack must be:
374+// Upon entry of this function, the change list stack must be:
373375//
374376// [... parent]
375377//
376−// Upon exit, the stack is the same.
378+// Upon exit, the change list stack is the same.
377379fn diff_keyed_prefix(
378380 cached_set: &CachedSet,
379381 change_list: &mut ChangeListBuilder,
@@ -402,7 +404,7 @@ fn diff_keyed_prefix(
402404 diff(cached_set, change_list, registry, old, new, cached_roots);
403405 shared_prefix_count += 1;
404406
405− // At the end of the loop, the stack looks like
407+ // At the end of the loop, the change list stack looks like
406408 //
407409 // [... parent child_we_just_diffed]
408410 debug_assert!(pushed);
@@ -453,7 +455,7 @@ fn diff_keyed_prefix(
453455// this subsequence will remain in place, minimizing the number of DOM moves we
454456// will have to do.
455457//
456−// Upon entry to this function, the stack must be:
458+// Upon entry to this function, the change list stack must be:
457459//
458460// [... parent]
459461//
@@ -571,7 +573,7 @@ fn diff_keyed_middle(
571573 }
572574 }
573575
574− // Whether we have pushed a child onto the stack or not.
576+ // Whether we have pushed a child onto the change list stack or not.
575577 let mut pushed = false;
576578
577579 // Now iterate from the end of the new children back to the beginning,
@@ -660,15 +662,15 @@ fn diff_keyed_middle(
660662// segment's nodes must _not_ be members of the LIS (those nodes we will diff in
661663// place elsewhere, and we should not move them nor create them afresh).
662664//
663−// On entering this function, the stack has the parent and optionally the next
664−// sibling after this segment of children:
665+// On entering this function, the change list stack has the parent and
666+// optionally the next sibling after this segment of children:
665667//
666668// [... parent next_sibling] if *pushed == true
667669// [... parent] otherwise
668670//
669671// After exiting, if any children were moved or created, then `pushed` is set to
670−// true and the stack has the first child in this segment on top. Otherwise the
671−// stack is left as it was on entering.
672+// true and the change list stack has the first child in this segment on
673+// top. Otherwise the stack is left as it was on entering.
672674//
673675// [... parent child] if *pushed == true
674676// [... parent] otherwise
@@ -706,7 +708,7 @@ fn diff_and_move_or_create_segment(
706708 );
707709 }
708710
709− // At this point the stack can have one of two shapes.
711+ // At this point the change list stack can have one of two shapes.
710712 if *pushed {
711713 // [... parent next_child new_child]
712714 change_list.insert_before();
@@ -720,7 +722,7 @@ fn diff_and_move_or_create_segment(
720722 *pushed = true;
721723 }
722724
723− // At the end of each loop iteration, the stack looks like:
725+ // At the end of each loop iteration, the change list stack looks like:
724726 //
725727 // [... parent new_child]
726728 debug_assert!(*pushed);
@@ -729,11 +731,11 @@ fn diff_and_move_or_create_segment(
729731
730732// Diff the suffix of keyed children that share the same keys in the same order.
731733//
732−// The parent must be on the stack when we enter this function:
734+// The parent must be on the change list stack when we enter this function:
733735//
734736// [... parent]
735737//
736−// When this function exits, the stack remains the same.
738+// When this function exits, the change list stack remains the same.
737739fn diff_keyed_suffix(
738740 cached_set: &CachedSet,
739741 change_list: &mut ChangeListBuilder,
@@ -771,11 +773,12 @@ fn diff_keyed_suffix(
771773
772774// Diff children that are not keyed.
773775//
774−// The parent must be on the top of the stack when entering this function:
776+// The parent must be on the top of the change list stack when entering this
777+// function:
775778//
776779// [... parent]
777780//
778−// The stack is in the same state when this function returns.
781+// the change list stack is in the same state when this function returns.
779782fn diff_non_keyed_children(
780783 cached_set: &CachedSet,
781784 change_list: &mut ChangeListBuilder,
@@ -828,11 +831,11 @@ fn diff_non_keyed_children(
828831
829832// Create the given children and append them to the parent node.
830833//
831−// The parent node must currently be on top of the stack:
834+// The parent node must currently be on top of the change list stack:
832835//
833836// [... parent]
834837//
835−// When this function returns, the stack is in the same state.
838+// When this function returns, the change list stack is in the same state.
836839fn create_and_append_children(
837840 cached_set: &CachedSet,
838841 change_list: &mut ChangeListBuilder,
@@ -848,11 +851,11 @@ fn create_and_append_children(
848851
849852// Remove all of a node's children.
850853//
851−// The stack must have this shape upon entry to this function:
854+// The change list stack must have this shape upon entry to this function:
852855//
853856// [... parent]
854857//
855−// When this function returns, the stack is in the same state.
858+// When this function returns, the change list stack is in the same state.
856859fn remove_all_children(
857860 change_list: &mut ChangeListBuilder,
858861 registry: &mut EventsRegistry,
@@ -868,11 +871,11 @@ fn remove_all_children(
868871
869872// Remove the current child and all of its following siblings.
870873//
871−// The stack must have this shape upon entry to this function:
874+// The change list stack must have this shape upon entry to this function:
872875//
873876// [... parent child]
874877//
875−// After the function returns, the child is no longer on the stack:
878+// After the function returns, the child is no longer on the change list stack:
876879//
877880// [... parent]
878881fn remove_self_and_next_siblings(
@@ -888,11 +891,11 @@ fn remove_self_and_next_siblings(
888891
889892// Emit instructions to create the given virtual node.
890893//
891−// The stack may have any shape upon entering this function:
894+// The change list stack may have any shape upon entering this function:
892895//
893896// [...]
894897//
895−// When this function returns, the new node is on top of the stack:
898+// When this function returns, the new node is on top of the change list stack:
896899//
897900// [... node]
898901fn create(