Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set return pointer when reusing current tree #20212

Merged
merged 2 commits into from
Nov 10, 2020

Commits on Nov 10, 2020

  1. Do not fix return pointers during commit phase

    In the commit phase, we should be able to assume that the `return`
    pointers in the just-completed tree are consistent. The render phase
    should be responsible for ensuring these are always correct.
    
    I've removed the `return` pointer assignments from the render phase
    traversal logic. This isn't all of them, only the ones added recently
    during the effects refactor. The other ones have been around longer so
    I'll leave those for a later clean up.
    
    This breaks a few SuspenseList tests; I'll fix in the next commit.
    acdlite committed Nov 10, 2020
    Configuration menu
    Copy the full SHA
    45c295e View commit details
    Browse the repository at this point in the history
  2. Set return pointer when reusing current tree

    We always set the return pointer on freshly cloned, work-in-progress
    fibers. However, we were neglecting to set them on trees that are reused
    from current.
    
    I fixed this in the same path of the complete phase where we reset the
    fiber flags.
    
    This is a code smell because it assumes the commit phase is never
    concurrent with the render phase. Our eventual goal is to make fibers a
    lock free data structure.
    
    Will address further during refactor to alternate model.
    acdlite committed Nov 10, 2020
    Configuration menu
    Copy the full SHA
    858c8a9 View commit details
    Browse the repository at this point in the history