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

Side by Side Diff: pkg/compiler/lib/src/common/names.dart

Issue 1416723008: dart2js cps: Propagate container types for lists. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Remove unreachable handling of list constructor in type propagation Created 5 years, 1 month 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
« no previous file with comments | « no previous file | pkg/compiler/lib/src/cps_ir/cps_ir_builder.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 /// Library containing identifier, names, and selectors commonly used through 5 /// Library containing identifier, names, and selectors commonly used through
6 /// the compiler. 6 /// the compiler.
7 library dart2js.common.names; 7 library dart2js.common.names;
8 8
9 import '../elements/elements.dart' show 9 import '../elements/elements.dart' show
10 Name, 10 Name,
(...skipping 20 matching lines...) Expand all
31 static const String iterator = 'iterator'; 31 static const String iterator = 'iterator';
32 32
33 /// The name of the main method. 33 /// The name of the main method.
34 static const String main = 'main'; 34 static const String main = 'main';
35 35
36 /// The name of the no such method handler on 'Object'. 36 /// The name of the no such method handler on 'Object'.
37 static const String noSuchMethod_ = 'noSuchMethod'; 37 static const String noSuchMethod_ = 'noSuchMethod';
38 38
39 /// The name of the runtime type property on 'Object'. 39 /// The name of the runtime type property on 'Object'.
40 static const String runtimeType_ = 'runtimeType'; 40 static const String runtimeType_ = 'runtimeType';
41
42 /// The name of the getter returning the size of containers and strings.
43 static const String length = 'length';
41 } 44 }
42 45
43 /// [Name]s commonly used. 46 /// [Name]s commonly used.
44 class Names { 47 class Names {
45 /// The name of the call operator. 48 /// The name of the call operator.
46 static const Name call = const PublicName(Identifiers.call); 49 static const Name call = const PublicName(Identifiers.call);
47 50
48 /// The name of the current element property used on iterators in for-each 51 /// The name of the current element property used on iterators in for-each
49 /// loops. 52 /// loops.
50 static const Name current = const PublicName(Identifiers.current); 53 static const Name current = const PublicName(Identifiers.current);
51 54
52 /// The name of the dynamic type. 55 /// The name of the dynamic type.
53 static const Name dynamic_ = const PublicName('dynamic'); 56 static const Name dynamic_ = const PublicName('dynamic');
54 57
55 /// The name of the iterator property used in for-each loops. 58 /// The name of the iterator property used in for-each loops.
56 static const Name iterator = const PublicName(Identifiers.iterator); 59 static const Name iterator = const PublicName(Identifiers.iterator);
57 60
58 /// The name of the move next method used on iterators in for-each loops. 61 /// The name of the move next method used on iterators in for-each loops.
59 static const Name moveNext = const PublicName('moveNext'); 62 static const Name moveNext = const PublicName('moveNext');
60 63
61 /// The name of the no such method handler on 'Object'. 64 /// The name of the no such method handler on 'Object'.
62 static const Name noSuchMethod_ = const PublicName(Identifiers.noSuchMethod_); 65 static const Name noSuchMethod_ = const PublicName(Identifiers.noSuchMethod_);
63 66
64 /// The name of the to-string method on 'Object'. 67 /// The name of the to-string method on 'Object'.
65 static const Name toString_ = const PublicName('toString'); 68 static const Name toString_ = const PublicName('toString');
66 69
67 static const Name INDEX_NAME = const PublicName("[]"); 70 static const Name INDEX_NAME = const PublicName("[]");
68 static const Name INDEX_SET_NAME = const PublicName("[]="); 71 static const Name INDEX_SET_NAME = const PublicName("[]=");
69 static const Name CALL_NAME = Names.call; 72 static const Name CALL_NAME = Names.call;
73
74 static const Name length = const PublicName(Identifiers.length);
70 } 75 }
71 76
72 /// [Selector]s commonly used. 77 /// [Selector]s commonly used.
73 class Selectors { 78 class Selectors {
74 /// The selector for calling the cancel method on 'StreamIterator'. 79 /// The selector for calling the cancel method on 'StreamIterator'.
75 static final Selector cancel = 80 static final Selector cancel =
76 new Selector.call(const PublicName('cancel'), CallStructure.NO_ARGS); 81 new Selector.call(const PublicName('cancel'), CallStructure.NO_ARGS);
77 82
78 /// The selector for getting the current element property used in for-each 83 /// The selector for getting the current element property used in for-each
79 /// loops. 84 /// loops.
(...skipping 14 matching lines...) Expand all
94 static final Selector toString_ = 99 static final Selector toString_ =
95 new Selector.call(Names.toString_, CallStructure.NO_ARGS); 100 new Selector.call(Names.toString_, CallStructure.NO_ARGS);
96 101
97 static final Selector hashCode_ = 102 static final Selector hashCode_ =
98 new Selector.getter(const PublicName('hashCode')); 103 new Selector.getter(const PublicName('hashCode'));
99 104
100 static final Selector compareTo = 105 static final Selector compareTo =
101 new Selector.call(const PublicName("compareTo"), CallStructure.ONE_ARG); 106 new Selector.call(const PublicName("compareTo"), CallStructure.ONE_ARG);
102 107
103 static final Selector equals = new Selector.binaryOperator('=='); 108 static final Selector equals = new Selector.binaryOperator('==');
109
110 static final Selector length = new Selector.getter(Names.length);
104 } 111 }
105 112
106 /// [Uri]s commonly used. 113 /// [Uri]s commonly used.
107 class Uris { 114 class Uris {
108 /// The URI for 'dart:async'. 115 /// The URI for 'dart:async'.
109 static final Uri dart_async = new Uri(scheme: 'dart', path: 'async'); 116 static final Uri dart_async = new Uri(scheme: 'dart', path: 'async');
110 117
111 /// The URI for 'dart:core'. 118 /// The URI for 'dart:core'.
112 static final Uri dart_core = new Uri(scheme: 'dart', path: 'core'); 119 static final Uri dart_core = new Uri(scheme: 'dart', path: 'core');
113 120
114 /// The URI for 'dart:html'. 121 /// The URI for 'dart:html'.
115 static final Uri dart_html = new Uri(scheme: 'dart', path: 'html'); 122 static final Uri dart_html = new Uri(scheme: 'dart', path: 'html');
116 123
117 /// The URI for 'dart:mirrors'. 124 /// The URI for 'dart:mirrors'.
118 static final Uri dart_mirrors = new Uri(scheme: 'dart', path: 'mirrors'); 125 static final Uri dart_mirrors = new Uri(scheme: 'dart', path: 'mirrors');
119 126
120 /// The URI for 'dart:_internal'. 127 /// The URI for 'dart:_internal'.
121 static final Uri dart__internal = new Uri(scheme: 'dart', path: '_internal'); 128 static final Uri dart__internal = new Uri(scheme: 'dart', path: '_internal');
122 129
123 /// The URI for 'dart:_native_typed_data'. 130 /// The URI for 'dart:_native_typed_data'.
124 static final Uri dart__native_typed_data = 131 static final Uri dart__native_typed_data =
125 new Uri(scheme: 'dart', path: '_native_typed_data'); 132 new Uri(scheme: 'dart', path: '_native_typed_data');
126 } 133 }
OLDNEW
« no previous file with comments | « no previous file | pkg/compiler/lib/src/cps_ir/cps_ir_builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698