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

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

Issue 1099563002: dart2js: allow empty main fragment in emitter. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | 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 1252 matching lines...) Expand 10 before | Expand all | Expand 10 after
1263 mainOutput.add('$isolateProperties$_=$_$isolatePropertiesName$N'); 1263 mainOutput.add('$isolateProperties$_=$_$isolatePropertiesName$N');
1264 1264
1265 emitFunctionThatReturnsNull(mainOutput); 1265 emitFunctionThatReturnsNull(mainOutput);
1266 1266
1267 Iterable<LibraryElement> libraries = 1267 Iterable<LibraryElement> libraries =
1268 task.outputLibraryLists[mainOutputUnit]; 1268 task.outputLibraryLists[mainOutputUnit];
1269 if (libraries == null) libraries = []; 1269 if (libraries == null) libraries = [];
1270 emitMangledNames(mainOutput); 1270 emitMangledNames(mainOutput);
1271 1271
1272 Map<Element, ClassBuilder> descriptors = elementDescriptors[mainFragment]; 1272 Map<Element, ClassBuilder> descriptors = elementDescriptors[mainFragment];
1273 if (descriptors == null) descriptors = const {};
1274
1273 checkEverythingEmitted(descriptors.keys); 1275 checkEverythingEmitted(descriptors.keys);
1274 1276
1275 CodeBuffer libraryBuffer = new CodeBuffer(); 1277 CodeBuffer libraryBuffer = new CodeBuffer();
1276 for (LibraryElement library in Elements.sortedByPosition(libraries)) { 1278 for (LibraryElement library in Elements.sortedByPosition(libraries)) {
1277 writeLibraryDescriptor(libraryBuffer, library, mainFragment); 1279 writeLibraryDescriptor(libraryBuffer, library, mainFragment);
1278 descriptors.remove(library); 1280 descriptors.remove(library);
1279 } 1281 }
1280 1282
1281 if (descriptors.isNotEmpty) { 1283 if (descriptors.isNotEmpty) {
1282 List<Element> remainingLibraries = descriptors.keys 1284 List<Element> remainingLibraries = descriptors.keys
(...skipping 611 matching lines...) Expand 10 before | Expand all | Expand 10 after
1894 for (Element element in compiler.enqueuer.codegen.newlyEnqueuedElements) { 1896 for (Element element in compiler.enqueuer.codegen.newlyEnqueuedElements) {
1895 if (element.isInstanceMember) { 1897 if (element.isInstanceMember) {
1896 cachedClassBuilders.remove(element.enclosingClass); 1898 cachedClassBuilders.remove(element.enclosingClass);
1897 1899
1898 nativeEmitter.cachedBuilders.remove(element.enclosingClass); 1900 nativeEmitter.cachedBuilders.remove(element.enclosingClass);
1899 1901
1900 } 1902 }
1901 } 1903 }
1902 } 1904 }
1903 } 1905 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698