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

Unified Diff: pkg/compiler/lib/src/js_emitter/class_stub_generator.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
Index: pkg/compiler/lib/src/js_emitter/class_stub_generator.dart
diff --git a/pkg/compiler/lib/src/js_emitter/class_stub_generator.dart b/pkg/compiler/lib/src/js_emitter/class_stub_generator.dart
index 1388ba868ad1e9b1d7749d6e56d7edd3d70c439a..5f40300504b208af7cedc70a4d8a8a0041b8bf9d 100644
--- a/pkg/compiler/lib/src/js_emitter/class_stub_generator.dart
+++ b/pkg/compiler/lib/src/js_emitter/class_stub_generator.dart
@@ -40,8 +40,9 @@ class ClassStubGenerator {
var typeParameters = const <jsAst.Parameter>[];
var typeInits = const <jsAst.Expression>[];
if (hasRtiField) {
- typeParameters = namer.rtiFieldName;
- typeInits = js('this.# = #', [namer.rtiFieldName, namer.rtiFieldName]);
+ var rtiName = namer.rtiFieldJsName;
+ typeParameters = rtiName
+ typeInits = js('this.# = #', [rtiName, rtiName]);
}
return js('function(#, #) { #; #; this.#();}', [
fields,
« no previous file with comments | « pkg/compiler/lib/src/js_backend/namer.dart ('k') | pkg/compiler/lib/src/js_emitter/full_emitter/class_emitter.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698