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

Unified Diff: pkg/compiler/lib/src/js_emitter/class_stub_generator.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: Created 5 years, 8 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 aef381f2c88d1bc67b31354f4e521bfde8703691..935c275ec72c08adfc85b8eaf2c213f640ebcdf4 100644
--- a/pkg/compiler/lib/src/js_emitter/class_stub_generator.dart
+++ b/pkg/compiler/lib/src/js_emitter/class_stub_generator.dart
@@ -20,10 +20,14 @@ class ClassStubGenerator {
// [ constructorName, fields,
// fields.map(
// (name) => js('this.# = #', [name, name]))]));
- return js('function(#) { #; this.#();}',
- [fields,
- fields.map((name) => js('this.# = #', [name, name])),
- namer.deferredAction]);
+ return js('''function(#, typeInfo) {
+ #;
+ if (typeInfo) this.\$builtinTypeInfo = typeInfo;
herhut 2015/04/20 10:24:29 Why not set this unconditionally? Then the instanc
zarah 2015/04/20 12:34:50 There is code depending on whether or not that pro
+ this.#();
+ }''',
+ [fields,
+ fields.map((name) => js('this.# = #', [name, name])),
+ namer.deferredAction]);
}
jsAst.Expression generateGetter(Element member, String fieldName) {

Powered by Google App Engine
This is Rietveld 408576698