| 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 1252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |