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

Unified Diff: pkg/compiler/lib/src/js_backend/codegen/glue.dart

Issue 1198293002: dart2js: Use an abstract Name class for names in the generated JavaScript ast. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: fix tests Created 5 years, 6 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: pkg/compiler/lib/src/js_backend/codegen/glue.dart
diff --git a/pkg/compiler/lib/src/js_backend/codegen/glue.dart b/pkg/compiler/lib/src/js_backend/codegen/glue.dart
index 27c224dc349f31d49780e660ed8b825074c2e972..bb7ce135b1a0e7ce0a6e0f850975e328f572a33d 100644
--- a/pkg/compiler/lib/src/js_backend/codegen/glue.dart
+++ b/pkg/compiler/lib/src/js_backend/codegen/glue.dart
@@ -79,7 +79,7 @@ class Glue {
FunctionElement get identicalFunction => _compiler.identicalFunction;
- String invocationName(Selector selector) {
+ js.Name invocationName(Selector selector) {
return _namer.invocationName(selector);
}
@@ -111,11 +111,11 @@ class Glue {
return _backend.emitter.constructorAccess(element);
}
- String instanceFieldPropertyName(Element field) {
+ js.Name instanceFieldPropertyName(Element field) {
return _namer.instanceFieldPropertyName(field);
}
- String instanceMethodName(FunctionElement element) {
+ js.Name instanceMethodName(FunctionElement element) {
return _namer.instanceMethodName(element);
}
@@ -125,7 +125,7 @@ class Glue {
hasBeenInstantiated: hasBeenInstantiated);
}
- String getInterceptorName(Set<ClassElement> interceptedClasses) {
+ js.Name getInterceptorName(Set<ClassElement> interceptedClasses) {
return _backend.namer.nameForGetInterceptor(interceptedClasses);
}
@@ -187,7 +187,7 @@ class Glue {
}
js.Expression getRuntimeTypeName(ClassElement cls) {
- return js.string(_namer.runtimeTypeName(cls));
+ return js.quoteName(_namer.runtimeTypeName(cls));
}
int getTypeVariableIndex(TypeVariableType variable) {
@@ -219,11 +219,11 @@ class Glue {
_backend.registerIsCheckForCodegen(type, _enqueuer, registry);
}
- String getTypeTestTag(DartType type) {
+ js.Name getTypeTestTag(DartType type) {
return _backend.namer.operatorIsType(type);
}
- String getTypeSubstitutionTag(ClassElement element) {
+ js.Name getTypeSubstitutionTag(ClassElement element) {
return _backend.namer.substitutionName(element);
}

Powered by Google App Engine
This is Rietveld 408576698