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

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

Issue 2941033002: Finish strong mode cleaning of dart2js. (Closed)
Patch Set: Add bug numbers and address comments. Created 3 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: pkg/compiler/lib/src/js_backend/mirrors_data.dart
diff --git a/pkg/compiler/lib/src/js_backend/mirrors_data.dart b/pkg/compiler/lib/src/js_backend/mirrors_data.dart
index 0ceaafcaca455f2462a7c57f581d40c8a42117c9..0b7319a4cf5e32b854f6a07c12d5fa6c5cdc2172 100644
--- a/pkg/compiler/lib/src/js_backend/mirrors_data.dart
+++ b/pkg/compiler/lib/src/js_backend/mirrors_data.dart
@@ -372,7 +372,7 @@ class MirrorsDataImpl implements MirrorsData, MirrorsDataBuilder {
}
}
if (metaTargets != null) {
- for (var element in metaTargets) {
+ for (dynamic element in metaTargets) {
if (element is ClassEntity) {
metaTargetsUsed.add(element);
}
@@ -569,7 +569,8 @@ class MirrorsDataImpl implements MirrorsData, MirrorsDataBuilder {
assert(cls.isResolved, failedAt(cls));
_classesNeededForReflection.add(cls);
// 2) its constructors (if resolved)
- cls.constructors.forEach((ConstructorElement constructor) {
+ cls.constructors.forEach((Element _constructor) {
+ ConstructorElement constructor = _constructor;
if (worldBuilder.isMemberUsed(constructor)) {
_membersNeededForReflection.add(constructor);
}
@@ -580,8 +581,8 @@ class MirrorsDataImpl implements MirrorsData, MirrorsDataBuilder {
if (worldBuilder.isMemberUsed(element)) {
memberNames.add(member.name);
_membersNeededForReflection.add(element);
- element.nestedClosures
- .forEach((SynthesizedCallMethodElementX callFunction) {
+ element.nestedClosures.forEach((FunctionElement _callFunction) {
+ SynthesizedCallMethodElementX callFunction = _callFunction;
_membersNeededForReflection.add(callFunction);
_classesNeededForReflection.add(callFunction.closureClass);
});
@@ -589,7 +590,8 @@ class MirrorsDataImpl implements MirrorsData, MirrorsDataBuilder {
});
// 4) all overriding members of subclasses/subtypes (should be resolved)
if (closedWorld.hasAnyStrictSubtype(cls)) {
- closedWorld.forEachStrictSubtypeOf(cls, (ClassElement subcls) {
+ closedWorld.forEachStrictSubtypeOf(cls, (ClassEntity _subcls) {
+ ClassElement subcls = _subcls;
subcls.forEachClassMember((Member member) {
if (memberNames.contains(member.name)) {
// TODO(20993): find out why this assertion fails.
@@ -610,7 +612,8 @@ class MirrorsDataImpl implements MirrorsData, MirrorsDataBuilder {
}
} else {
// check members themselves
- cls.constructors.forEach((ConstructorElement element) {
+ cls.constructors.forEach((Element _element) {
+ ConstructorElement element = _element;
if (!worldBuilder.isMemberUsed(element)) return;
if (_memberReferencedFromMirrorSystem(element)) {
_membersNeededForReflection.add(element);
« no previous file with comments | « pkg/compiler/lib/src/js_backend/mirrors_analysis.dart ('k') | pkg/compiler/lib/src/js_emitter/class_stub_generator.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698