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

Unified Diff: pkg/compiler/lib/src/js_emitter/full_emitter/class_emitter.dart

Issue 1913033002: dart2js: Pass type information to constructor rather than add later. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: rebase Created 4 years, 4 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/full_emitter/class_emitter.dart
diff --git a/pkg/compiler/lib/src/js_emitter/full_emitter/class_emitter.dart b/pkg/compiler/lib/src/js_emitter/full_emitter/class_emitter.dart
index 0538a2d3fb896da80026a38fedb8e0a678908dca..f473235edac77b7c93fa9b1d3e5e98a2237fd92d 100644
--- a/pkg/compiler/lib/src/js_emitter/full_emitter/class_emitter.dart
+++ b/pkg/compiler/lib/src/js_emitter/full_emitter/class_emitter.dart
@@ -35,6 +35,9 @@ class ClassEmitter extends CodeEmitterHelper {
builder.superName = superName;
emitConstructorsForCSP(cls);
emitFields(cls, builder);
+ if (cls.hasRti) {
+ builder.addField(namer.rtiFieldName);
+ }
emitCheckedClassSetters(cls, builder);
emitClassGettersSettersForCSP(cls, builder);
emitInstanceMembers(cls, builder);
@@ -69,8 +72,8 @@ class ClassEmitter extends CodeEmitterHelper {
ClassElement classElement = cls.element;
- jsAst.Expression constructorAst =
- _stubGenerator.generateClassConstructor(classElement, fieldNames);
+ jsAst.Expression constructorAst = _stubGenerator.generateClassConstructor(
+ classElement, fieldNames, cls.hasRti);
jsAst.Name constructorName = namer.className(classElement);
OutputUnit outputUnit =

Powered by Google App Engine
This is Rietveld 408576698