Skip to content

Latest commit

 

History

History
39 lines (30 loc) · 1.39 KB

File metadata and controls

39 lines (30 loc) · 1.39 KB

FOCUS

  • Bug fixing
  • Minimizer optmizations
  • Break ast generator out into a separate project

TASK

  • add is methods to Nodes
  • add createX methods
  • add identify methods to Nodes

FEATURES

  • Collapse single use functions (functions that are only used once)
  • Collapse single use let declarations
  • Collapse small functions (functions that only perform few operations do not necessarily save us anything on code size and create more operation overhead)
  • Replace function names and function parameter names with shorter single character names
  • Remove unnecessary parentheses

IMPROVEMENTS

  • Performance: buildScopes needs memoization
  • Performance: switch children to immutable List so tree changes don't require copying large lists
  • Performance: findNodeInTree should use a map to look up node by id

BUGS

  • replacement of children when using assocNodePath does not update properties like body, argument, etc of nodes
  • When a CallExpression is replaced with FunctionDeclaration contents, if the contents are a BinaryExpression then they need to be wrapped in parentheses first
  • Functions are not always being collapsed. This seems to happen when a nested function callee's function is declared after the nested parent has already been collapsed.
  • Operators order is not being respected by the AST parser