dillon1000/react
Commit
Browse files [compiler] Store babel scope on Environment
Stores the Babel `Scope` object for the current function on the Environment, allowing access later for generating new globally unique names. The idea is to expose a small subset of the capabilities of the Scope API via Environment, so that the rest of the compiler remains decoupled from Babel. Ideally we'd use our own Scope implementation too, but we can punt on that for now since the parts we're using (global id generation) seem pretty reliable. ghstack-source-id: 37f7113b11fe980688dae423883cf6b8890e77be Pull Request resolved: https://github.com/facebook/react/pull/30328
Changed paths2 files
First-parent comparisoncompiler/packages/babel-plugin-react-compiler/src/Entrypoint/Pipeline.ts ModifiedM compiler/packages/babel-plugin-react-compiler/src/HIR/Environment.ts ModifiedPatch
Files changed
Rendering syntax-highlighted changes…