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

Unified Diff: sdk/lib/_internal/compiler/implementation/js_backend/backend.dart

Issue 409473002: A bit of element model cleanup. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated cf. comments. Created 6 years, 5 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: sdk/lib/_internal/compiler/implementation/js_backend/backend.dart
diff --git a/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart b/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart
index 45b3adac2d1708bf06cde49d48f655bbc75beb05..ec4854dd1726e82bf197bbadbdb8916e331023a1 100644
--- a/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart
+++ b/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart
@@ -1835,9 +1835,9 @@ class JavaScriptBackend extends Backend {
}
// Compute a mapping from class to the closures it contains, so we
// can include the correct ones when including the class.
- Map<ClassElement, List<Element>> closureMap =
- new Map<ClassElement, List<Element>>();
- for (FunctionElement closure in compiler.resolverWorld.allClosures) {
+ Map<ClassElement, List<LocalFunctionElement>> closureMap =
+ new Map<ClassElement, List<LocalFunctionElement>>();
+ for (LocalFunctionElement closure in compiler.resolverWorld.allClosures) {
closureMap.putIfAbsent(closure.enclosingClass, () => []).add(closure);
}
bool foundClosure = false;
@@ -1877,7 +1877,7 @@ class JavaScriptBackend extends Backend {
}
}
// 5) all its closures
- List<Element> closures = closureMap[cls];
+ List<LocalFunctionElement> closures = closureMap[cls];
if (closures != null) {
reflectableMembers.addAll(closures);
foundClosure = true;
@@ -1898,10 +1898,10 @@ class JavaScriptBackend extends Backend {
});
// Also add in closures. Those might be reflectable is their enclosing
// member is.
- List<Element> closures = closureMap[cls];
+ List<LocalFunctionElement> closures = closureMap[cls];
if (closures != null) {
- for (Element closure in closures) {
- if (referencedFromMirrorSystem(closure.enclosingMember, false)) {
+ for (LocalFunctionElement closure in closures) {
+ if (referencedFromMirrorSystem(closure.memberContext, false)) {
reflectableMembers.add(closure);
foundClosure = true;
}

Powered by Google App Engine
This is Rietveld 408576698