wip: bubbling

This commit is contained in:
Jonathan Kelley committed 2021-09-20 12:32:21 -04:00
1 parent c16b92ee7e
commit 7978a17419
12 files changed
+385 -363

No files matched your search

+6
View File
@@ -39,6 +39,7 @@ pub(crate) struct DiffStack<'bump> {
instructions: Vec<DiffInstruction<'bump>>,
nodes_created_stack: SmallVec<[usize; 10]>,
pub scope_stack: SmallVec<[ScopeId; 5]>,
pub element_id_stack: SmallVec<[ElementId; 5]>,
}
impl<'bump> DiffStack<'bump> {
@@ -47,6 +48,7 @@ impl<'bump> DiffStack<'bump> {
instructions: Vec::with_capacity(1000),
nodes_created_stack: smallvec![],
scope_stack: smallvec![],
element_id_stack: smallvec![],
}
}
@@ -80,6 +82,10 @@ impl<'bump> DiffStack<'bump> {
self.nodes_created_stack.push(count);
}
pub fn push_element_id(&mut self, id: ElementId) {
self.element_id_stack.push(id);
}
pub fn create_node(&mut self, node: &'bump VNode<'bump>, and: MountType<'bump>) {
self.nodes_created_stack.push(0);
self.instructions.push(DiffInstruction::Mount { and });