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

Side by Side Diff: tests/compiler/dart2js/related_types.dart

Issue 2488353004: Remove Compiler access from ResolutionEnqueuer (Closed)
Patch Set: Updated cf. comments. Created 4 years, 1 month 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 | « tests/compiler/dart2js/patch_test.dart ('k') | tests/compiler/dart2js/related_types_test.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) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 related_types; 5 library related_types;
6 6
7 import 'package:compiler/src/commandline_options.dart'; 7 import 'package:compiler/src/commandline_options.dart';
8 import 'package:compiler/src/compiler.dart'; 8 import 'package:compiler/src/compiler.dart';
9 import 'package:compiler/src/core_types.dart'; 9 import 'package:compiler/src/core_types.dart';
10 import 'package:compiler/src/dart_types.dart'; 10 import 'package:compiler/src/dart_types.dart';
(...skipping 17 matching lines...) Expand all
28 if (result.isSuccess) { 28 if (result.isSuccess) {
29 checkRelatedTypes(result.compiler); 29 checkRelatedTypes(result.compiler);
30 } 30 }
31 } else { 31 } else {
32 print('Usage dart related_types.dart <entry-point>'); 32 print('Usage dart related_types.dart <entry-point>');
33 } 33 }
34 } 34 }
35 35
36 /// Check all loaded libraries in [compiler] for unrelated types. 36 /// Check all loaded libraries in [compiler] for unrelated types.
37 void checkRelatedTypes(Compiler compiler) { 37 void checkRelatedTypes(Compiler compiler) {
38 compiler.openWorld.closeWorld(); 38 compiler.openWorld.closeWorld(compiler.reporter);
39 for (LibraryElement library in compiler.libraryLoader.libraries) { 39 for (LibraryElement library in compiler.libraryLoader.libraries) {
40 checkLibraryElement(compiler, library); 40 checkLibraryElement(compiler, library);
41 } 41 }
42 } 42 }
43 43
44 /// Check [library] for unrelated types. 44 /// Check [library] for unrelated types.
45 void checkLibraryElement(Compiler compiler, LibraryElement library) { 45 void checkLibraryElement(Compiler compiler, LibraryElement library) {
46 library.forEachLocalMember((Element element) { 46 library.forEachLocalMember((Element element) {
47 if (element.isClass) { 47 if (element.isClass) {
48 ClassElement cls = element; 48 ClassElement cls = element;
(...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after
411 ClassElement findClass(DartType type) => type.accept(this, null); 411 ClassElement findClass(DartType type) => type.accept(this, null);
412 412
413 @override 413 @override
414 ClassElement visitType(DartType type, _) => null; 414 ClassElement visitType(DartType type, _) => null;
415 415
416 @override 416 @override
417 ClassElement visitInterfaceType(InterfaceType type, _) { 417 ClassElement visitInterfaceType(InterfaceType type, _) {
418 return type.element; 418 return type.element;
419 } 419 }
420 } 420 }
OLDNEW
« no previous file with comments | « tests/compiler/dart2js/patch_test.dart ('k') | tests/compiler/dart2js/related_types_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698