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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/compiler/lib/src/cps_ir/finalize.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/js/js.dart
diff --git a/pkg/compiler/lib/src/js/js.dart b/pkg/compiler/lib/src/js/js.dart
index 1a08cfbeb0798072ea178fd3993b134183c5c718..81ee017b58c062936ec1b316c49e52f5db9316fa 100644
--- a/pkg/compiler/lib/src/js/js.dart
+++ b/pkg/compiler/lib/src/js/js.dart
@@ -162,4 +162,10 @@ class UnparsedNode extends DeferredString
@override
String get value => _literal.value;
-}
+}
+
+/// True if the given template consists of just a placeholder. Such templates
+/// are sometimes used to manually promote the type of an expression.
+bool isIdentityTemplate(Template template) {
+ 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.
+}
« 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