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

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

Issue 1207343003: dart2js: Create program_builder directory and move corresponding files. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 5 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 | « no previous file | pkg/compiler/lib/src/js_emitter/js_emitter.dart » ('j') | 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 1606 matching lines...) Expand 10 before | Expand all | Expand 10 after
1617 Map<OutputUnit, jsAst.Expression> outputs = 1617 Map<OutputUnit, jsAst.Expression> outputs =
1618 new Map<OutputUnit, jsAst.Expression>(); 1618 new Map<OutputUnit, jsAst.Expression>();
1619 1619
1620 for (Fragment fragment in program.deferredFragments) { 1620 for (Fragment fragment in program.deferredFragments) {
1621 OutputUnit outputUnit = fragment.outputUnit; 1621 OutputUnit outputUnit = fragment.outputUnit;
1622 1622
1623 Map<Element, ClassBuilder> descriptors = elementDescriptors[fragment]; 1623 Map<Element, ClassBuilder> descriptors = elementDescriptors[fragment];
1624 1624
1625 if (descriptors != null && descriptors.isNotEmpty) { 1625 if (descriptors != null && descriptors.isNotEmpty) {
1626 Iterable<LibraryElement> libraries = 1626 Iterable<LibraryElement> libraries =
1627 task.outputLibraryLists[outputUnit]; 1627 task.outputLibraryLists[outputUnit];
1628 if (libraries == null) libraries = []; 1628 if (libraries == null) libraries = [];
1629 1629
1630 // TODO(johnniwinther): Avoid creating [CodeBuffer]s. 1630 // TODO(johnniwinther): Avoid creating [CodeBuffer]s.
1631 List<jsAst.Expression> parts = <jsAst.Expression>[]; 1631 List<jsAst.Expression> parts = <jsAst.Expression>[];
1632 for (LibraryElement library in Elements.sortedByPosition(libraries)) { 1632 for (LibraryElement library in Elements.sortedByPosition(libraries)) {
1633 parts.add(generateLibraryDescriptor(library, fragment)); 1633 parts.add(generateLibraryDescriptor(library, fragment));
1634 descriptors.remove(library); 1634 descriptors.remove(library);
1635 } 1635 }
1636 1636
1637 outputs[outputUnit] = new jsAst.ArrayInitializer(parts); 1637 outputs[outputUnit] = new jsAst.ArrayInitializer(parts);
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after
2003 for (Element element in compiler.enqueuer.codegen.newlyEnqueuedElements) { 2003 for (Element element in compiler.enqueuer.codegen.newlyEnqueuedElements) {
2004 if (element.isInstanceMember) { 2004 if (element.isInstanceMember) {
2005 cachedClassBuilders.remove(element.enclosingClass); 2005 cachedClassBuilders.remove(element.enclosingClass);
2006 2006
2007 nativeEmitter.cachedBuilders.remove(element.enclosingClass); 2007 nativeEmitter.cachedBuilders.remove(element.enclosingClass);
2008 2008
2009 } 2009 }
2010 } 2010 }
2011 } 2011 }
2012 } 2012 }
OLDNEW
« no previous file with comments | « no previous file | pkg/compiler/lib/src/js_emitter/js_emitter.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698