The library for web and native user interfaces.
Mirrored from https://github.com/247TaxiDriver/QOS-React.git
Synced Nov 13, 00:45 UTC
Promote and rename within nested functions
Another title for this PR could be "Yet another reason for HIR-everywhere" ReactiveFunctionVisitor doesn't traverse into HIRFunctions from FunctionExpression and ObjectMethod values. This means that PromoteUsedTemporaries and RenameVariables also weren't traversing into such functions, and those values weren't getting promoted and renamed correctly. This PR updates ReactiveFunctionVisitor with a method that can optionally be invoked to traverse an HIRFunction and call the appropriate visitor methods. PromoteUsedTemporaries and RenameVariables invoke this to ensure they visit all places, even in nested HIRFunctions.