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

Unified Diff: pkg/analyzer/lib/src/fasta/resolution_storer.dart

Issue 2987503003: Further integration of front end type inference into analyzer. (Closed)
Patch Set: Created 3 years, 5 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/analyzer/lib/src/fasta/resolution_storer.dart
diff --git a/pkg/analyzer/lib/src/fasta/resolution_storer.dart b/pkg/analyzer/lib/src/fasta/resolution_storer.dart
index 69d021c199dadd4a4319dde10eaca3e692eead0e..00f95333c5bd1aa294cc82e235bacac89bedb5ba 100644
--- a/pkg/analyzer/lib/src/fasta/resolution_storer.dart
+++ b/pkg/analyzer/lib/src/fasta/resolution_storer.dart
@@ -8,6 +8,9 @@ import 'package:kernel/ast.dart';
/// Type inference listener that records inferred types and file offsets for
/// later use by [ValidatingResolutionApplier].
class InstrumentedResolutionStorer extends ResolutionStorer {
+ /// Indicates whether debug messages should be printed.
+ static const bool _debug = false;
+
final List<int> _typeOffsets;
InstrumentedResolutionStorer(List<DartType> types, this._typeOffsets)
@@ -15,6 +18,9 @@ class InstrumentedResolutionStorer extends ResolutionStorer {
@override
void _recordType(DartType type, int offset) {
+ if (_debug) {
+ print('Recording type $type for offset $offset');
+ }
assert(_types.length == _typeOffsets.length);
_typeOffsets.add(offset);
super._recordType(type, offset);
« no previous file with comments | « pkg/analyzer/lib/src/fasta/resolution_applier.dart ('k') | pkg/front_end/lib/src/fasta/kernel/body_builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698