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

Unified Diff: pkg/compiler/lib/src/js_backend/no_such_method_registry.dart

Issue 2857943002: Implement KernelNoSuchMethodResolver. (Closed)
Patch Set: Created 3 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/js_backend/no_such_method_registry.dart
diff --git a/pkg/compiler/lib/src/js_backend/no_such_method_registry.dart b/pkg/compiler/lib/src/js_backend/no_such_method_registry.dart
index a401e0585eb1de672ccca32915527e929a9f714e..b8f655ec1ce91fb7742780dc9065ef0d55889d48 100644
--- a/pkg/compiler/lib/src/js_backend/no_such_method_registry.dart
+++ b/pkg/compiler/lib/src/js_backend/no_such_method_registry.dart
@@ -70,9 +70,9 @@ class NoSuchMethodRegistry {
final Set<FunctionEntity> _uncategorizedImpls = new Set<FunctionEntity>();
final CommonElements _commonElements;
- final NoSuchMethodResolver _resolver;
+ final NoSuchMethodResolver resolver;
- NoSuchMethodRegistry(this._commonElements, this._resolver);
+ NoSuchMethodRegistry(this._commonElements, this.resolver);
bool get hasThrowingNoSuchMethod => throwingImpls.isNotEmpty;
bool get hasComplexNoSuchMethod => otherImpls.isNotEmpty;
@@ -104,17 +104,17 @@ class NoSuchMethodRegistry {
/// Emits a diagnostic
void emitDiagnostic(DiagnosticReporter reporter) {
throwingImpls.forEach((e) {
- if (!_resolver.hasForwardingSyntax(e)) {
+ if (!resolver.hasForwardingSyntax(e)) {
reporter.reportHintMessage(e, MessageKind.DIRECTLY_THROWING_NSM);
}
});
complexNoReturnImpls.forEach((e) {
- if (!_resolver.hasForwardingSyntax(e)) {
+ if (!resolver.hasForwardingSyntax(e)) {
reporter.reportHintMessage(e, MessageKind.COMPLEX_THROWING_NSM);
}
});
complexReturningImpls.forEach((e) {
- if (!_resolver.hasForwardingSyntax(e)) {
+ if (!resolver.hasForwardingSyntax(e)) {
reporter.reportHintMessage(e, MessageKind.COMPLEX_RETURNING_NSM);
}
});
@@ -149,10 +149,10 @@ class NoSuchMethodRegistry {
if (_commonElements.isDefaultNoSuchMethodImplementation(element)) {
defaultImpls.add(element);
return NsmCategory.DEFAULT;
- } else if (_resolver.hasForwardingSyntax(element)) {
+ } else if (resolver.hasForwardingSyntax(element)) {
// If the implementation is 'noSuchMethod(x) => super.noSuchMethod(x);'
// then it is in the same category as the super call.
- FunctionEntity superCall = _resolver.getSuperNoSuchMethod(element);
+ FunctionEntity superCall = resolver.getSuperNoSuchMethod(element);
NsmCategory category = _categorizeImpl(superCall);
switch (category) {
case NsmCategory.DEFAULT:
@@ -172,7 +172,7 @@ class NoSuchMethodRegistry {
break;
}
return category;
- } else if (_resolver.hasThrowingSyntax(element)) {
+ } else if (resolver.hasThrowingSyntax(element)) {
throwingImpls.add(element);
return NsmCategory.THROWING;
} else {
« no previous file with comments | « no previous file | pkg/compiler/lib/src/kernel/element_map.dart » ('j') | pkg/compiler/lib/src/kernel/no_such_method_resolver.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698