Chromium Code Reviews| Index: lib/compiler/implementation/dart_backend/renamer.dart |
| diff --git a/lib/compiler/implementation/dart_backend/renamer.dart b/lib/compiler/implementation/dart_backend/renamer.dart |
| index 46dacd10b1b9e59a3621b9b2dd59036b8d9836c8..b9fd75846f74a99ca7688b8d20508d13173f8820 100644 |
| --- a/lib/compiler/implementation/dart_backend/renamer.dart |
| +++ b/lib/compiler/implementation/dart_backend/renamer.dart |
| @@ -30,16 +30,13 @@ class ConflictingRenamer extends Renamer { |
| String getFactoryName(FunctionExpression node) => |
| node.name.asSend().selector.asIdentifier().source.slowToString(); |
| - bool isNamedConstructor(Element element) => |
| - element.isGenerativeConstructor() |
| - && element.asFunctionElement().cachedNode.name is Send; |
| - |
| String renameSendMethod(Send send) { |
| if (contextElements[send] === null) return null; |
| Element element = contextElements[send]; |
| if (element.isTopLevel()) { |
| return renameElement(element); |
| - } else if (isNamedConstructor(element) |
| + } else if ((element.isGenerativeConstructor() || element.isFactoryConstructor()) |
|
Roman
2012/07/31 14:28:39
>80 chars
Anton Muhin
2012/07/31 15:05:04
Done.
|
| + && element.asFunctionElement().cachedNode.name is Send |
| // Don't want to rename redirects to :this(args). |
| && !Initializers.isConstructorRedirect(send) |
| // Don't want to rename super calls. |