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

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

Issue 1220043005: dart2js send stats, includes: (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: 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 unified diff | Download patch
OLDNEW
(Empty)
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
3 // BSD-style license that can be found in the LICENSE file.
4
5 /// API to get results from a static analysis of the source program.
6 // TODO(sigmund): split out implementations out of this file.
7 library compiler.src.stats.naive_analysis_result;
8
9 import 'analysis_result.dart';
10 import '../tree/tree.dart' show Node;
11 import '../universe/selector.dart' show Selector;
12
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
15 /// and from resolution, but no type information.
16 class NaiveAnalysisResult implements AnalysisResult {
17 NaiveAnalysisResult();
18
19 ReceiverInfo infoForReceiver(Node receiver) =>
20 new NaiveReceiverInfo(receiver);
21 SelectorInfo infoForSelector(Node receiver, Selector selector) =>
22 new NaiveSelectorInfo(receiver, selector);
23 }
24
25 class NaiveReceiverInfo implements ReceiverInfo {
26 final Node receiver;
27
28 NaiveReceiverInfo(this.receiver);
29 Boolish get hasNoSuchMethod => Boolish.maybe;
30 Boolish get isNull => Boolish.maybe;
31 int get possibleNsmTargets => -1;
32 }
33
34 class NaiveSelectorInfo implements SelectorInfo {
35 final Node receiver;
36 final Selector selector;
37
38 NaiveSelectorInfo(this.receiver, this.selector);
39
40 Boolish get exists => Boolish.maybe;
41 Boolish get usesInterceptor => Boolish.maybe;
42 int get possibleTargets => -1;
43 bool get isAccurate => false;
44 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/stats/builder.dart ('k') | pkg/compiler/lib/src/stats/trusted_types_analysis_result.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698