| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |