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

Unified Diff: pkg/compiler/lib/src/js_backend/namer.dart

Issue 2700053003: Don't use magic strings/properties to communicate between compiler and runtime. (Closed)
Patch Set: Small cleanup. Created 3 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
« no previous file with comments | « no previous file | pkg/compiler/lib/src/js_emitter/class_stub_generator.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/js_backend/namer.dart
diff --git a/pkg/compiler/lib/src/js_backend/namer.dart b/pkg/compiler/lib/src/js_backend/namer.dart
index e6d28dd670189c0888b4a7341364669c791c29b0..7e426b2c2bfb618cd76eeecf21bddb9c72099328 100644
--- a/pkg/compiler/lib/src/js_backend/namer.dart
+++ b/pkg/compiler/lib/src/js_backend/namer.dart
@@ -476,8 +476,11 @@ class Namer {
jsAst.Name get staticsPropertyName =>
_staticsPropertyName ??= new StringBackedName('static');
- jsAst.Name _rtiFieldName;
- jsAst.Name get rtiFieldName => _rtiFieldName ??= new StringBackedName(r'$ti');
+ final String rtiName = r'$ti';
+
+ jsAst.Name _rtiFieldJsName;
+ jsAst.Name get rtiFieldJsName =>
+ _rtiFieldJsName ??= new StringBackedName(rtiName);
// Name of property in a class description for the native dispatch metadata.
final String nativeSpecProperty = '%';
@@ -621,8 +624,12 @@ class Namer {
return asName(operatorAsPrefix);
case JsGetName.SIGNATURE_NAME:
return asName(operatorSignature);
+ case JsGetName.RTI_NAME:
+ return asName(rtiName);
case JsGetName.TYPEDEF_TAG:
return asName(typedefTag);
+ case JsGetName.FUNCTION_TYPE_TAG:
+ return asName(functionTypeTag);
case JsGetName.FUNCTION_TYPE_VOID_RETURN_TAG:
return asName(functionTypeVoidReturnTag);
case JsGetName.FUNCTION_TYPE_RETURN_TYPE_TAG:
« no previous file with comments | « no previous file | pkg/compiler/lib/src/js_emitter/class_stub_generator.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698