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

Unified Diff: sdk/lib/_internal/compiler/implementation/js_backend/namer.dart

Issue 12218007: Implement substitution for type variables. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 10 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
Index: sdk/lib/_internal/compiler/implementation/js_backend/namer.dart
diff --git a/sdk/lib/_internal/compiler/implementation/js_backend/namer.dart b/sdk/lib/_internal/compiler/implementation/js_backend/namer.dart
index e5bb9670d04277801fc55c50dd91eb8b898374b1..fa6f91e0a59498dc43e58a6202955993b3772208 100644
--- a/sdk/lib/_internal/compiler/implementation/js_backend/namer.dart
+++ b/sdk/lib/_internal/compiler/implementation/js_backend/namer.dart
@@ -669,6 +669,8 @@ class Namer implements ClosureNamer {
String operatorIsPrefix() => r'$is';
+ String operatorAsPrefix() => r'$as';
+
String operatorIs(Element element) {
// TODO(erikcorry): Reduce from $isx to ix when we are minifying.
return '${operatorIsPrefix()}${getName(element)}';
@@ -686,6 +688,10 @@ class Namer implements ClosureNamer {
return name;
}
+ String substitutionName(Element element) {
+ return '${operatorAsPrefix()}${getName(element)}';
+ }
+
String safeName(String name) => _safeName(name, jsReserved);
String safeVariableName(String name) => _safeName(name, jsVariableReserved);

Powered by Google App Engine
This is Rietveld 408576698