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

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

Issue 2647793003: Use entities in some full_emitter sublibraries (Closed)
Patch Set: 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
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 1973 matching lines...) Expand 10 before | Expand all | Expand 10 after
1984 * accessed (invoked, get, set) that is not accessible for the reflective 1984 * accessed (invoked, get, set) that is not accessible for the reflective
1985 * system. 1985 * system.
1986 */ 1986 */
1987 bool isAccessibleByReflection(Element element) { 1987 bool isAccessibleByReflection(Element element) {
1988 if (element.isClass) { 1988 if (element.isClass) {
1989 element = getDartClass(element); 1989 element = getDartClass(element);
1990 } 1990 }
1991 return membersNeededForReflection.contains(element); 1991 return membersNeededForReflection.contains(element);
1992 } 1992 }
1993 1993
1994 bool isMemberAccessibleByReflection(MemberElement element) {
1995 return membersNeededForReflection.contains(element);
1996 }
1997
1994 /** 1998 /**
1995 * Returns true if the element has to be resolved due to a mirrorsUsed 1999 * Returns true if the element has to be resolved due to a mirrorsUsed
1996 * annotation. If we have insufficient mirrors used annotations, we only 2000 * annotation. If we have insufficient mirrors used annotations, we only
1997 * keep additional elements if treeshaking has been disabled. 2001 * keep additional elements if treeshaking has been disabled.
1998 */ 2002 */
1999 bool requiredByMirrorSystem(Element element) { 2003 bool requiredByMirrorSystem(Element element) {
2000 return hasInsufficientMirrorsUsed && isTreeShakingDisabled || 2004 return hasInsufficientMirrorsUsed && isTreeShakingDisabled ||
2001 matchesMirrorsMetaTarget(element) || 2005 matchesMirrorsMetaTarget(element) ||
2002 targetsUsed.contains(element); 2006 targetsUsed.contains(element);
2003 } 2007 }
(...skipping 1292 matching lines...) Expand 10 before | Expand all | Expand 10 after
3296 @override 3300 @override
3297 bool isNativeClass(ClassElement element) { 3301 bool isNativeClass(ClassElement element) {
3298 return helpers.backend.isNative(element); 3302 return helpers.backend.isNative(element);
3299 } 3303 }
3300 3304
3301 @override 3305 @override
3302 bool isNativeMember(MemberElement element) { 3306 bool isNativeMember(MemberElement element) {
3303 return helpers.backend.isNative(element); 3307 return helpers.backend.isNative(element);
3304 } 3308 }
3305 } 3309 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698