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

Side by Side Diff: pkg/compiler/lib/src/native/behavior.dart

Issue 1880323002: dart2js cleanup: remove unused imports and variables (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: merge master 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
« no previous file with comments | « pkg/compiler/lib/src/mirrors_used.dart ('k') | pkg/compiler/lib/src/native/enqueue.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) 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 import '../common.dart'; 5 import '../common.dart';
6 import '../common/backend_api.dart' show ForeignResolver; 6 import '../common/backend_api.dart' show ForeignResolver;
7 import '../common/resolution.dart' show Parsing, Resolution; 7 import '../common/resolution.dart' show Parsing, Resolution;
8 import '../compiler.dart' show Compiler; 8 import '../compiler.dart' show Compiler;
9 import '../constants/values.dart'; 9 import '../constants/values.dart';
10 import '../core_types.dart' show CoreTypes; 10 import '../core_types.dart' show CoreTypes;
(...skipping 797 matching lines...) Expand 10 before | Expand all | Expand 10 after
808 type.computeUnaliased(resolution); 808 type.computeUnaliased(resolution);
809 type = type.unaliased; 809 type = type.unaliased;
810 if (type is FunctionType) { 810 if (type is FunctionType) {
811 FunctionType functionType = type; 811 FunctionType functionType = type;
812 _capture(functionType.returnType, resolution, 812 _capture(functionType.returnType, resolution,
813 isInterop: isInterop, compiler: compiler); 813 isInterop: isInterop, compiler: compiler);
814 for (DartType parameter in functionType.parameterTypes) { 814 for (DartType parameter in functionType.parameterTypes) {
815 _escape(parameter, resolution); 815 _escape(parameter, resolution);
816 } 816 }
817 } else { 817 } else {
818 DartType instantiated = null;
819 JavaScriptBackend backend = compiler?.backend; 818 JavaScriptBackend backend = compiler?.backend;
820 if (!isInterop) { 819 if (!isInterop) {
821 typesInstantiated.add(type); 820 typesInstantiated.add(type);
822 } else { 821 } else {
823 if (type.element != null && backend.isNative(type.element)) { 822 if (type.element != null && backend.isNative(type.element)) {
824 // Any declared native or interop type (isNative implies isJsInterop) 823 // Any declared native or interop type (isNative implies isJsInterop)
825 // is assumed to be allocated. 824 // is assumed to be allocated.
826 typesInstantiated.add(type); 825 typesInstantiated.add(type);
827 } 826 }
828 827
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
872 reporter.reportErrorMessage(_errorNode(locationNodeOrElement, parsing), 871 reporter.reportErrorMessage(_errorNode(locationNodeOrElement, parsing),
873 MessageKind.GENERIC, {'text': "Type '$typeString' not found."}); 872 MessageKind.GENERIC, {'text': "Type '$typeString' not found."});
874 return const DynamicType(); 873 return const DynamicType();
875 } 874 }
876 875
877 static _errorNode(locationNodeOrElement, Parsing parsing) { 876 static _errorNode(locationNodeOrElement, Parsing parsing) {
878 if (locationNodeOrElement is Node) return locationNodeOrElement; 877 if (locationNodeOrElement is Node) return locationNodeOrElement;
879 return locationNodeOrElement.parseNode(parsing); 878 return locationNodeOrElement.parseNode(parsing);
880 } 879 }
881 } 880 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/mirrors_used.dart ('k') | pkg/compiler/lib/src/native/enqueue.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698