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

Side by Side Diff: pkg/compiler/lib/src/js/js.dart

Issue 1576063003: dart2js cps: Translate identity placeholders to refinement nodes. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Replace array-refinements in finalize pass Created 4 years, 11 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
« no previous file with comments | « pkg/compiler/lib/src/cps_ir/finalize.dart ('k') | no next file » | 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 js; 5 library js;
6 6
7 import 'package:js_ast/js_ast.dart'; 7 import 'package:js_ast/js_ast.dart';
8 export 'package:js_ast/js_ast.dart'; 8 export 'package:js_ast/js_ast.dart';
9 9
10 import '../common.dart'; 10 import '../common.dart';
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 } 155 }
156 } 156 }
157 } 157 }
158 _cachedLiteral = js.escapedString(text); 158 _cachedLiteral = js.escapedString(text);
159 } 159 }
160 return _cachedLiteral; 160 return _cachedLiteral;
161 } 161 }
162 162
163 @override 163 @override
164 String get value => _literal.value; 164 String get value => _literal.value;
165 } 165 }
166
167 /// True if the given template consists of just a placeholder. Such templates
168 /// are sometimes used to manually promote the type of an expression.
169 bool isIdentityTemplate(Template template) {
170 return template.source == '#';
sra1 2016/01/11 19:31:20 It would be better to check the ast for a placehol
asgerf 2016/01/11 20:11:44 Replaced with an is-check.
171 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/cps_ir/finalize.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698