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

Unified Diff: pkg/compiler/lib/src/elements/elements.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/elements.dart
diff --git a/pkg/compiler/lib/src/elements/elements.dart b/pkg/compiler/lib/src/elements/elements.dart
index 19b54a6e46b8eab0ddf41cc4b1c8d023f44f952f..48e7d9e609e09aafa96bd3b29628e622c633eb8f 100644
--- a/pkg/compiler/lib/src/elements/elements.dart
+++ b/pkg/compiler/lib/src/elements/elements.dart
@@ -507,17 +507,6 @@ class Elements {
(identical(element.kind, ElementKind.FUNCTION));
}
- /// Also returns true for [ConstructorBodyElement]s and getters/setters.
- static bool isNonAbstractInstanceMember(Element element) {
- // The generative constructor body is not a function. We therefore treat
- // it specially.
- if (element.isGenerativeConstructorBody) return true;
- return !Elements.isUnresolved(element) &&
- !element.isAbstract &&
- element.isInstanceMember &&
- (element.isFunction || element.isAccessor);
- }
-
static bool isInstanceSend(Send send, TreeElements elements) {
Element element = elements[send];
if (element == null) return !isClosureSend(send, element);
@@ -1542,7 +1531,7 @@ abstract class ClassElement extends TypeDeclarationElement
/// Returns `true` if the class hierarchy for this class contains errors.
bool get hasIncompleteHierarchy;
- void addBackendMember(Element element);
+ void addBackendMember(ConstructorBodyElement element);
void reverseBackendMembers();
Element lookupMember(String memberName);
@@ -1556,7 +1545,7 @@ abstract class ClassElement extends TypeDeclarationElement
MemberElement lookupSuperByName(Name memberName);
Element lookupLocalMember(String memberName);
- Element lookupBackendMember(String memberName);
+ ConstructorBodyElement lookupBackendMember(String memberName);
Element lookupSuperMember(String memberName);
Element lookupSuperMemberInLibrary(String memberName, LibraryElement library);
@@ -1577,7 +1566,7 @@ abstract class ClassElement extends TypeDeclarationElement
/// Similar to [forEachInstanceField] but visits static fields.
void forEachStaticField(void f(ClassElement enclosingClass, Element field));
- void forEachBackendMember(void f(Element member));
+ void forEachBackendMember(void f(ConstructorBodyElement member));
/// Looks up the member [name] in this class.
Member lookupClassMember(Name name);

Powered by Google App Engine
This is Rietveld 408576698