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

Unified Diff: pkg/compiler/lib/src/serialization/modelz.dart

Issue 1856713002: Test ResolutionImpact equivalence. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Updated cf. comments Created 4 years, 8 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/serialization/modelz.dart
diff --git a/pkg/compiler/lib/src/serialization/modelz.dart b/pkg/compiler/lib/src/serialization/modelz.dart
index 4a0d17eda9cd8927a1d4bc152becd8af01c66805..dc6ede2ad788a04d6d153792e6dd75df82d3026f 100644
--- a/pkg/compiler/lib/src/serialization/modelz.dart
+++ b/pkg/compiler/lib/src/serialization/modelz.dart
@@ -309,10 +309,19 @@ abstract class ContainerMixin
class AbstractFieldElementZ extends ElementZ implements AbstractFieldElement {
final String name;
- final FunctionElement getter;
- final FunctionElement setter;
+ final GetterElementZ getter;
+ final SetterElementZ setter;
- AbstractFieldElementZ(this.name, this.getter, this.setter);
+ AbstractFieldElementZ(this.name, this.getter, this.setter) {
+ if (getter != null) {
+ getter.abstractField = this;
+ getter.setter = setter;
+ }
+ if (setter != null) {
+ setter.abstractField = this;
+ setter.getter = getter;
+ }
+ }
FunctionElement get _canonicalElement => getter != null ? getter : setter;
@@ -1349,7 +1358,7 @@ abstract class FunctionElementZ extends DeserializedElementZ
@override
accept(ElementVisitor visitor, arg) {
- return visitor.visitFunctionElement(this, arg);
+ return visitor.visitMethodElement(this, arg);
}
@override
@@ -1422,7 +1431,7 @@ class LocalFunctionElementZ extends DeserializedElementZ
@override
accept(ElementVisitor visitor, arg) {
- return visitor.visitFunctionElement(this, arg);
+ return visitor.visitLocalFunctionElement(this, arg);
}
@override
@@ -1436,7 +1445,10 @@ abstract class GetterElementZ extends DeserializedElementZ
ParametersMixin,
TypedElementMixin,
MemberElementMixin
- implements FunctionElement {
+ implements GetterElement {
+
+ AbstractFieldElement abstractField;
+ SetterElement setter;
GetterElementZ(ObjectDecoder decoder)
: super(decoder);
@@ -1446,7 +1458,7 @@ abstract class GetterElementZ extends DeserializedElementZ
@override
accept(ElementVisitor visitor, arg) {
- return visitor.visitFunctionElement(this, arg);
+ return visitor.visitGetterElement(this, arg);
}
}
@@ -1474,7 +1486,10 @@ abstract class SetterElementZ extends DeserializedElementZ
ParametersMixin,
TypedElementMixin,
MemberElementMixin
- implements FunctionElement {
+ implements SetterElement {
+
+ AbstractFieldElement abstractField;
+ GetterElement getter;
SetterElementZ(ObjectDecoder decoder)
: super(decoder);
@@ -1484,7 +1499,7 @@ abstract class SetterElementZ extends DeserializedElementZ
@override
accept(ElementVisitor visitor, arg) {
- return visitor.visitFunctionElement(this, arg);
+ return visitor.visitSetterElement(this, arg);
}
}
« no previous file with comments | « pkg/compiler/lib/src/serialization/impact_serialization.dart ('k') | pkg/compiler/lib/src/serialization/task.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698