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

Unified Diff: pkg/compiler/lib/src/elements/common.dart

Issue 1802883002: Use JS backend in serialization_analysis_test (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Serialize ClassElement.isUnnamedMixinApplication and test added properties. Created 4 years, 9 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
« no previous file with comments | « pkg/compiler/lib/src/compiler.dart ('k') | pkg/compiler/lib/src/elements/modelx.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/elements/common.dart
diff --git a/pkg/compiler/lib/src/elements/common.dart b/pkg/compiler/lib/src/elements/common.dart
index 1e24ff08b0b3ba5fe1d2e2dddba068f20f334af7..5d5f9e673b1dded81eb95979df4008026cca1415 100644
--- a/pkg/compiler/lib/src/elements/common.dart
+++ b/pkg/compiler/lib/src/elements/common.dart
@@ -123,6 +123,19 @@ abstract class ElementCommon implements Element {
Element get origin {
throw new UnsupportedError('origin is not supported on $this');
}
+
+ @override
+ ClassElement get contextClass {
+ ClassElement cls;
+ for (Element e = this; e != null; e = e.enclosingElement) {
+ if (e.isClass) {
+ // Record [e] instead of returning it directly. We need the last class
+ // in the chain since the first classes might be closure classes.
+ cls = e.declaration;
+ }
+ }
+ return cls;
+ }
}
abstract class LibraryElementCommon implements LibraryElement {
@@ -331,7 +344,7 @@ abstract class ClassElementCommon implements ClassElement {
classElement.forEachBackendMember((e) => f(classElement, e));
}
if (includeInjectedMembers) {
- if (classElement.patch != null) {
+ if (classElement.isPatched) {
classElement.patch.forEachLocalMember((e) {
if (!e.isPatch) f(classElement, e);
});
« no previous file with comments | « pkg/compiler/lib/src/compiler.dart ('k') | pkg/compiler/lib/src/elements/modelx.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698