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

Side by Side Diff: tests/compiler/dart2js/kernel/impact_test.dart

Issue 2955093002: Split KernelToElementMap mixins to match interfaces (Closed)
Patch Set: Created 3 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
« no previous file with comments | « pkg/compiler/lib/src/ssa/kernel_ast_adapter.dart ('k') | no next file » | 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) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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 dart2js.kernel.impact_test; 5 library dart2js.kernel.impact_test;
6 6
7 import 'package:async_helper/async_helper.dart'; 7 import 'package:async_helper/async_helper.dart';
8 import 'package:compiler/src/commandline_options.dart'; 8 import 'package:compiler/src/commandline_options.dart';
9 import 'package:compiler/src/common.dart'; 9 import 'package:compiler/src/common.dart';
10 import 'package:compiler/src/common/names.dart'; 10 import 'package:compiler/src/common/names.dart';
11 import 'package:compiler/src/common/resolution.dart'; 11 import 'package:compiler/src/common/resolution.dart';
12 import 'package:compiler/src/compiler.dart'; 12 import 'package:compiler/src/compiler.dart';
13 import 'package:compiler/src/constants/expressions.dart'; 13 import 'package:compiler/src/constants/expressions.dart';
14 import 'package:compiler/src/elements/elements.dart'; 14 import 'package:compiler/src/elements/elements.dart';
15 import 'package:compiler/src/elements/entities.dart'; 15 import 'package:compiler/src/elements/entities.dart';
16 import 'package:compiler/src/elements/resolution_types.dart'; 16 import 'package:compiler/src/elements/resolution_types.dart';
17 import 'package:compiler/src/js_backend/backend.dart'; 17 import 'package:compiler/src/js_backend/backend.dart';
18 import 'package:compiler/src/kernel/element_map.dart';
19 import 'package:compiler/src/kernel/element_map_impl.dart'; 18 import 'package:compiler/src/kernel/element_map_impl.dart';
20 import 'package:compiler/src/resolution/registry.dart'; 19 import 'package:compiler/src/resolution/registry.dart';
21 import 'package:compiler/src/resolution/tree_elements.dart'; 20 import 'package:compiler/src/resolution/tree_elements.dart';
22 import 'package:compiler/src/ssa/kernel_impact.dart'; 21 import 'package:compiler/src/ssa/kernel_impact.dart';
23 import 'package:compiler/src/serialization/equivalence.dart'; 22 import 'package:compiler/src/serialization/equivalence.dart';
24 import 'package:compiler/src/universe/call_structure.dart'; 23 import 'package:compiler/src/universe/call_structure.dart';
25 import 'package:compiler/src/universe/feature.dart'; 24 import 'package:compiler/src/universe/feature.dart';
26 import 'package:compiler/src/universe/use.dart'; 25 import 'package:compiler/src/universe/use.dart';
27 import 'package:expect/expect.dart'; 26 import 'package:expect/expect.dart';
28 import 'package:kernel/ast.dart' as ir; 27 import 'package:kernel/ast.dart' as ir;
(...skipping 723 matching lines...) Expand 10 before | Expand all | Expand 10 after
752 LibraryElement mainApp = 751 LibraryElement mainApp =
753 compiler.frontendStrategy.elementEnvironment.mainLibrary; 752 compiler.frontendStrategy.elementEnvironment.mainLibrary;
754 checkLibrary(compiler, kernelElementMap, mainApp, fullTest: fullTest); 753 checkLibrary(compiler, kernelElementMap, mainApp, fullTest: fullTest);
755 compiler.libraryLoader.libraries.forEach((LibraryEntity library) { 754 compiler.libraryLoader.libraries.forEach((LibraryEntity library) {
756 if (library == mainApp) return; 755 if (library == mainApp) return;
757 checkLibrary(compiler, kernelElementMap, library, fullTest: fullTest); 756 checkLibrary(compiler, kernelElementMap, library, fullTest: fullTest);
758 }); 757 });
759 }); 758 });
760 } 759 }
761 760
762 void checkLibrary(Compiler compiler, KernelToElementMapMixin elementMap, 761 void checkLibrary(Compiler compiler, KernelToElementMapImpl elementMap,
763 LibraryElement library, 762 LibraryElement library,
764 {bool fullTest: false}) { 763 {bool fullTest: false}) {
765 library.forEachLocalMember((_element) { 764 library.forEachLocalMember((_element) {
766 AstElement element = _element; 765 AstElement element = _element;
767 if (element.isClass) { 766 if (element.isClass) {
768 ClassElement cls = element; 767 ClassElement cls = element;
769 cls.forEachLocalMember((_member) { 768 cls.forEachLocalMember((_member) {
770 AstElement member = _member; 769 AstElement member = _member;
771 checkElement(compiler, elementMap, member, fullTest: fullTest); 770 checkElement(compiler, elementMap, member, fullTest: fullTest);
772 }); 771 });
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
902 builder.registerFeature(Feature.THROW_EXPRESSION); 901 builder.registerFeature(Feature.THROW_EXPRESSION);
903 break; 902 break;
904 default: 903 default:
905 builder.registerFeature(feature); 904 builder.registerFeature(feature);
906 break; 905 break;
907 } 906 }
908 } 907 }
909 impact.nativeData.forEach(builder.registerNativeData); 908 impact.nativeData.forEach(builder.registerNativeData);
910 return builder; 909 return builder;
911 } 910 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/ssa/kernel_ast_adapter.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698