Skip to content

Commit

Permalink
Combine deletion phase into single recursive function
Browse files Browse the repository at this point in the history
Similar to the previous step, this converts the deletion phase into
a single recursive function. Although there's less code, this one is
a bit trickier because it's already contains some stack-like logic
for tracking the nearest host parent. But instead of using the actual
stack, it repeatedly searches up the fiber return path to find the
nearest host parent.

Instead, I've changed it to track the nearest host parent on the
JS stack.

(We still search up the return path once, to set the initial host parent
right before entering a deleted tree. As a follow up, we can instead
push this to the stack as we traverse during the main mutation phase.)
  • Loading branch information
acdlite committed Apr 8, 2022
1 parent 27a7269 commit f36fccf
Show file tree
Hide file tree
Showing 2 changed files with 528 additions and 536 deletions.
Loading

0 comments on commit f36fccf

Please sign in to comment.