dillon1000/react
Commit
Browse files [tests] Tests and patch for context variables
--- - [patch] Find context variables within FunctionDeclarations (previously missing) - [todo] Need to fix non-allocating values / variables being DCE'd One approach is to label everything referenced by a lambda as context variables. I couldn't come up with other examples that break without this change, so I wonder if something lighter / hackier works just as well. (My only hesitation is that we may end up losing out on potential optimizations for everything aliased to these variables).
Changed paths3 files
First-parent comparisoncompiler/forget/packages/babel-plugin-react-forget/src/HIR/FindContextIdentifiers.ts ModifiedA compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/declare-reassign-variable-in-function-declaration.expect.md AddedA compiler/forget/packages/babel-plugin-react-forget/src/__tests__/fixtures/compiler/declare-reassign-variable-in-function-declaration.js AddedPatch
Files changed
Rendering syntax-highlighted changes…