You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
compiler: optimise top level operations transformer #1055
The top level operations transformer currently traverses the whole AST looking for call expressions, and tries to decide if they're top level in scope.
But this can be expensive in large ASTs.
Maybe a better approach is:
Only visit the Program node
Iterate over the children of Program
Identify any ExpressionStatements with a CallExpression inside
Those are your top-level ops
This is a shallow top-down traversal and it's got to be a lot cheaper
Activity