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

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

Issue 2610513005: Use Entity instead of Element in ConstantValue (Closed)
Patch Set: Created 3 years, 11 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 526 matching lines...) Expand 10 before | Expand all | Expand 10 after
537 element: dependency, 537 element: dependency,
538 import: new _DeclaredDeferredImport(deferredImport)); 538 import: new _DeclaredDeferredImport(deferredImport));
539 } 539 }
540 } else { 540 } else {
541 _mapDependencies(element: dependency, import: import); 541 _mapDependencies(element: dependency, import: import);
542 } 542 }
543 } 543 }
544 544
545 for (ConstantValue dependency in dependentConstants) { 545 for (ConstantValue dependency in dependentConstants) {
546 if (dependency is DeferredConstantValue) { 546 if (dependency is DeferredConstantValue) {
547 _mapConstantDependencies(dependency, 547 PrefixElement prefix = dependency.prefix;
548 new _DeclaredDeferredImport(dependency.prefix.deferredImport)); 548 _mapConstantDependencies(
549 dependency, new _DeclaredDeferredImport(prefix.deferredImport));
549 } else { 550 } else {
550 _mapConstantDependencies(dependency, import); 551 _mapConstantDependencies(dependency, import);
551 } 552 }
552 } 553 }
553 } 554 }
554 555
555 /// Adds extra dependencies coming from mirror usage. 556 /// Adds extra dependencies coming from mirror usage.
556 /// 557 ///
557 /// The elements are added with [_mapDependencies]. 558 /// The elements are added with [_mapDependencies].
558 void _addMirrorElements() { 559 void _addMirrorElements() {
(...skipping 489 matching lines...) Expand 10 before | Expand all | Expand 10 after
1048 1049
1049 bool operator ==(other) { 1050 bool operator ==(other) {
1050 if (other is! _DeclaredDeferredImport) return false; 1051 if (other is! _DeclaredDeferredImport) return false;
1051 return declaration == other.declaration; 1052 return declaration == other.declaration;
1052 } 1053 }
1053 1054
1054 int get hashCode => declaration.hashCode * 17; 1055 int get hashCode => declaration.hashCode * 17;
1055 1056
1056 String toString() => '$declaration'; 1057 String toString() => '$declaration';
1057 } 1058 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/constants/values.dart ('k') | pkg/compiler/lib/src/inferrer/type_graph_inferrer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698