| 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 1356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1367 void emitLibrary(Library library) { | 1367 void emitLibrary(Library library) { |
| 1368 LibraryElement libraryElement = library.element; | 1368 LibraryElement libraryElement = library.element; |
| 1369 | 1369 |
| 1370 emitStaticFunctions(library.statics); | 1370 emitStaticFunctions(library.statics); |
| 1371 | 1371 |
| 1372 ClassBuilder libraryBuilder = getElementDescriptor(libraryElement); | 1372 ClassBuilder libraryBuilder = getElementDescriptor(libraryElement); |
| 1373 for (Class cls in library.classes) { | 1373 for (Class cls in library.classes) { |
| 1374 emitClass(cls, libraryBuilder); | 1374 emitClass(cls, libraryBuilder); |
| 1375 } | 1375 } |
| 1376 | 1376 |
| 1377 classEmitter.emitFields(libraryElement, libraryBuilder, emitStatics: true); | 1377 classEmitter.emitFields(library, libraryBuilder, emitStatics: true); |
| 1378 } | 1378 } |
| 1379 | 1379 |
| 1380 void emitMainOutputUnit(Program program, | 1380 void emitMainOutputUnit(Program program, |
| 1381 Map<OutputUnit, String> deferredLoadHashes, | 1381 Map<OutputUnit, String> deferredLoadHashes, |
| 1382 CodeBuffer nativeBuffer) { | 1382 CodeBuffer nativeBuffer) { |
| 1383 Fragment mainFragment = program.fragments.first; | 1383 Fragment mainFragment = program.fragments.first; |
| 1384 OutputUnit mainOutputUnit = mainFragment.outputUnit; | 1384 OutputUnit mainOutputUnit = mainFragment.outputUnit; |
| 1385 | 1385 |
| 1386 LineColumnCollector lineColumnCollector; | 1386 LineColumnCollector lineColumnCollector; |
| 1387 List<CodeOutputListener> codeOutputListeners; | 1387 List<CodeOutputListener> codeOutputListeners; |
| (...skipping 707 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2095 for (Element element in compiler.enqueuer.codegen.newlyEnqueuedElements) { | 2095 for (Element element in compiler.enqueuer.codegen.newlyEnqueuedElements) { |
| 2096 if (element.isInstanceMember) { | 2096 if (element.isInstanceMember) { |
| 2097 cachedClassBuilders.remove(element.enclosingClass); | 2097 cachedClassBuilders.remove(element.enclosingClass); |
| 2098 | 2098 |
| 2099 nativeEmitter.cachedBuilders.remove(element.enclosingClass); | 2099 nativeEmitter.cachedBuilders.remove(element.enclosingClass); |
| 2100 | 2100 |
| 2101 } | 2101 } |
| 2102 } | 2102 } |
| 2103 } | 2103 } |
| 2104 } | 2104 } |
| OLD | NEW |