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

Unified Diff: pkg/compiler/lib/src/js_emitter/old_emitter/setup_program_builder.dart

Issue 1092263002: dart2js: add type arguments to constructor in case the class needs rti. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rebased Created 5 years, 7 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/old_emitter/setup_program_builder.dart
diff --git a/pkg/compiler/lib/src/js_emitter/old_emitter/setup_program_builder.dart b/pkg/compiler/lib/src/js_emitter/old_emitter/setup_program_builder.dart
index 58ad5bd8f634c6c66846aec8214d90cb4ade494b..1a7537e41e462bb12a907fc45a67677437953608 100644
--- a/pkg/compiler/lib/src/js_emitter/old_emitter/setup_program_builder.dart
+++ b/pkg/compiler/lib/src/js_emitter/old_emitter/setup_program_builder.dart
@@ -235,10 +235,15 @@ function $setupProgramName(programData, typesOffset) {
str += parameter;
body += ("this." + field + " = " + parameter + ";\\n");
}
+ // TODO(zarah): Check whether there is any gain in always having this
+ // property and if so, add it unconditionally.
+ body += "if (typeInfo) this.\$builtinTypeInfo = typeInfo;\\n";
if (supportsDirectProtoAccess) {
body += "this." + #deferredActionString + "();";
}
- str += ") {\\n" + body + "}\\n";
+
+ if (fields.length > 0) str += ",";
+ str += "typeInfo) {\\n" + body + "}\\n";
str += name + ".$typeNameProperty=\\"" + name + "\\";\\n";
str += "\$desc=\$collectedClasses." + name + "[1];\\n";
str += name + ".prototype = \$desc;\\n";
« no previous file with comments | « pkg/compiler/lib/src/js_emitter/class_stub_generator.dart ('k') | pkg/compiler/lib/src/js_emitter/type_test_registry.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698