prepack
prepack copied to clipboard
Modified bindings can refer to newly created functions
In the code, look for a comment // TODO #1615
to find the issue.
The issue that modifiedBindings
can refer to FunctionEnvironmentRecord
which has a $FunctionObject
that is also in the createdObjects
set.
While we don't have a small unit test that breaks it, the React team has internal tests that show the issue.
Fixing this properly is likely to become much more important when we want to support nested optimized functions.