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

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

Issue 2925263002: A step towards handling `new Object()` in compile_from_dill_test (Closed)
Patch Set: 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/elements/common.dart
diff --git a/pkg/compiler/lib/src/elements/common.dart b/pkg/compiler/lib/src/elements/common.dart
index b307f09d5aafc99d92132f285f40413292df81e2..76a965fd9f2425e22cc57be041ccbba05ccfaba4 100644
--- a/pkg/compiler/lib/src/elements/common.dart
+++ b/pkg/compiler/lib/src/elements/common.dart
@@ -473,11 +473,12 @@ abstract class ClassElementCommon implements ClassElement {
// backendMembers are members that have been added by the backend to simplify
// compilation. They don't have any user-side counter-part.
- Link<Element> backendMembers = const Link<Element>();
+ Link<ConstructorBodyElement> backendMembers =
Siggi Cherem (dart-lang) 2017/06/08 18:01:46 TODO: rename?
Johnni Winther 2017/06/09 09:28:49 Renamed all methods - and removed the reverseBacke
+ const Link<ConstructorBodyElement>();
bool get hasBackendMembers => !backendMembers.isEmpty;
- void addBackendMember(Element member) {
+ void addBackendMember(ConstructorBodyElement member) {
// TODO(ngeoffray): Deprecate this method.
assert(member.isGenerativeConstructorBody);
backendMembers = backendMembers.prepend(member);
@@ -488,8 +489,8 @@ abstract class ClassElementCommon implements ClassElement {
}
/// Lookup a synthetic element created by the backend.
- Element lookupBackendMember(String memberName) {
- for (Element element in backendMembers) {
+ ConstructorBodyElement lookupBackendMember(String memberName) {
+ for (ConstructorBodyElement element in backendMembers) {
if (element.name == memberName) {
return element;
}
@@ -497,7 +498,7 @@ abstract class ClassElementCommon implements ClassElement {
return null;
}
- void forEachBackendMember(void f(Element member)) {
+ void forEachBackendMember(void f(ConstructorBodyElement member)) {
backendMembers.forEach(f);
}
}

Powered by Google App Engine
This is Rietveld 408576698