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

[compiler] Recompute values every time #29657

Merged
merged 6 commits into from
May 31, 2024

Commits on May 29, 2024

  1. [compiler] Recompute values every time

    Summary: This PR expands the analysis from the previous in the stack in order to also capture when a value can incorrectly change within a single render, rather than just changing between two renders. In the case where dependencies have changed and so a new value is being computed, we now compute the value twice and compare the results. This would, for example, catch when we call Math.random() in render.
    
    The generated code is a little convoluted, because we don't want to have to traverse the generated code and substitute variable names with new ones. Instead, we save the initial value to the cache as normal, then run the computation block again and compare the resulting values to the cached ones. Then, to make sure that the cached values are identical to the computed ones, we reassign the cached values into the output variables.
    
    [ghstack-poisoned]
    mvitousek committed May 29, 2024
    Configuration menu
    Copy the full SHA
    484930e View commit details
    Browse the repository at this point in the history

Commits on May 30, 2024

  1. Update on "[compiler] Recompute values every time"

    Summary: This PR expands the analysis from the previous in the stack in order to also capture when a value can incorrectly change within a single render, rather than just changing between two renders. In the case where dependencies have changed and so a new value is being computed, we now compute the value twice and compare the results. This would, for example, catch when we call Math.random() in render.
    
    The generated code is a little convoluted, because we don't want to have to traverse the generated code and substitute variable names with new ones. Instead, we save the initial value to the cache as normal, then run the computation block again and compare the resulting values to the cached ones. Then, to make sure that the cached values are identical to the computed ones, we reassign the cached values into the output variables.
    
    [ghstack-poisoned]
    mvitousek committed May 30, 2024
    Configuration menu
    Copy the full SHA
    b9436d8 View commit details
    Browse the repository at this point in the history

Commits on May 31, 2024

  1. Update on "[compiler] Recompute values every time"

    Summary: This PR expands the analysis from the previous in the stack in order to also capture when a value can incorrectly change within a single render, rather than just changing between two renders. In the case where dependencies have changed and so a new value is being computed, we now compute the value twice and compare the results. This would, for example, catch when we call Math.random() in render.
    
    The generated code is a little convoluted, because we don't want to have to traverse the generated code and substitute variable names with new ones. Instead, we save the initial value to the cache as normal, then run the computation block again and compare the resulting values to the cached ones. Then, to make sure that the cached values are identical to the computed ones, we reassign the cached values into the output variables.
    
    [ghstack-poisoned]
    mvitousek committed May 31, 2024
    Configuration menu
    Copy the full SHA
    b653efa View commit details
    Browse the repository at this point in the history
  2. Update on "[compiler] Recompute values every time"

    Summary: This PR expands the analysis from the previous in the stack in order to also capture when a value can incorrectly change within a single render, rather than just changing between two renders. In the case where dependencies have changed and so a new value is being computed, we now compute the value twice and compare the results. This would, for example, catch when we call Math.random() in render.
    
    The generated code is a little convoluted, because we don't want to have to traverse the generated code and substitute variable names with new ones. Instead, we save the initial value to the cache as normal, then run the computation block again and compare the resulting values to the cached ones. Then, to make sure that the cached values are identical to the computed ones, we reassign the cached values into the output variables.
    
    [ghstack-poisoned]
    mvitousek committed May 31, 2024
    Configuration menu
    Copy the full SHA
    3bc706b View commit details
    Browse the repository at this point in the history
  3. Update on "[compiler] Recompute values every time"

    Summary: This PR expands the analysis from the previous in the stack in order to also capture when a value can incorrectly change within a single render, rather than just changing between two renders. In the case where dependencies have changed and so a new value is being computed, we now compute the value twice and compare the results. This would, for example, catch when we call Math.random() in render.
    
    The generated code is a little convoluted, because we don't want to have to traverse the generated code and substitute variable names with new ones. Instead, we save the initial value to the cache as normal, then run the computation block again and compare the resulting values to the cached ones. Then, to make sure that the cached values are identical to the computed ones, we reassign the cached values into the output variables.
    
    [ghstack-poisoned]
    mvitousek committed May 31, 2024
    Configuration menu
    Copy the full SHA
    e4d990b View commit details
    Browse the repository at this point in the history
  4. Update on "[compiler] Recompute values every time"

    Summary: This PR expands the analysis from the previous in the stack in order to also capture when a value can incorrectly change within a single render, rather than just changing between two renders. In the case where dependencies have changed and so a new value is being computed, we now compute the value twice and compare the results. This would, for example, catch when we call Math.random() in render.
    
    The generated code is a little convoluted, because we don't want to have to traverse the generated code and substitute variable names with new ones. Instead, we save the initial value to the cache as normal, then run the computation block again and compare the resulting values to the cached ones. Then, to make sure that the cached values are identical to the computed ones, we reassign the cached values into the output variables.
    
    [ghstack-poisoned]
    mvitousek committed May 31, 2024
    Configuration menu
    Copy the full SHA
    35c7b9e View commit details
    Browse the repository at this point in the history