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

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

Issue 2150533002: Serialize data for LibraryElement.getImportsFor (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 years, 5 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 960 matching lines...) Expand 10 before | Expand all | Expand 10 after
971 } 971 }
972 972
973 /// A node in the deferred import graph. 973 /// A node in the deferred import graph.
974 /// 974 ///
975 /// This class serves as the root node; the 'import' of the main library. 975 /// This class serves as the root node; the 'import' of the main library.
976 class _DeferredImport { 976 class _DeferredImport {
977 const _DeferredImport(); 977 const _DeferredImport();
978 978
979 /// Computes a suggestive name for this import. 979 /// Computes a suggestive name for this import.
980 String computeImportDeferName(Compiler compiler) => 'main'; 980 String computeImportDeferName(Compiler compiler) => 'main';
981
982 ImportElement get declaration => null;
983
984 String toString() => 'main';
981 } 985 }
982 986
983 /// A node in the deferred import graph defined by a deferred import directive. 987 /// A node in the deferred import graph defined by a deferred import directive.
984 class _DeclaredDeferredImport implements _DeferredImport { 988 class _DeclaredDeferredImport implements _DeferredImport {
985 final ImportElement declaration; 989 final ImportElement declaration;
986 990
987 _DeclaredDeferredImport(this.declaration); 991 _DeclaredDeferredImport(this.declaration);
988 992
989 @override 993 @override
990 String computeImportDeferName(Compiler compiler) { 994 String computeImportDeferName(Compiler compiler) {
(...skipping 26 matching lines...) Expand all
1017 assert(result != null); 1021 assert(result != null);
1018 return result; 1022 return result;
1019 } 1023 }
1020 1024
1021 bool operator ==(other) { 1025 bool operator ==(other) {
1022 if (other is! _DeclaredDeferredImport) return false; 1026 if (other is! _DeclaredDeferredImport) return false;
1023 return declaration == other.declaration; 1027 return declaration == other.declaration;
1024 } 1028 }
1025 1029
1026 int get hashCode => declaration.hashCode * 17; 1030 int get hashCode => declaration.hashCode * 17;
1031
1032 String toString() => '$declaration';
1027 } 1033 }
OLDNEW
« no previous file with comments | « no previous file | pkg/compiler/lib/src/elements/modelx.dart » ('j') | pkg/compiler/lib/src/serialization/modelz.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698