| Index: pkg/compiler/lib/src/cps_ir/cps_ir_builder_visitor.dart
|
| diff --git a/pkg/compiler/lib/src/cps_ir/cps_ir_builder_visitor.dart b/pkg/compiler/lib/src/cps_ir/cps_ir_builder_visitor.dart
|
| index 9eafea621fd7bd0b0c18106d0f53e1747687240e..5f45087a4a1ab60f527eac9678c291af40c19b4c 100644
|
| --- a/pkg/compiler/lib/src/cps_ir/cps_ir_builder_visitor.dart
|
| +++ b/pkg/compiler/lib/src/cps_ir/cps_ir_builder_visitor.dart
|
| @@ -67,11 +67,16 @@ class IrBuilderTask extends CompilerTask {
|
| // TODO(sigurdm): Support native functions for dart2js.
|
| assert(invariant(element, !element.isNative));
|
|
|
| - // TODO(kmillikin,sigurdm): Support constructors.
|
| - if (element is ConstructorElement && !element.isGenerativeConstructor) {
|
| - return false;
|
| + if (element is ConstructorElement) {
|
| + if (!element.isGenerativeConstructor) {
|
| + // TODO(kmillikin,sigurdm): Support constructors.
|
| + return false;
|
| + }
|
| + if (element.isSynthesized) {
|
| + // Do generate CPS for synthetic constructors.
|
| + return true;
|
| + }
|
| }
|
| -
|
| } else if (element is! FieldElement) {
|
| compiler.internalError(element, "Unexpected element type $element");
|
| }
|
|
|