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

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

Issue 12018015: Implement substitution for type variables. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Regenerate checks if necessary. Created 7 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
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 6a5067dba110a0c14eaf3df0eaf5388e9f9be5a3..69cdd8e0469265b2a2251ee1a3d6be702741f526 100644
--- a/sdk/lib/_internal/compiler/implementation/js_backend/namer.dart
+++ b/sdk/lib/_internal/compiler/implementation/js_backend/namer.dart
@@ -523,6 +523,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)}';
@@ -540,6 +542,10 @@ class Namer implements ClosureNamer {
return name;
}
+ String substitutionName(Element element) {
+ return '${operatorAsPrefix()}${getName(element)}';
+ }
+
String oneShotInterceptorName(Selector selector) {
// TODO(ngeoffray): What to do about typed selectors? We could
// filter them out, or keep them and hope the generated one shot

Powered by Google App Engine
This is Rietveld 408576698