Chromium Code Reviews| Index: pkg/analyzer2dart/lib/src/cps_generator.dart |
| diff --git a/pkg/analyzer2dart/lib/src/cps_generator.dart b/pkg/analyzer2dart/lib/src/cps_generator.dart |
| index 7a4499ac9434b2753abecc7fc76a2d4b8fe2fb8c..0d73e9169ab9bca97f31d30d26930122fa11f83c 100644 |
| --- a/pkg/analyzer2dart/lib/src/cps_generator.dart |
| +++ b/pkg/analyzer2dart/lib/src/cps_generator.dart |
| @@ -56,16 +56,15 @@ class CpsElementVisitor extends analyzer.SimpleElementVisitor<ir.Node> { |
| @override |
| ir.ExecutableDefinition visitConstructorElement( |
| analyzer.ConstructorElement element) { |
| + if (element.isSynthetic) { |
| + // Don't generate CPS for synthetic (default) constructors. |
|
sigurdm
2015/02/10 09:37:56
For the js-case it makes sense to represent these
Johnni Winther
2015/02/10 13:51:57
Reverted.
|
| + return null; |
| + } |
| CpsGeneratingVisitor visitor = new CpsGeneratingVisitor(converter, element); |
| if (!element.isFactory) { |
| ConstructorDeclaration constructorDeclaration = node; |
| - FunctionBody body; |
| - if (constructorDeclaration != null) { |
| - body = constructorDeclaration.body; |
| - } else { |
| - assert(element.isSynthetic); |
| - } |
| - return visitor.handleConstructorDeclaration(element, body); |
| + return visitor.handleConstructorDeclaration(element, |
| + constructorDeclaration.body); |
| } |
| // TODO(johnniwinther): Support factory constructors. |
| return null; |