Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1557)

Side by Side Diff: pkg/compiler/lib/src/js_emitter/old_emitter/emitter.dart

Issue 1189873005: dart2js: Support frequency based metadata indices in new emitter. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Comments addressed Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « pkg/compiler/lib/src/js_emitter/new_emitter/model_emitter.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/js_emitter/new_emitter/model_emitter.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698