| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 part of dart2js.js_emitter; | 5 part of dart2js.js_emitter; |
| 6 | 6 |
| 7 | 7 |
| 8 class OldEmitter implements Emitter { | 8 class OldEmitter implements Emitter { |
| 9 final Compiler compiler; | 9 final Compiler compiler; |
| 10 final CodeEmitterTask task; | 10 final CodeEmitterTask task; |
| (...skipping 1636 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1647 | 1647 |
| 1648 outputs[outputUnit] = new jsAst.ArrayInitializer(parts); | 1648 outputs[outputUnit] = new jsAst.ArrayInitializer(parts); |
| 1649 } | 1649 } |
| 1650 } | 1650 } |
| 1651 | 1651 |
| 1652 return outputs; | 1652 return outputs; |
| 1653 } | 1653 } |
| 1654 | 1654 |
| 1655 void finalizeTokensInAst(jsAst.Program main, | 1655 void finalizeTokensInAst(jsAst.Program main, |
| 1656 Iterable<jsAst.Program> deferredParts) { | 1656 Iterable<jsAst.Program> deferredParts) { |
| 1657 task.metadataCollector.countTokensInProgram(main); | 1657 task.metadataCollector.countTokensInAst(main); |
| 1658 deferredParts.forEach(task.metadataCollector.countTokensInProgram); | 1658 deferredParts.forEach(task.metadataCollector.countTokensInAst); |
| 1659 task.metadataCollector.finalizeTokens(); | 1659 task.metadataCollector.finalizeTokens(); |
| 1660 } | 1660 } |
| 1661 | 1661 |
| 1662 int emitProgram(ProgramBuilder programBuilder) { | 1662 int emitProgram(ProgramBuilder programBuilder) { |
| 1663 Program program = programBuilder.buildProgram( | 1663 Program program = programBuilder.buildProgram( |
| 1664 storeFunctionTypesInMetadata: true); | 1664 storeFunctionTypesInMetadata: true); |
| 1665 | 1665 |
| 1666 assembleProgram(program); | 1666 assembleProgram(program); |
| 1667 | 1667 |
| 1668 // Construct the ASTs for all deferred output units. | 1668 // Construct the ASTs for all deferred output units. |
| (...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2001 for (Element element in compiler.enqueuer.codegen.newlyEnqueuedElements) { | 2001 for (Element element in compiler.enqueuer.codegen.newlyEnqueuedElements) { |
| 2002 if (element.isInstanceMember) { | 2002 if (element.isInstanceMember) { |
| 2003 cachedClassBuilders.remove(element.enclosingClass); | 2003 cachedClassBuilders.remove(element.enclosingClass); |
| 2004 | 2004 |
| 2005 nativeEmitter.cachedBuilders.remove(element.enclosingClass); | 2005 nativeEmitter.cachedBuilders.remove(element.enclosingClass); |
| 2006 | 2006 |
| 2007 } | 2007 } |
| 2008 } | 2008 } |
| 2009 } | 2009 } |
| 2010 } | 2010 } |
| OLD | NEW |