| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 import '../common.dart'; | 5 import '../common.dart'; |
| 6 import '../common/backend_api.dart' show ForeignResolver; | 6 import '../common/backend_api.dart' show ForeignResolver; |
| 7 import '../common/resolution.dart' show Resolution; | 7 import '../common/resolution.dart' show Resolution; |
| 8 import '../compiler.dart' show Compiler; | 8 import '../compiler.dart' show Compiler; |
| 9 import '../constants/values.dart'; | 9 import '../constants/values.dart'; |
| 10 import '../core_types.dart' show CommonElements; | 10 import '../core_types.dart' show CommonElements; |
| (...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 234 token = token.next; | 234 token = token.next; |
| 235 Token id = token; | 235 Token id = token; |
| 236 while (token.kind != Tokens.EOF_TOKEN) { | 236 while (token.kind != Tokens.EOF_TOKEN) { |
| 237 token = token.next; | 237 token = token.next; |
| 238 if (token.stringValue != '.') break; | 238 if (token.stringValue != '.') break; |
| 239 token = token.next; | 239 token = token.next; |
| 240 if (!token.isIdentifier()) return null; | 240 if (!token.isIdentifier()) return null; |
| 241 id = token; | 241 id = token; |
| 242 } | 242 } |
| 243 // Should be at '{', 'with', 'implements', '<' or 'native'. | 243 // Should be at '{', 'with', 'implements', '<' or 'native'. |
| 244 return id.value; | 244 return id.lexeme; |
| 245 } | 245 } |
| 246 | 246 |
| 247 return reporter.withCurrentElement(classElement, () { | 247 return reporter.withCurrentElement(classElement, () { |
| 248 return scanForExtendsName(classElement.position); | 248 return scanForExtendsName(classElement.position); |
| 249 }); | 249 }); |
| 250 } | 250 } |
| 251 | 251 |
| 252 /// Returns the JSName annotation string or `null` if no JSName annotation is | 252 /// Returns the JSName annotation string or `null` if no JSName annotation is |
| 253 /// present. | 253 /// present. |
| 254 String findJsNameFromAnnotation(Element element) { | 254 String findJsNameFromAnnotation(Element element) { |
| (...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 607 List<ClassEntity> directSubtypes = | 607 List<ClassEntity> directSubtypes = |
| 608 emitter.directSubtypes.putIfAbsent(superclass, () => <ClassEntity>[]); | 608 emitter.directSubtypes.putIfAbsent(superclass, () => <ClassEntity>[]); |
| 609 directSubtypes.add(cls); | 609 directSubtypes.add(cls); |
| 610 } | 610 } |
| 611 | 611 |
| 612 void logSummary(log(message)) { | 612 void logSummary(log(message)) { |
| 613 log('Compiled ${_registeredClasses.length} native classes, ' | 613 log('Compiled ${_registeredClasses.length} native classes, ' |
| 614 '${_unusedClasses.length} native classes omitted.'); | 614 '${_unusedClasses.length} native classes omitted.'); |
| 615 } | 615 } |
| 616 } | 616 } |
| OLD | NEW |