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

Side by Side Diff: pkg/compiler/lib/src/dart_backend/outputter.dart

Issue 1803303002: Move all flags to CompilerOptions (first step to stop passing the compiler to (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 9 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
« no previous file with comments | « pkg/compiler/lib/src/dart_backend/backend.dart ('k') | pkg/compiler/lib/src/deferred_load.dart » ('j') | 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 dart_backend; 5 part of dart_backend;
6 6
7 typedef bool IsSafeToRemoveTypeDeclarations( 7 typedef bool IsSafeToRemoveTypeDeclarations(
8 Map<ClassElement, Iterable<Element>> classMembers); 8 Map<ClassElement, Iterable<Element>> classMembers);
9 typedef void ElementCallback<E>(E element); 9 typedef void ElementCallback<E>(E element);
10 typedef void ElementPostProcessFunction( 10 typedef void ElementPostProcessFunction(
(...skipping 493 matching lines...) Expand 10 before | Expand all | Expand 10 after
504 stripTypes: forceStripTypes, 504 stripTypes: forceStripTypes,
505 minify: enableMinification); 505 minify: enableMinification);
506 506
507 if (multiFile) { 507 if (multiFile) {
508 // TODO(sigurdm): Factor handling of library-paths out from emitting. 508 // TODO(sigurdm): Factor handling of library-paths out from emitting.
509 String mainName = outputUri.pathSegments.last; 509 String mainName = outputUri.pathSegments.last;
510 String mainBaseName = mainName.endsWith(".dart") 510 String mainBaseName = mainName.endsWith(".dart")
511 ? mainName.substring(0, mainName.length - 5) 511 ? mainName.substring(0, mainName.length - 5)
512 : mainName; 512 : mainName;
513 // Map each library to a path based on the uri of the original 513 // Map each library to a path based on the uri of the original
514 // library and [compiler.outputUri]. 514 // library and [compiler.options.outputUri].
515 Set<String> usedLibraryPaths = new Set<String>(); 515 Set<String> usedLibraryPaths = new Set<String>();
516 for (LibraryElement library in libraryInfo.userLibraries) { 516 for (LibraryElement library in libraryInfo.userLibraries) {
517 if (library == mainFunction.library) { 517 if (library == mainFunction.library) {
518 outputPaths[library] = mainBaseName; 518 outputPaths[library] = mainBaseName;
519 } else { 519 } else {
520 List<String> names = 520 List<String> names =
521 library.canonicalUri.pathSegments.last.split("."); 521 library.canonicalUri.pathSegments.last.split(".");
522 if (names.last == "dart") { 522 if (names.last == "dart") {
523 names = names.sublist(0, names.length - 1); 523 names = names.sublist(0, names.length - 1);
524 } 524 }
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
595 String code = mainUnparser.result; 595 String code = mainUnparser.result;
596 outputProvider("", "dart") 596 outputProvider("", "dart")
597 ..add(code) 597 ..add(code)
598 ..close(); 598 ..close();
599 599
600 totalSize = code.length; 600 totalSize = code.length;
601 } 601 }
602 602
603 return totalSize; 603 return totalSize;
604 } 604 }
605 } 605 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/dart_backend/backend.dart ('k') | pkg/compiler/lib/src/deferred_load.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698