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
I fully understand that in your example, although Ident is only visited n times, the whole ast tree is visited n ^ 2 times, so the complexity will be a problem.
However, in arrow function transformation, take
consta=()=>()=>()=>()=>()=>this
for example, first it will transform innermost arrow into
then every time an outer arrow function is transformed, a FunctionWrapper will be constructed to visit all its sub tree, it will be stopped by FnExpr, so that will be fine.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I fully understand that in your example, although
Ident
is only visitedn
times, the whole ast tree is visitedn ^ 2
times, so the complexity will be a problem.However, in arrow function transformation, take
for example, first it will transform innermost arrow into
then every time an outer arrow function is transformed, a
FunctionWrapper
will be constructed to visit all its sub tree, it will be stopped byFnExpr
, so that will be fine.Beta Was this translation helpful? Give feedback.
All reactions