Chromium Code Reviews

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

Issue 1520293002: Add token invariant to DiagnosticReporter (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
« no previous file with comments | « pkg/compiler/lib/src/resolution/registry.dart ('k') | pkg/compiler/lib/src/resolution/tree_elements.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/resolution/resolution.dart
diff --git a/pkg/compiler/lib/src/resolution/resolution.dart b/pkg/compiler/lib/src/resolution/resolution.dart
index 737b5f041b975c65c3818223fde6927985f0f4bd..4c5270286b94815370f90816ff2b1797ac7cfb18 100644
--- a/pkg/compiler/lib/src/resolution/resolution.dart
+++ b/pkg/compiler/lib/src/resolution/resolution.dart
@@ -513,7 +513,7 @@ class ResolverTask extends CompilerTask {
* called by [resolveClass] and [ClassSupertypeResolver].
*/
void loadSupertypes(BaseClassElementX cls, Spannable from) {
- reporter.withCurrentElement(cls, () => measure(() {
+ measure(() {
if (cls.supertypeLoadState == STATE_DONE) return;
if (cls.supertypeLoadState == STATE_STARTED) {
reporter.reportErrorMessage(
@@ -540,7 +540,7 @@ class ResolverTask extends CompilerTask {
cls.supertypeLoadState = STATE_DONE;
}
});
- }));
+ });
}
// TODO(johnniwinther): Remove this queue when resolution has been split into
@@ -763,7 +763,7 @@ class ResolverTask extends CompilerTask {
ClassElement mixin) {
// TODO(johnniwinther): Avoid the use of [TreeElements] here.
if (resolutionTree == null) return;
- Iterable<Node> superUses = resolutionTree.superUses;
+ Iterable<SourceSpan> superUses = resolutionTree.superUses;
if (superUses.isEmpty) return;
DiagnosticMessage error = reporter.createMessage(
mixinApplication,
@@ -771,7 +771,7 @@ class ResolverTask extends CompilerTask {
{'className': mixin.name});
// Show the user the problematic uses of 'super' in the mixin.
List<DiagnosticMessage> infos = <DiagnosticMessage>[];
- for (Node use in superUses) {
+ for (SourceSpan use in superUses) {
infos.add(reporter.createMessage(
use,
MessageKind.ILLEGAL_MIXIN_SUPER_USE));
@@ -1046,7 +1046,7 @@ class ResolverTask extends CompilerTask {
}
void resolveMetadataAnnotation(MetadataAnnotationX annotation) {
- reporter.withCurrentElement(annotation.annotatedElement, () => measure(() {
+ reporter.withCurrentElement(annotation.annotatedElement.enclosingElement, () => measure(() {
Siggi Cherem (dart-lang) 2015/12/14 22:54:44 nit => 80 col
Johnni Winther 2015/12/15 10:28:01 Done.
assert(annotation.resolutionState == STATE_NOT_STARTED);
annotation.resolutionState = STATE_STARTED;
« no previous file with comments | « pkg/compiler/lib/src/resolution/registry.dart ('k') | pkg/compiler/lib/src/resolution/tree_elements.dart » ('j') | no next file with comments »

Powered by Google App Engine