| 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 'dart:async' show Future; | 7 import 'dart:async' show Future; |
| 8 | 8 |
| 9 import 'package:js_runtime/shared/embedded_names.dart' as embeddedNames; | 9 import 'package:js_runtime/shared/embedded_names.dart' as embeddedNames; |
| 10 | 10 |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 import '../universe/world_impact.dart' | 51 import '../universe/world_impact.dart' |
| 52 show | 52 show |
| 53 ImpactStrategy, | 53 ImpactStrategy, |
| 54 ImpactUseCase, | 54 ImpactUseCase, |
| 55 TransformedWorldImpact, | 55 TransformedWorldImpact, |
| 56 WorldImpact, | 56 WorldImpact, |
| 57 WorldImpactBuilder, | 57 WorldImpactBuilder, |
| 58 WorldImpactVisitor, | 58 WorldImpactVisitor, |
| 59 StagedWorldImpactBuilder; | 59 StagedWorldImpactBuilder; |
| 60 import '../util/util.dart'; | 60 import '../util/util.dart'; |
| 61 import '../world.dart' show ClassWorld; | 61 import '../world.dart' show ClosedWorld; |
| 62 import 'backend_helpers.dart'; | 62 import 'backend_helpers.dart'; |
| 63 import 'backend_impact.dart'; | 63 import 'backend_impact.dart'; |
| 64 import 'backend_serialization.dart' show JavaScriptBackendSerialization; | 64 import 'backend_serialization.dart' show JavaScriptBackendSerialization; |
| 65 import 'checked_mode_helpers.dart'; | 65 import 'checked_mode_helpers.dart'; |
| 66 import 'constant_handler_javascript.dart'; | 66 import 'constant_handler_javascript.dart'; |
| 67 import 'custom_elements_analysis.dart'; | 67 import 'custom_elements_analysis.dart'; |
| 68 import 'enqueuer.dart'; | 68 import 'enqueuer.dart'; |
| 69 import 'js_interop_analysis.dart' show JsInteropAnalysis; | 69 import 'js_interop_analysis.dart' show JsInteropAnalysis; |
| 70 import 'kernel_task.dart'; | 70 import 'kernel_task.dart'; |
| 71 import 'lookup_map_analysis.dart' show LookupMapAnalysis; | 71 import 'lookup_map_analysis.dart' show LookupMapAnalysis; |
| (...skipping 904 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 976 Set<ClassElement> nativeSubclasses = | 976 Set<ClassElement> nativeSubclasses = |
| 977 nativeSubclassesOfMixin(classElement); | 977 nativeSubclassesOfMixin(classElement); |
| 978 if (nativeSubclasses != null) result.addAll(nativeSubclasses); | 978 if (nativeSubclasses != null) result.addAll(nativeSubclasses); |
| 979 } | 979 } |
| 980 } | 980 } |
| 981 return result; | 981 return result; |
| 982 }); | 982 }); |
| 983 } | 983 } |
| 984 | 984 |
| 985 Set<ClassElement> nativeSubclassesOfMixin(ClassElement mixin) { | 985 Set<ClassElement> nativeSubclassesOfMixin(ClassElement mixin) { |
| 986 ClassWorld classWorld = compiler.closedWorld; | 986 ClosedWorld closedWorld = compiler.closedWorld; |
| 987 Iterable<MixinApplicationElement> uses = classWorld.mixinUsesOf(mixin); | 987 Iterable<MixinApplicationElement> uses = closedWorld.mixinUsesOf(mixin); |
| 988 Set<ClassElement> result = null; | 988 Set<ClassElement> result = null; |
| 989 for (MixinApplicationElement use in uses) { | 989 for (MixinApplicationElement use in uses) { |
| 990 classWorld.forEachStrictSubclassOf(use, (ClassElement subclass) { | 990 closedWorld.forEachStrictSubclassOf(use, (ClassElement subclass) { |
| 991 if (isNativeOrExtendsNative(subclass)) { | 991 if (isNativeOrExtendsNative(subclass)) { |
| 992 if (result == null) result = new Set<ClassElement>(); | 992 if (result == null) result = new Set<ClassElement>(); |
| 993 result.add(subclass); | 993 result.add(subclass); |
| 994 } | 994 } |
| 995 }); | 995 }); |
| 996 } | 996 } |
| 997 return result; | 997 return result; |
| 998 } | 998 } |
| 999 | 999 |
| 1000 bool operatorEqHandlesNullArgument(FunctionElement operatorEqfunction) { | 1000 bool operatorEqHandlesNullArgument(FunctionElement operatorEqfunction) { |
| (...skipping 2249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3250 | 3250 |
| 3251 @override | 3251 @override |
| 3252 void onImpactUsed(ImpactUseCase impactUse) { | 3252 void onImpactUsed(ImpactUseCase impactUse) { |
| 3253 if (impactUse == DeferredLoadTask.IMPACT_USE && !supportSerialization) { | 3253 if (impactUse == DeferredLoadTask.IMPACT_USE && !supportSerialization) { |
| 3254 // TODO(johnniwinther): Allow emptying when serialization has been | 3254 // TODO(johnniwinther): Allow emptying when serialization has been |
| 3255 // performed. | 3255 // performed. |
| 3256 resolution.emptyCache(); | 3256 resolution.emptyCache(); |
| 3257 } | 3257 } |
| 3258 } | 3258 } |
| 3259 } | 3259 } |
| OLD | NEW |