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

Side by Side Diff: pkg/compiler/lib/src/info/naive_analysis_result.dart

Issue 1859343004: dartfmt pkg/compiler (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 /// API to get results from a static analysis of the source program. 5 /// API to get results from a static analysis of the source program.
6 // TODO(sigmund): split out implementations out of this file. 6 // TODO(sigmund): split out implementations out of this file.
7 library compiler.src.stats.naive_analysis_result; 7 library compiler.src.stats.naive_analysis_result;
8 8
9 import 'analysis_result.dart'; 9 import 'analysis_result.dart';
10 import '../tree/tree.dart' show Node; 10 import '../tree/tree.dart' show Node;
11 import '../universe/selector.dart' show Selector; 11 import '../universe/selector.dart' show Selector;
12 12
13 /// A naive [AnalysisResult] that tells us very little. This is the most 13 /// A naive [AnalysisResult] that tells us very little. This is the most
14 /// conservative we can be when we only use information from the AST structure 14 /// conservative we can be when we only use information from the AST structure
15 /// and from resolution, but no type information. 15 /// and from resolution, but no type information.
16 class NaiveAnalysisResult implements AnalysisResult { 16 class NaiveAnalysisResult implements AnalysisResult {
17 NaiveAnalysisResult(); 17 NaiveAnalysisResult();
18 18
19 ReceiverInfo infoForReceiver(Node receiver) => 19 ReceiverInfo infoForReceiver(Node receiver) =>
20 new NaiveReceiverInfo(receiver); 20 new NaiveReceiverInfo(receiver);
21 SelectorInfo infoForSelector(Node receiver, Selector selector) => 21 SelectorInfo infoForSelector(Node receiver, Selector selector) =>
22 new NaiveSelectorInfo(receiver, selector); 22 new NaiveSelectorInfo(receiver, selector);
23 } 23 }
24 24
25 class NaiveReceiverInfo implements ReceiverInfo { 25 class NaiveReceiverInfo implements ReceiverInfo {
26 final Node receiver; 26 final Node receiver;
27 27
28 NaiveReceiverInfo(this.receiver); 28 NaiveReceiverInfo(this.receiver);
29 Boolish get hasNoSuchMethod => Boolish.maybe; 29 Boolish get hasNoSuchMethod => Boolish.maybe;
30 Boolish get isNull => Boolish.maybe; 30 Boolish get isNull => Boolish.maybe;
31 int get possibleNsmTargets => -1; 31 int get possibleNsmTargets => -1;
32 } 32 }
33 33
34 class NaiveSelectorInfo implements SelectorInfo { 34 class NaiveSelectorInfo implements SelectorInfo {
35 final Node receiver; 35 final Node receiver;
36 final Selector selector; 36 final Selector selector;
37 37
38 NaiveSelectorInfo(this.receiver, this.selector); 38 NaiveSelectorInfo(this.receiver, this.selector);
39 39
40 Boolish get exists => Boolish.maybe; 40 Boolish get exists => Boolish.maybe;
41 Boolish get usesInterceptor => Boolish.maybe; 41 Boolish get usesInterceptor => Boolish.maybe;
42 int get possibleTargets => -1; 42 int get possibleTargets => -1;
43 bool get isAccurate => false; 43 bool get isAccurate => false;
44 } 44 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/inferrer/type_graph_nodes.dart ('k') | pkg/compiler/lib/src/info/send_info.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698