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

Unified Diff: pkg/compiler/lib/src/ordered_typeset.dart

Issue 1383483006: Extract DiagnosticReporter implementation from Compiler. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Fixes after rebase. Created 5 years, 2 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
« no previous file with comments | « pkg/compiler/lib/src/native/ssa.dart ('k') | pkg/compiler/lib/src/parser/diet_parser_task.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/ordered_typeset.dart
diff --git a/pkg/compiler/lib/src/ordered_typeset.dart b/pkg/compiler/lib/src/ordered_typeset.dart
index 48f32286b71180ab288de98855f3507f34ea4e29..290b94fbc8e1542c4865d2b126421fe7fbb24bf6 100644
--- a/pkg/compiler/lib/src/ordered_typeset.dart
+++ b/pkg/compiler/lib/src/ordered_typeset.dart
@@ -7,6 +7,8 @@ library ordered_typeset;
import 'compiler.dart' show
Compiler;
import 'dart_types.dart';
+import 'diagnostics/diagnostic_listener.dart' show
+ DiagnosticReporter;
import 'diagnostics/invariant.dart' show
invariant;
import 'diagnostics/messages.dart' show
@@ -163,23 +165,25 @@ class OrderedTypeSetBuilder {
if (type.element != compiler.objectClass) {
allSupertypes.addLast(compiler.objectClass.rawType);
}
- _addAtDepth(compiler, type, maxDepth + 1);
+ DiagnosticReporter reporter = compiler.reporter;
+ _addAtDepth(reporter, type, maxDepth + 1);
} else {
if (type.element != compiler.objectClass) {
allSupertypes.addLast(type);
}
- _addAtDepth(compiler, type, type.element.hierarchyDepth);
+ DiagnosticReporter reporter = compiler.reporter;
+ _addAtDepth(reporter, type, type.element.hierarchyDepth);
}
}
- void _addAtDepth(Compiler compiler, InterfaceType type, int depth) {
+ void _addAtDepth(DiagnosticReporter reporter, InterfaceType type, int depth) {
LinkEntry<DartType> prev = null;
LinkEntry<DartType> link = map[depth];
while (link != null) {
DartType existingType = link.head;
if (existingType == type) return;
if (existingType.element == type.element) {
- compiler.reportErrorMessage(
+ reporter.reportErrorMessage(
cls,
MessageKind.MULTI_INHERITANCE,
{'thisType': cls.thisType,
« no previous file with comments | « pkg/compiler/lib/src/native/ssa.dart ('k') | pkg/compiler/lib/src/parser/diet_parser_task.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698