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

Side by Side Diff: pkg/compiler/lib/src/deferred_load.dart

Issue 1916053003: Add toStructuredText to ConstantExpression and align method names with ConstantValue (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: dartfmt Created 4 years, 8 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
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 library deferred_load; 5 library deferred_load;
6 6
7 import 'common/backend_api.dart' show Backend; 7 import 'common/backend_api.dart' show Backend;
8 import 'common/tasks.dart' show CompilerTask; 8 import 'common/tasks.dart' show CompilerTask;
9 import 'common.dart'; 9 import 'common.dart';
10 import 'compiler.dart' show Compiler; 10 import 'compiler.dart' show Compiler;
(...skipping 869 matching lines...) Expand 10 before | Expand all | Expand 10 after
880 /// Creates a textual representation of the output unit content. 880 /// Creates a textual representation of the output unit content.
881 String dump() { 881 String dump() {
882 Map<OutputUnit, List<String>> elementMap = <OutputUnit, List<String>>{}; 882 Map<OutputUnit, List<String>> elementMap = <OutputUnit, List<String>>{};
883 Map<OutputUnit, List<String>> constantMap = <OutputUnit, List<String>>{}; 883 Map<OutputUnit, List<String>> constantMap = <OutputUnit, List<String>>{};
884 _elementToOutputUnit.forEach((Element element, OutputUnit output) { 884 _elementToOutputUnit.forEach((Element element, OutputUnit output) {
885 elementMap.putIfAbsent(output, () => <String>[]).add('$element'); 885 elementMap.putIfAbsent(output, () => <String>[]).add('$element');
886 }); 886 });
887 _constantToOutputUnit.forEach((ConstantValue value, OutputUnit output) { 887 _constantToOutputUnit.forEach((ConstantValue value, OutputUnit output) {
888 constantMap 888 constantMap
889 .putIfAbsent(output, () => <String>[]) 889 .putIfAbsent(output, () => <String>[])
890 .add(value.toStructuredString()); 890 .add(value.toStructuredText());
891 }); 891 });
892 892
893 StringBuffer sb = new StringBuffer(); 893 StringBuffer sb = new StringBuffer();
894 for (OutputUnit outputUnit in allOutputUnits) { 894 for (OutputUnit outputUnit in allOutputUnits) {
895 sb.write(outputUnit.name); 895 sb.write(outputUnit.name);
896 List<String> elements = elementMap[outputUnit]; 896 List<String> elements = elementMap[outputUnit];
897 if (elements != null) { 897 if (elements != null) {
898 sb.write('\n elements:'); 898 sb.write('\n elements:');
899 for (String element in elements..sort()) { 899 for (String element in elements..sort()) {
900 sb.write('\n $element'); 900 sb.write('\n $element');
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
982 return result; 982 return result;
983 } 983 }
984 984
985 bool operator ==(other) { 985 bool operator ==(other) {
986 if (other is! _DeclaredDeferredImport) return false; 986 if (other is! _DeclaredDeferredImport) return false;
987 return declaration == other.declaration; 987 return declaration == other.declaration;
988 } 988 }
989 989
990 int get hashCode => declaration.hashCode * 17; 990 int get hashCode => declaration.hashCode * 17;
991 } 991 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/dart_backend/backend_ast_nodes.dart ('k') | pkg/compiler/lib/src/elements/modelx.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698