| OLD | NEW |
| 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 js_backend.backend; | 5 library js_backend.backend; |
| 6 | 6 |
| 7 import '../common.dart'; | 7 import '../common.dart'; |
| 8 import '../common/backend_api.dart' | 8 import '../common/backend_api.dart' |
| 9 show ForeignResolver, NativeRegistry, ImpactTransformer; | 9 show ForeignResolver, NativeRegistry, ImpactTransformer; |
| 10 import '../common/codegen.dart' show CodegenImpact, CodegenWorkItem; | 10 import '../common/codegen.dart' show CodegenImpact, CodegenWorkItem; |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 import '../elements/resolution_types.dart'; | 24 import '../elements/resolution_types.dart'; |
| 25 import '../elements/types.dart'; | 25 import '../elements/types.dart'; |
| 26 import '../enqueue.dart' | 26 import '../enqueue.dart' |
| 27 show | 27 show |
| 28 DirectEnqueuerStrategy, | 28 DirectEnqueuerStrategy, |
| 29 Enqueuer, | 29 Enqueuer, |
| 30 EnqueueTask, | 30 EnqueueTask, |
| 31 ResolutionEnqueuer, | 31 ResolutionEnqueuer, |
| 32 ResolutionWorkItemBuilder, | 32 ResolutionWorkItemBuilder, |
| 33 TreeShakingEnqueuerStrategy; | 33 TreeShakingEnqueuerStrategy; |
| 34 import '../frontend_strategy.dart'; |
| 34 import '../io/multi_information.dart' show MultiSourceInformationStrategy; | 35 import '../io/multi_information.dart' show MultiSourceInformationStrategy; |
| 35 import '../io/position_information.dart' show PositionSourceInformationStrategy; | 36 import '../io/position_information.dart' show PositionSourceInformationStrategy; |
| 36 import '../io/source_information.dart' show SourceInformationStrategy; | 37 import '../io/source_information.dart' show SourceInformationStrategy; |
| 37 import '../io/start_end_information.dart' | 38 import '../io/start_end_information.dart' |
| 38 show StartEndSourceInformationStrategy; | 39 show StartEndSourceInformationStrategy; |
| 39 import '../js/js.dart' as jsAst; | 40 import '../js/js.dart' as jsAst; |
| 40 import '../js/js.dart' show js; | 41 import '../js/js.dart' show js; |
| 41 import '../js/js_source_mapping.dart' show JavaScriptSourceInformationStrategy; | 42 import '../js/js_source_mapping.dart' show JavaScriptSourceInformationStrategy; |
| 42 import '../js/rewrite_async.dart'; | 43 import '../js/rewrite_async.dart'; |
| 43 import '../js_emitter/js_emitter.dart' show CodeEmitterTask, Emitter; | 44 import '../js_emitter/js_emitter.dart' show CodeEmitterTask, Emitter; |
| (...skipping 1034 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1078 element == commonElements.jsMutableArrayClass || | 1079 element == commonElements.jsMutableArrayClass || |
| 1079 element == commonElements.jsExtendableArrayClass || | 1080 element == commonElements.jsExtendableArrayClass || |
| 1080 element == commonElements.jsFixedArrayClass || | 1081 element == commonElements.jsFixedArrayClass || |
| 1081 element == commonElements.jsUnmodifiableArrayClass; | 1082 element == commonElements.jsUnmodifiableArrayClass; |
| 1082 } | 1083 } |
| 1083 | 1084 |
| 1084 /// This method is called immediately after the [library] and its parts have | 1085 /// This method is called immediately after the [library] and its parts have |
| 1085 /// been loaded. | 1086 /// been loaded. |
| 1086 void setAnnotations(LibraryEntity library) { | 1087 void setAnnotations(LibraryEntity library) { |
| 1087 if (!compiler.serialization.isDeserialized(library)) { | 1088 if (!compiler.serialization.isDeserialized(library)) { |
| 1088 AnnotationProcessor processor = new AnnotationProcessor(compiler); | 1089 AnnotationProcessor processor = |
| 1090 compiler.frontEndStrategy.annotationProcesser; |
| 1089 if (canLibraryUseNative(library)) { | 1091 if (canLibraryUseNative(library)) { |
| 1090 processor.extractNativeAnnotations(library, nativeBasicDataBuilder); | 1092 processor.extractNativeAnnotations(library, nativeBasicDataBuilder); |
| 1091 } | 1093 } |
| 1092 processor.extractJsInteropAnnotations(library, nativeBasicDataBuilder); | 1094 processor.extractJsInteropAnnotations(library, nativeBasicDataBuilder); |
| 1093 } | 1095 } |
| 1094 Uri uri = library.canonicalUri; | 1096 Uri uri = library.canonicalUri; |
| 1095 if (uri == Uris.dart_html) { | 1097 if (uri == Uris.dart_html) { |
| 1096 htmlLibraryIsLoaded = true; | 1098 htmlLibraryIsLoaded = true; |
| 1097 } else if (uri == LookupMapResolutionAnalysis.PACKAGE_LOOKUP_MAP) { | 1099 } else if (uri == LookupMapResolutionAnalysis.PACKAGE_LOOKUP_MAP) { |
| 1098 lookupMapResolutionAnalysis.init(library); | 1100 lookupMapResolutionAnalysis.init(library); |
| (...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1468 | 1470 |
| 1469 bool canUseAliasedSuperMember(MemberEntity member, Selector selector) { | 1471 bool canUseAliasedSuperMember(MemberEntity member, Selector selector) { |
| 1470 return !selector.isGetter; | 1472 return !selector.isGetter; |
| 1471 } | 1473 } |
| 1472 | 1474 |
| 1473 /// Returns `true` if [member] is called from a subclass via `super`. | 1475 /// Returns `true` if [member] is called from a subclass via `super`. |
| 1474 bool isAliasedSuperMember(MemberEntity member) { | 1476 bool isAliasedSuperMember(MemberEntity member) { |
| 1475 return _aliasedSuperMembers.contains(member); | 1477 return _aliasedSuperMembers.contains(member); |
| 1476 } | 1478 } |
| 1477 } | 1479 } |
| OLD | NEW |