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

Side by Side Diff: sdk/lib/_internal/compiler/implementation/mirrors/mirrors_util.dart

Issue 18670003: Remove support for conflicting constructors. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 5 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library mirrors_util; 5 library mirrors_util;
6 6
7 import 'dart:collection' show Queue, IterableBase; 7 import 'dart:collection' show Queue, IterableBase;
8 8
9 // TODO(rnystrom): Use "package:" URL (#4968). 9 // TODO(rnystrom): Use "package:" URL (#4968).
10 import 'mirrors.dart'; 10 import 'mirrors.dart';
(...skipping 22 matching lines...) Expand all
33 } 33 }
34 } else if (mirror is MethodMirror) { 34 } else if (mirror is MethodMirror) {
35 MethodMirror methodMirror = mirror; 35 MethodMirror methodMirror = mirror;
36 String simpleName = methodMirror.simpleName; 36 String simpleName = methodMirror.simpleName;
37 if (methodMirror.isSetter) { 37 if (methodMirror.isSetter) {
38 // Remove trailing '='. 38 // Remove trailing '='.
39 return simpleName.substring(0, simpleName.length-1); 39 return simpleName.substring(0, simpleName.length-1);
40 } else if (methodMirror.isOperator) { 40 } else if (methodMirror.isOperator) {
41 return 'operator ${operatorName(methodMirror)}'; 41 return 'operator ${operatorName(methodMirror)}';
42 } else if (methodMirror.isConstructor) { 42 } else if (methodMirror.isConstructor) {
43 // TODO(johnniwinther): Remove this when [simpleName] is
44 // [constructorName].
45 simpleName = methodMirror.constructorName;
46 String className = displayName(methodMirror.owner); 43 String className = displayName(methodMirror.owner);
47 if (simpleName == '') { 44 if (simpleName == '') {
48 return className; 45 return className;
49 } else { 46 } else {
50 return '$className.$simpleName'; 47 return '$className.$simpleName';
51 } 48 }
52 } 49 }
53 } 50 }
54 return mirror.simpleName; 51 return mirror.simpleName;
55 } 52 }
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 // * Foo 207 // * Foo
211 // */ 208 // */
212 // as "\nFoo\n" and not as "\nFoo\n ". 209 // as "\nFoo\n" and not as "\nFoo\n ".
213 sb.write(line); 210 sb.write(line);
214 } 211 }
215 } 212 }
216 return sb.toString(); 213 return sb.toString();
217 } 214 }
218 throw new ArgumentError('Invalid comment $comment'); 215 throw new ArgumentError('Invalid comment $comment');
219 } 216 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698