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:collection' show HashMap; | 7 import 'dart:collection' show HashMap; |
8 import 'dart:convert'; | 8 import 'dart:convert'; |
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 1611 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1622 counter.countTokens(main); | 1622 counter.countTokens(main); |
1623 deferredParts.forEach(counter.countTokens); | 1623 deferredParts.forEach(counter.countTokens); |
1624 task.metadataCollector.finalizeTokens(); | 1624 task.metadataCollector.finalizeTokens(); |
1625 if (backend.namer is jsAst.TokenFinalizer) { | 1625 if (backend.namer is jsAst.TokenFinalizer) { |
1626 dynamic finalizer = backend.namer; | 1626 dynamic finalizer = backend.namer; |
1627 finalizer.finalizeTokens(); | 1627 finalizer.finalizeTokens(); |
1628 } | 1628 } |
1629 } | 1629 } |
1630 | 1630 |
1631 int emitProgram(ProgramBuilder programBuilder) { | 1631 int emitProgram(ProgramBuilder programBuilder) { |
1632 Program program = | 1632 Program program = programForTesting = |
1633 programBuilder.buildProgram(storeFunctionTypesInMetadata: true); | 1633 programBuilder.buildProgram(storeFunctionTypesInMetadata: true); |
1634 | 1634 |
1635 outputStaticNonFinalFieldLists = | 1635 outputStaticNonFinalFieldLists = |
1636 programBuilder.collector.outputStaticNonFinalFieldLists; | 1636 programBuilder.collector.outputStaticNonFinalFieldLists; |
1637 outputLibraryLists = programBuilder.collector.outputLibraryLists; | 1637 outputLibraryLists = programBuilder.collector.outputLibraryLists; |
1638 typedefsNeededForReflection = | 1638 typedefsNeededForReflection = |
1639 programBuilder.collector.typedefsNeededForReflection; | 1639 programBuilder.collector.typedefsNeededForReflection; |
1640 | 1640 |
1641 assembleProgram(program); | 1641 assembleProgram(program); |
1642 | 1642 |
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1967 // data. | 1967 // data. |
1968 mapping["_comment"] = "This mapping shows which compiled `.js` files are " | 1968 mapping["_comment"] = "This mapping shows which compiled `.js` files are " |
1969 "needed for a given deferred library import."; | 1969 "needed for a given deferred library import."; |
1970 mapping.addAll(compiler.deferredLoadTask.computeDeferredMap()); | 1970 mapping.addAll(compiler.deferredLoadTask.computeDeferredMap()); |
1971 compiler.outputProvider( | 1971 compiler.outputProvider( |
1972 compiler.options.deferredMapUri.path, '', OutputType.info) | 1972 compiler.options.deferredMapUri.path, '', OutputType.info) |
1973 ..add(const JsonEncoder.withIndent(" ").convert(mapping)) | 1973 ..add(const JsonEncoder.withIndent(" ").convert(mapping)) |
1974 ..close(); | 1974 ..close(); |
1975 } | 1975 } |
1976 } | 1976 } |
OLD | NEW |