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

Side by Side Diff: pkg/front_end/lib/src/base/instrumentation.dart

Issue 2863733003: Hook up full list literal type inference logic. (Closed)
Patch Set: Created 3 years, 7 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 import 'package:kernel/ast.dart'; 5 import 'package:kernel/ast.dart';
6 6
7 /// Interface providing the ability to record property/value pairs associated 7 /// Interface providing the ability to record property/value pairs associated
8 /// with source file locations. Intended to facilitate testing. 8 /// with source file locations. Intended to facilitate testing.
9 abstract class Instrumentation { 9 abstract class Instrumentation {
10 /// Records a property/value pair associated with the given URI and offset. 10 /// Records a property/value pair associated with the given URI and offset.
(...skipping 27 matching lines...) Expand all
38 // Remove prefixes that are used very often in tests. 38 // Remove prefixes that are used very often in tests.
39 return type 39 return type
40 .toString() 40 .toString()
41 .replaceAll('→', '->') 41 .replaceAll('→', '->')
42 .replaceAll('dart.core::', '') 42 .replaceAll('dart.core::', '')
43 .replaceAll('dart.async::', '') 43 .replaceAll('dart.async::', '')
44 .replaceAll('test::', ''); 44 .replaceAll('test::', '');
45 } 45 }
46 } 46 }
47 47
48 /// Instance of [InstrumentationValue] describing a list of [DartType]s.
49 class InstrumentationValueForTypeArgs extends InstrumentationValue {
50 final List<DartType> types;
51
52 InstrumentationValueForTypeArgs(this.types);
53
54 @override
55 String toString() => types
56 .map((type) => new InstrumentationValueForType(type).toString())
57 .join(', ');
58 }
59
48 /// Instance of [InstrumentationValue] which only matches the given literal 60 /// Instance of [InstrumentationValue] which only matches the given literal
49 /// string. 61 /// string.
50 class InstrumentationValueLiteral extends InstrumentationValue { 62 class InstrumentationValueLiteral extends InstrumentationValue {
51 final String value; 63 final String value;
52 64
53 const InstrumentationValueLiteral(this.value); 65 const InstrumentationValueLiteral(this.value);
54 66
55 @override 67 @override
56 String toString() => value; 68 String toString() => value;
57 } 69 }
OLDNEW
« no previous file with comments | « pkg/analyzer_plugin/analyzer_plugin.iml ('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