Skip to content

Commit eee1cdb

Browse files
committed
Fine. Add together declared static and instance members.
There is no difference anymore. Change-Id: I7e50feaff53acedc8a105b247e997f6fcc7afde3 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/423162 Commit-Queue: Konstantin Shcheglov <[email protected]> Reviewed-by: Paul Berry <[email protected]>
1 parent 1e4c02f commit eee1cdb

File tree

1 file changed

+34
-86
lines changed

1 file changed

+34
-86
lines changed

pkg/analyzer/lib/src/fine/library_manifest.dart

Lines changed: 34 additions & 86 deletions
Original file line numberDiff line numberDiff line change
@@ -140,16 +140,11 @@ class LibraryManifestBuilder {
140140
(typeParameters) {
141141
classItem.declaredMembers.clear();
142142
classItem.inheritedMembers.clear();
143-
_addInterfaceElementStaticExecutables(
143+
_addInterfaceElementExecutables(
144144
encodingContext: encodingContext,
145145
instanceElement: element,
146146
interfaceItem: classItem,
147147
);
148-
_addInterfaceElementInstanceExecutables(
149-
encodingContext: encodingContext,
150-
interfaceElement: element,
151-
interfaceItem: classItem,
152-
);
153148
},
154149
);
155150
}
@@ -250,6 +245,36 @@ class LibraryManifestBuilder {
250245
}
251246
}
252247

248+
void _addInstanceElementExecutables({
249+
required EncodeContext encodingContext,
250+
required InstanceElementImpl2 instanceElement,
251+
required InstanceItem instanceItem,
252+
}) {
253+
for (var getter in instanceElement.getters2) {
254+
_addInstanceElementGetter(
255+
encodingContext: encodingContext,
256+
instanceItem: instanceItem,
257+
element: getter,
258+
);
259+
}
260+
261+
for (var method in instanceElement.methods2) {
262+
_addInstanceElementMethod(
263+
encodingContext: encodingContext,
264+
instanceItem: instanceItem,
265+
element: method,
266+
);
267+
}
268+
269+
for (var setter in instanceElement.setters2) {
270+
_addInstanceElementSetter(
271+
encodingContext: encodingContext,
272+
instanceItem: instanceItem,
273+
element: setter,
274+
);
275+
}
276+
}
277+
253278
void _addInstanceElementGetter({
254279
required EncodeContext encodingContext,
255280
required InstanceItem instanceItem,
@@ -322,42 +347,6 @@ class LibraryManifestBuilder {
322347
instanceItem.declaredMembers[lookupName] = item;
323348
}
324349

325-
void _addInstanceElementStaticExecutables({
326-
required EncodeContext encodingContext,
327-
required InstanceElementImpl2 instanceElement,
328-
required InstanceItem instanceItem,
329-
}) {
330-
for (var getter in instanceElement.getters2) {
331-
if (getter.isStatic) {
332-
_addInstanceElementGetter(
333-
encodingContext: encodingContext,
334-
instanceItem: instanceItem,
335-
element: getter,
336-
);
337-
}
338-
}
339-
340-
for (var method in instanceElement.methods2) {
341-
if (method.isStatic) {
342-
_addInstanceElementMethod(
343-
encodingContext: encodingContext,
344-
instanceItem: instanceItem,
345-
element: method,
346-
);
347-
}
348-
}
349-
350-
for (var getter in instanceElement.setters2) {
351-
if (getter.isStatic) {
352-
_addInstanceElementSetter(
353-
encodingContext: encodingContext,
354-
instanceItem: instanceItem,
355-
element: getter,
356-
);
357-
}
358-
}
359-
}
360-
361350
void _addInterfaceElementConstructor({
362351
required EncodeContext encodingContext,
363352
required InterfaceItem interfaceItem,
@@ -378,43 +367,7 @@ class LibraryManifestBuilder {
378367
interfaceItem.declaredMembers[lookupName] = item;
379368
}
380369

381-
void _addInterfaceElementInstanceExecutables({
382-
required EncodeContext encodingContext,
383-
required InterfaceElementImpl2 interfaceElement,
384-
required InterfaceItem interfaceItem,
385-
}) {
386-
for (var getter in interfaceElement.getters2) {
387-
if (!getter.isStatic) {
388-
_addInstanceElementGetter(
389-
encodingContext: encodingContext,
390-
instanceItem: interfaceItem,
391-
element: getter,
392-
);
393-
}
394-
}
395-
396-
for (var method in interfaceElement.methods2) {
397-
if (!method.isStatic) {
398-
_addInstanceElementMethod(
399-
encodingContext: encodingContext,
400-
instanceItem: interfaceItem,
401-
element: method,
402-
);
403-
}
404-
}
405-
406-
for (var setter in interfaceElement.setters2) {
407-
if (!setter.isStatic) {
408-
_addInstanceElementSetter(
409-
encodingContext: encodingContext,
410-
instanceItem: interfaceItem,
411-
element: setter,
412-
);
413-
}
414-
}
415-
}
416-
417-
void _addInterfaceElementStaticExecutables({
370+
void _addInterfaceElementExecutables({
418371
required EncodeContext encodingContext,
419372
required InterfaceElementImpl2 instanceElement,
420373
required InterfaceItem interfaceItem,
@@ -434,7 +387,7 @@ class LibraryManifestBuilder {
434387
);
435388
}
436389

437-
_addInstanceElementStaticExecutables(
390+
_addInstanceElementExecutables(
438391
encodingContext: encodingContext,
439392
instanceElement: instanceElement,
440393
instanceItem: interfaceItem,
@@ -461,16 +414,11 @@ class LibraryManifestBuilder {
461414
(typeParameters) {
462415
mixinItem.declaredMembers.clear();
463416
mixinItem.inheritedMembers.clear();
464-
_addInterfaceElementStaticExecutables(
417+
_addInterfaceElementExecutables(
465418
encodingContext: encodingContext,
466419
instanceElement: element,
467420
interfaceItem: mixinItem,
468421
);
469-
_addInterfaceElementInstanceExecutables(
470-
encodingContext: encodingContext,
471-
interfaceElement: element,
472-
interfaceItem: mixinItem,
473-
);
474422
},
475423
);
476424
}

0 commit comments

Comments
 (0)