| 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 '../common_elements.dart' show CommonElements; | 10 import '../common_elements.dart' show CommonElements; |
| (...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 360 | 360 |
| 361 void registerBackendUse(MethodElement element) { | 361 void registerBackendUse(MethodElement element) { |
| 362 _backendUsageBuilder.registerBackendFunctionUse(element); | 362 _backendUsageBuilder.registerBackendFunctionUse(element); |
| 363 _backendUsageBuilder.registerGlobalFunctionDependency(element); | 363 _backendUsageBuilder.registerGlobalFunctionDependency(element); |
| 364 } | 364 } |
| 365 | 365 |
| 366 void processNativeClass(ClassElement classElement) { | 366 void processNativeClass(ClassElement classElement) { |
| 367 super.processNativeClass(classElement); | 367 super.processNativeClass(classElement); |
| 368 | 368 |
| 369 // Js Interop interfaces do not have tags. | 369 // Js Interop interfaces do not have tags. |
| 370 if (backend.nativeData.isJsInteropClass(classElement)) return; | 370 if (backend.nativeClassData.isJsInteropClass(classElement)) return; |
| 371 // Since we map from dispatch tags to classes, a dispatch tag must be used | 371 // Since we map from dispatch tags to classes, a dispatch tag must be used |
| 372 // on only one native class. | 372 // on only one native class. |
| 373 for (String tag in backend.nativeData.getNativeTagsOfClass(classElement)) { | 373 for (String tag |
| 374 in backend.nativeClassData.getNativeTagsOfClass(classElement)) { |
| 374 ClassElement owner = tagOwner[tag]; | 375 ClassElement owner = tagOwner[tag]; |
| 375 if (owner != null) { | 376 if (owner != null) { |
| 376 if (owner != classElement) { | 377 if (owner != classElement) { |
| 377 reporter.internalError( | 378 reporter.internalError( |
| 378 classElement, "Tag '$tag' already in use by '${owner.name}'"); | 379 classElement, "Tag '$tag' already in use by '${owner.name}'"); |
| 379 } | 380 } |
| 380 } else { | 381 } else { |
| 381 tagOwner[tag] = classElement; | 382 tagOwner[tag] = classElement; |
| 382 } | 383 } |
| 383 } | 384 } |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 498 List<ClassEntity> directSubtypes = | 499 List<ClassEntity> directSubtypes = |
| 499 emitter.directSubtypes.putIfAbsent(superclass, () => <ClassEntity>[]); | 500 emitter.directSubtypes.putIfAbsent(superclass, () => <ClassEntity>[]); |
| 500 directSubtypes.add(cls); | 501 directSubtypes.add(cls); |
| 501 } | 502 } |
| 502 | 503 |
| 503 void logSummary(log(message)) { | 504 void logSummary(log(message)) { |
| 504 log('Compiled ${_registeredClasses.length} native classes, ' | 505 log('Compiled ${_registeredClasses.length} native classes, ' |
| 505 '${_unusedClasses.length} native classes omitted.'); | 506 '${_unusedClasses.length} native classes omitted.'); |
| 506 } | 507 } |
| 507 } | 508 } |
| OLD | NEW |