| 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 library dart2js.js_emitter.full_emitter; | 5 library dart2js.js_emitter.full_emitter; |
| 6 | 6 |
| 7 import 'dart:convert'; | 7 import 'dart:convert'; |
| 8 import 'dart:collection' show HashMap; | 8 import 'dart:collection' show HashMap; |
| 9 | 9 |
| 10 import 'package:js_runtime/shared/embedded_names.dart' as embeddedNames; | 10 import 'package:js_runtime/shared/embedded_names.dart' as embeddedNames; |
| (...skipping 1794 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1805 Map<OutputUnit, String> deferredLoadHashes = | 1805 Map<OutputUnit, String> deferredLoadHashes = |
| 1806 emitDeferredOutputUnits(deferredParts); | 1806 emitDeferredOutputUnits(deferredParts); |
| 1807 | 1807 |
| 1808 deferredHashTokens.forEach((OutputUnit key, _DeferredOutputUnitHash token) { | 1808 deferredHashTokens.forEach((OutputUnit key, _DeferredOutputUnitHash token) { |
| 1809 token.setHash(deferredLoadHashes[key]); | 1809 token.setHash(deferredLoadHashes[key]); |
| 1810 }); | 1810 }); |
| 1811 emitMainOutputUnit(program.mainFragment.outputUnit, mainOutput); | 1811 emitMainOutputUnit(program.mainFragment.outputUnit, mainOutput); |
| 1812 | 1812 |
| 1813 if (backend.requiresPreamble && | 1813 if (backend.requiresPreamble && |
| 1814 !backend.htmlLibraryIsLoaded) { | 1814 !backend.htmlLibraryIsLoaded) { |
| 1815 compiler.reportHint(NO_LOCATION_SPANNABLE, MessageKind.PREAMBLE); | 1815 compiler.reportHintMessage( |
| 1816 NO_LOCATION_SPANNABLE, MessageKind.PREAMBLE); |
| 1816 } | 1817 } |
| 1817 // Return the total program size. | 1818 // Return the total program size. |
| 1818 return outputBuffers.values.fold(0, (a, b) => a + b.length); | 1819 return outputBuffers.values.fold(0, (a, b) => a + b.length); |
| 1819 } | 1820 } |
| 1820 | 1821 |
| 1821 String generateSourceMapTag(Uri sourceMapUri, Uri fileUri) { | 1822 String generateSourceMapTag(Uri sourceMapUri, Uri fileUri) { |
| 1822 if (sourceMapUri != null && fileUri != null) { | 1823 if (sourceMapUri != null && fileUri != null) { |
| 1823 String sourceMapFileName = relativize(fileUri, sourceMapUri, false); | 1824 String sourceMapFileName = relativize(fileUri, sourceMapUri, false); |
| 1824 return ''' | 1825 return ''' |
| 1825 | 1826 |
| (...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2118 for (Element element in compiler.enqueuer.codegen.newlyEnqueuedElements) { | 2119 for (Element element in compiler.enqueuer.codegen.newlyEnqueuedElements) { |
| 2119 if (element.isInstanceMember) { | 2120 if (element.isInstanceMember) { |
| 2120 cachedClassBuilders.remove(element.enclosingClass); | 2121 cachedClassBuilders.remove(element.enclosingClass); |
| 2121 | 2122 |
| 2122 nativeEmitter.cachedBuilders.remove(element.enclosingClass); | 2123 nativeEmitter.cachedBuilders.remove(element.enclosingClass); |
| 2123 | 2124 |
| 2124 } | 2125 } |
| 2125 } | 2126 } |
| 2126 } | 2127 } |
| 2127 } | 2128 } |
| OLD | NEW |