Skip to content

Conversation

@mvitousek
Copy link
Contributor

@mvitousek mvitousek commented Dec 10, 2024

Stack from ghstack (oldest at bottom):

Summary:
Two somewhat unrelated fixes that combine to allow loops like for (i =1, j =1; ...) to be handled. We introduce a new case for building reactive functions when a block prior to a goto doesnt generate a value; this is the case for the fallthrough of sequence blocks in for loop inits, since the value is not read by anything.

We also make it so that we don't DCE declarations of variables that are written to in value blocks. If we did DCE such declarations, we would then later convert the reassignment to a const declaration--but declarations in value blocks are banned.

…f declarations when the variable is reassigned in a value block

Summary:
Two somewhat unrelated fixes that combine to allow loops like `for (i =1, j =1; ...)` to be handled. We introduce a new case for building reactive functions when a block prior to a goto doesnt generate a value; this is the case for the fallthrough of sequence blocks in for loop inits, since the value is not read by anything.

We also make it so that we don't DCE declarations of variables that are written to in value blocks. If we did DCE such declarations, we would then later convert the reassignment to a const declaration--but declarations in value blocks are banned.

[ghstack-poisoned]
@vercel
Copy link

vercel bot commented Dec 10, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
react-compiler-playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 10, 2024 6:40pm

mvitousek added a commit that referenced this pull request Dec 10, 2024
…f declarations when the variable is reassigned in a value block

Summary:
Two somewhat unrelated fixes that combine to allow loops like `for (i =1, j =1; ...)` to be handled. We introduce a new case for building reactive functions when a block prior to a goto doesnt generate a value; this is the case for the fallthrough of sequence blocks in for loop inits, since the value is not read by anything.

We also make it so that we don't DCE declarations of variables that are written to in value blocks. If we did DCE such declarations, we would then later convert the reassignment to a const declaration--but declarations in value blocks are banned.

ghstack-source-id: 7468bc8
Pull Request resolved: #31723
@github-actions
Copy link

This pull request has been automatically marked as stale. If this pull request is still relevant, please leave any comment (for example, "bump"), and we'll keep it open. We are sorry that we haven't been able to prioritize reviewing it yet. Your contribution is very much appreciated.

@github-actions github-actions bot added the Resolution: Stale Automatically closed due to inactivity label Mar 10, 2025
@github-actions
Copy link

Closing this pull request after a prolonged period of inactivity. If this issue is still present in the latest release, please ask for this pull request to be reopened. Thank you!

@github-actions github-actions bot closed this Mar 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed Resolution: Stale Automatically closed due to inactivity

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants