Chromium Code Reviews| Index: pkg/compiler/lib/src/dump_info.dart |
| diff --git a/pkg/compiler/lib/src/dump_info.dart b/pkg/compiler/lib/src/dump_info.dart |
| index 5792cace9ffc0fb47d9b93729ec2ad750bffa785..61e8a7364bfc0d703882283b4520e3f1b71626a4 100644 |
| --- a/pkg/compiler/lib/src/dump_info.dart |
| +++ b/pkg/compiler/lib/src/dump_info.dart |
| @@ -410,7 +410,6 @@ class DumpInfoTask extends CompilerTask { |
| // A mapping from Javascript AST Nodes to the size of their |
| // pretty-printed contents. |
| final Map<jsAst.Node, int> _nodeToSize = <jsAst.Node, int>{}; |
| - final Map<jsAst.Node, int> _nodeBeforeSize = <jsAst.Node, int>{}; |
| final Map<Element, int> _fieldNameToSize = <Element, int>{}; |
| final Map<Element, Set<Selector>> selectorsFromElement = {}; |
| @@ -461,29 +460,6 @@ class DumpInfoTask extends CompilerTask { |
| } |
| } |
| - /** |
| - * A callback that can be called before a jsAst [node] is |
| - * pretty-printed. The size of the code buffer ([aftersize]) |
| - * is also passed. |
| - */ |
| - void enteringAst(jsAst.Node node, int beforeSize) { |
| - if (isTracking(node)) { |
| - _nodeBeforeSize[node] = beforeSize; |
| - } |
| - } |
| - |
| - /** |
| - * A callback that can be called after a jsAst [node] is |
| - * pretty-printed. The size of the code buffer ([aftersize]) |
| - * is also passed. |
| - */ |
| - void exitingAst(jsAst.Node node, int afterSize) { |
| - if (isTracking(node)) { |
| - int diff = afterSize - _nodeBeforeSize[node]; |
| - recordAstSize(node, diff); |
| - } |
| - } |
| - |
| // Returns true if we care about tracking the size of |
| // this node. |
| bool isTracking(jsAst.Node code) { |
| @@ -508,7 +484,7 @@ class DumpInfoTask extends CompilerTask { |
| // Records the size of a dart AST node after it has been |
| // pretty-printed into the output buffer. |
| void recordAstSize(jsAst.Node code, int size) { |
|
floitsch
2015/04/14 15:09:31
I would rename the variable to "node" since it rea
Johnni Winther
2015/04/15 11:15:28
Done.
|
| - if (compiler.dumpInfo) { |
| + if (isTracking(code)) { |
| //TODO: should I be incrementing here instead? |
| _nodeToSize[code] = size; |
| } |