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

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

Issue 1538593003: dart2js cps: Backward redundant null check removal (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years 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/backward_null_check_remover.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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 static const Name noSuchMethod_ = const PublicName(Identifiers.noSuchMethod_); 65 static const Name noSuchMethod_ = const PublicName(Identifiers.noSuchMethod_);
66 66
67 /// The name of the to-string method on 'Object'. 67 /// The name of the to-string method on 'Object'.
68 static const Name toString_ = const PublicName('toString'); 68 static const Name toString_ = const PublicName('toString');
69 69
70 static const Name INDEX_NAME = const PublicName("[]"); 70 static const Name INDEX_NAME = const PublicName("[]");
71 static const Name INDEX_SET_NAME = const PublicName("[]="); 71 static const Name INDEX_SET_NAME = const PublicName("[]=");
72 static const Name CALL_NAME = Names.call; 72 static const Name CALL_NAME = Names.call;
73 73
74 static const Name length = const PublicName(Identifiers.length); 74 static const Name length = const PublicName(Identifiers.length);
75
76 static const Name runtimeType_ = const PublicName(Identifiers.runtimeType_);
75 } 77 }
76 78
77 /// [Selector]s commonly used. 79 /// [Selector]s commonly used.
78 class Selectors { 80 class Selectors {
79 /// The selector for calling the cancel method on 'StreamIterator'. 81 /// The selector for calling the cancel method on 'StreamIterator'.
80 static final Selector cancel = 82 static final Selector cancel =
81 new Selector.call(const PublicName('cancel'), CallStructure.NO_ARGS); 83 new Selector.call(const PublicName('cancel'), CallStructure.NO_ARGS);
82 84
83 /// The selector for getting the current element property used in for-each 85 /// The selector for getting the current element property used in for-each
84 /// loops. 86 /// loops.
(...skipping 22 matching lines...) Expand all
107 109
108 static final Selector equals = new Selector.binaryOperator('=='); 110 static final Selector equals = new Selector.binaryOperator('==');
109 111
110 static final Selector length = new Selector.getter(Names.length); 112 static final Selector length = new Selector.getter(Names.length);
111 113
112 static final Selector codeUnitAt = 114 static final Selector codeUnitAt =
113 new Selector.call(const PublicName('codeUnitAt'), CallStructure.ONE_ARG); 115 new Selector.call(const PublicName('codeUnitAt'), CallStructure.ONE_ARG);
114 116
115 static final Selector index = new Selector.index(); 117 static final Selector index = new Selector.index();
116 118
119 static final Selector runtimeType_ = new Selector.getter(Names.runtimeType_);
120
117 /// List of all the selectors held in static fields. 121 /// List of all the selectors held in static fields.
118 /// 122 ///
119 /// These objects are shared between different runs in batch-mode and must 123 /// These objects are shared between different runs in batch-mode and must
120 /// thus remain in the [Selector.canonicalizedValues] map. 124 /// thus remain in the [Selector.canonicalizedValues] map.
121 static final List<Selector> ALL = <Selector>[ 125 static final List<Selector> ALL = <Selector>[
122 cancel, current, iterator, moveNext, noSuchMethod_, toString_, 126 cancel, current, iterator, moveNext, noSuchMethod_, toString_,
123 hashCode_, compareTo, equals, length, codeUnitAt, index]; 127 hashCode_, compareTo, equals, length, codeUnitAt, index, runtimeType_];
124 } 128 }
125 129
126 /// [Uri]s commonly used. 130 /// [Uri]s commonly used.
127 class Uris { 131 class Uris {
128 /// The URI for 'dart:async'. 132 /// The URI for 'dart:async'.
129 static final Uri dart_async = new Uri(scheme: 'dart', path: 'async'); 133 static final Uri dart_async = new Uri(scheme: 'dart', path: 'async');
130 134
131 /// The URI for 'dart:core'. 135 /// The URI for 'dart:core'.
132 static final Uri dart_core = new Uri(scheme: 'dart', path: 'core'); 136 static final Uri dart_core = new Uri(scheme: 'dart', path: 'core');
133 137
134 /// The URI for 'dart:html'. 138 /// The URI for 'dart:html'.
135 static final Uri dart_html = new Uri(scheme: 'dart', path: 'html'); 139 static final Uri dart_html = new Uri(scheme: 'dart', path: 'html');
136 140
137 /// The URI for 'dart:mirrors'. 141 /// The URI for 'dart:mirrors'.
138 static final Uri dart_mirrors = new Uri(scheme: 'dart', path: 'mirrors'); 142 static final Uri dart_mirrors = new Uri(scheme: 'dart', path: 'mirrors');
139 143
140 /// The URI for 'dart:_internal'. 144 /// The URI for 'dart:_internal'.
141 static final Uri dart__internal = new Uri(scheme: 'dart', path: '_internal'); 145 static final Uri dart__internal = new Uri(scheme: 'dart', path: '_internal');
142 146
143 /// The URI for 'dart:_native_typed_data'. 147 /// The URI for 'dart:_native_typed_data'.
144 static final Uri dart__native_typed_data = 148 static final Uri dart__native_typed_data =
145 new Uri(scheme: 'dart', path: '_native_typed_data'); 149 new Uri(scheme: 'dart', path: '_native_typed_data');
146 } 150 }
OLDNEW
« no previous file with comments | « no previous file | pkg/compiler/lib/src/cps_ir/backward_null_check_remover.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698