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

Side by Side Diff: pkg/compiler/lib/src/js_backend/backend.dart

Issue 2647043002: Fix hints reported by analyzer. (Closed)
Patch Set: Address review comments. 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
« no previous file with comments | « pkg/compiler/lib/src/js/js.dart ('k') | pkg/compiler/lib/src/js_backend/backend_helpers.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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 js_backend.backend; 5 library js_backend.backend;
6 6
7 import 'dart:async' show Future; 7 import 'dart:async' show Future;
8 8
9 import 'package:js_runtime/shared/embedded_names.dart' as embeddedNames; 9 import 'package:js_runtime/shared/embedded_names.dart' as embeddedNames;
10 10
(...skipping 880 matching lines...) Expand 10 before | Expand all | Expand 10 after
891 return elements 891 return elements
892 .where((element) => classesMixedIntoInterceptedClasses 892 .where((element) => classesMixedIntoInterceptedClasses
893 .contains(element.enclosingClass)) 893 .contains(element.enclosingClass))
894 .toSet(); 894 .toSet();
895 }); 895 });
896 896
897 if (elements == null) return false; 897 if (elements == null) return false;
898 if (elements.isEmpty) return false; 898 if (elements.isEmpty) return false;
899 return elements.any((element) { 899 return elements.any((element) {
900 return selector.applies(element) && 900 return selector.applies(element) &&
901 (mask == null || mask.canHit(element, selector, _closedWorld)); 901 (mask == null ||
902 mask.canHit(element as MemberElement, selector, _closedWorld));
902 }); 903 });
903 } 904 }
904 905
905 /// True if the given class is an internal class used for type inference 906 /// True if the given class is an internal class used for type inference
906 /// and never exists at runtime. 907 /// and never exists at runtime.
907 bool isCompileTimeOnlyClass(ClassElement class_) { 908 bool isCompileTimeOnlyClass(ClassElement class_) {
908 return class_ == helpers.jsPositiveIntClass || 909 return class_ == helpers.jsPositiveIntClass ||
909 class_ == helpers.jsUInt32Class || 910 class_ == helpers.jsUInt32Class ||
910 class_ == helpers.jsUInt31Class || 911 class_ == helpers.jsUInt31Class ||
911 class_ == helpers.jsFixedArrayClass || 912 class_ == helpers.jsFixedArrayClass ||
(...skipping 2374 matching lines...) Expand 10 before | Expand all | Expand 10 after
3286 @override 3287 @override
3287 bool isNativeClass(ClassElement element) { 3288 bool isNativeClass(ClassElement element) {
3288 return helpers.backend.isNative(element); 3289 return helpers.backend.isNative(element);
3289 } 3290 }
3290 3291
3291 @override 3292 @override
3292 bool isNativeMember(MemberElement element) { 3293 bool isNativeMember(MemberElement element) {
3293 return helpers.backend.isNative(element); 3294 return helpers.backend.isNative(element);
3294 } 3295 }
3295 } 3296 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/js/js.dart ('k') | pkg/compiler/lib/src/js_backend/backend_helpers.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698