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

Unified Diff: pkg/compiler/lib/src/js_backend/mirrors_analysis.dart

Issue 2549423002: Change Enqueuer to use Entity instead of Element. (Closed)
Patch Set: Updated cf. comments. Created 4 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/compiler/lib/src/js_backend/enqueuer.dart ('k') | pkg/compiler/lib/src/ssa/builder.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/js_backend/mirrors_analysis.dart
diff --git a/pkg/compiler/lib/src/js_backend/mirrors_analysis.dart b/pkg/compiler/lib/src/js_backend/mirrors_analysis.dart
index c66c8f1d0a116168e3c28f7cadfb4e2ff6645834..5207421c61be4b65eb5327cf29c904f425171863 100644
--- a/pkg/compiler/lib/src/js_backend/mirrors_analysis.dart
+++ b/pkg/compiler/lib/src/js_backend/mirrors_analysis.dart
@@ -8,6 +8,7 @@ import '../common.dart';
import '../common/resolution.dart';
import '../diagnostics/diagnostic_listener.dart';
import '../elements/elements.dart';
+import '../elements/entities.dart';
import '../universe/selector.dart';
import '../universe/use.dart';
import '../universe/world_impact.dart';
@@ -24,8 +25,8 @@ class MirrorsAnalysis {
/// Compute the impact for elements that are matched by the mirrors used
/// annotation or, in lack thereof, all elements.
WorldImpact computeImpactForReflectiveElements(
- Iterable<ClassElement> recents,
- Iterable<ClassElement> processedClasses,
+ Iterable<ClassEntity> recents,
+ Iterable<ClassEntity> processedClasses,
Iterable<LibraryElement> loadedLibraries,
{bool forResolution}) {
MirrorsHandler handler = forResolution ? resolutionHandler : codegenHandler;
@@ -135,7 +136,7 @@ class MirrorsHandler {
/// [enclosingWasIncluded] provides a hint whether the enclosing element was
/// needed for reflection.
void _enqueueReflectiveElementsInClass(
- ClassElement cls, Iterable<ClassElement> recents,
+ ClassElement cls, Iterable<ClassEntity> recents,
{bool enclosingWasIncluded}) {
if (cls.library.isInternalLibrary || cls.isInjected) return;
bool includeClass = _shouldIncludeElementDueToMirrors(cls,
@@ -184,7 +185,7 @@ class MirrorsHandler {
/// Enqeue all local members of the library [lib] if they are required for
/// reflection.
void _enqueueReflectiveElementsInLibrary(
- LibraryElement lib, Iterable<ClassElement> recents) {
+ LibraryElement lib, Iterable<ClassEntity> recents) {
bool includeLibrary =
_shouldIncludeElementDueToMirrors(lib, includedEnclosing: false);
lib.forEachLocalMember((Element member) {
@@ -207,8 +208,8 @@ class MirrorsHandler {
/// annotation or, in lack thereof, all elements.
// TODO(johnniwinther): Compute [WorldImpact] instead of enqueuing directly.
void enqueueReflectiveElements(
- Iterable<ClassElement> recents,
- Iterable<ClassElement> processedClasses,
+ Iterable<ClassEntity> recents,
+ Iterable<ClassEntity> processedClasses,
Iterable<LibraryElement> loadedLibraries) {
if (!hasEnqueuedReflectiveElements) {
_logEnqueueReflectiveAction("!START enqueueAll");
« no previous file with comments | « pkg/compiler/lib/src/js_backend/enqueuer.dart ('k') | pkg/compiler/lib/src/ssa/builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698