Uh oh!
There was an error while loading. Please reload this page.
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Clean up duplicate checks for when to skip processing values as dependencies / hoistable temporaries.
| return; | ||
| } | ||
| if (value.kind === 'PropertyLoad') { | ||
| context.visitProperty(value.object, value.property, false); |
There was a problem hiding this comment.
Doesn't seem to be a equivalent to the context.isUsedOutsideDeclaringScope(lvalue) check in the new version, is that a semantic change?
There was a problem hiding this comment.
Ahh that's because we already check context.isUsedOutsideDeclaringScope when building the temporaries sidemap. It's a bit awkward, but we need this information when constructing the temporaries sidemap because:
context.isUsedOutsideDeclaringScoperepresents a reordering barrier- the whole point of the temporaries sidemap is to represent reorderable / semantically equivalent expressions
- it's difficult to defer finding reordering barriers because they may affect multiple
temporariesentries i.e.PropertyLoadsfrom non-reorderable values
I originally duplicated this code to decouple temporary sidemap construction from dependency collection. But.. I think that made maintaining this code much more difficult. @mvitousek I'd love feedback on how to make this cleaner!
…act into issue-31578-setter-arity-gcc * 'issue-31578-setter-arity-gcc' of github.com:/davesnx/react: [flags] Clean up scheduler flags (react#31814) Enable debugRenderPhaseSideEffectsForStrictMode in test renderers (react#31761) Enable disableDefaultPropsExceptForClasses (react#31804) Turn on useModernStrictMode in test renderers (react#31769) [compiler][ez] Add shape for global Object.keys (react#31583) [compiler] Context variables as dependencies (react#31582) [compiler] Add fire to known React APIs (react#31795) [compiler] Add option for firing effect functions (react#31794) [compiler][be] Logger based debug printing in test runner (react#31809) [compiler][ez] Clean up duplicate code in propagateScopeDeps (react#31581) [compiler] Repro for aliased captures within inner function expressions (react#31770) [compiler][be] Playground now compiles entire program (react#31774) [Flight] Color and badge non-primary environments (react#31738) [Flight] Emit Deduped Server Components Marker (react#31737) [Flight] Sort Server Components Track Group ahead of Client Scheduler/Components Tracks (react#31736) Clean up context access profiling experiment (react#31806) [Flight] Stack Parallel Components in Separate Tracks (react#31735) Flag for requestPaint (react#31805)
Clean up duplicate checks for when to skip processing values as dependencies / hoistable temporaries.
Stack created with Sapling. Best reviewed with ReviewStack.