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

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

Issue 2615943004: Reapply "reflectType() dynamic type arguments support (#26012)" (Closed)
Patch Set: Add a test. 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 | « no previous file | pkg/compiler/lib/src/mirrors_used.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 1969 matching lines...) Expand 10 before | Expand all | Expand 10 after
1980 bool isAccessibleByReflection(Element element) { 1980 bool isAccessibleByReflection(Element element) {
1981 if (element.isClass) { 1981 if (element.isClass) {
1982 element = getDartClass(element); 1982 element = getDartClass(element);
1983 } 1983 }
1984 return membersNeededForReflection.contains(element); 1984 return membersNeededForReflection.contains(element);
1985 } 1985 }
1986 1986
1987 /** 1987 /**
1988 * Returns true if the element has to be resolved due to a mirrorsUsed 1988 * Returns true if the element has to be resolved due to a mirrorsUsed
1989 * annotation. If we have insufficient mirrors used annotations, we only 1989 * annotation. If we have insufficient mirrors used annotations, we only
1990 * keep additonal elements if treeshaking has been disabled. 1990 * keep additional elements if treeshaking has been disabled.
1991 */ 1991 */
1992 bool requiredByMirrorSystem(Element element) { 1992 bool requiredByMirrorSystem(Element element) {
1993 return hasInsufficientMirrorsUsed && isTreeShakingDisabled || 1993 return hasInsufficientMirrorsUsed && isTreeShakingDisabled ||
1994 matchesMirrorsMetaTarget(element) || 1994 matchesMirrorsMetaTarget(element) ||
1995 targetsUsed.contains(element); 1995 targetsUsed.contains(element);
1996 } 1996 }
1997 1997
1998 /** 1998 /**
1999 * Returns true if the element matches a mirrorsUsed annotation. If 1999 * Returns true if the element matches a mirrorsUsed annotation. If
2000 * we have insufficient mirrorsUsed information, this returns true for 2000 * we have insufficient mirrorsUsed information, this returns true for
(...skipping 1276 matching lines...) Expand 10 before | Expand all | Expand 10 after
3277 @override 3277 @override
3278 bool isNativeClass(ClassElement element) { 3278 bool isNativeClass(ClassElement element) {
3279 return helpers.backend.isNative(element); 3279 return helpers.backend.isNative(element);
3280 } 3280 }
3281 3281
3282 @override 3282 @override
3283 bool isNativeMember(MemberElement element) { 3283 bool isNativeMember(MemberElement element) {
3284 return helpers.backend.isNative(element); 3284 return helpers.backend.isNative(element);
3285 } 3285 }
3286 } 3286 }
OLDNEW
« no previous file with comments | « no previous file | pkg/compiler/lib/src/mirrors_used.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698