| OLD | NEW |
| 1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2017, 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 part of world_builder; | 5 part of world_builder; |
| 6 | 6 |
| 7 /// [ResolutionEnqueuerWorldBuilder] based on the [Element] model. | 7 /// [ResolutionEnqueuerWorldBuilder] based on the [Element] model. |
| 8 class ElementResolutionWorldBuilder extends ResolutionWorldBuilderBase { | 8 class ElementResolutionWorldBuilder extends ResolutionWorldBuilderBase { |
| 9 /// Used for testing the new more precise computation of instantiated types | 9 /// Used for testing the new more precise computation of instantiated types |
| 10 /// and classes. | 10 /// and classes. |
| 11 static bool useInstantiationMap = false; | 11 static bool useInstantiationMap = false; |
| 12 | 12 |
| 13 final JavaScriptBackend _backend; | 13 final JavaScriptBackend _backend; |
| 14 final Resolution _resolution; | 14 final Resolution _resolution; |
| 15 | 15 |
| 16 ElementResolutionWorldBuilder(this._backend, this._resolution, | 16 ElementResolutionWorldBuilder( |
| 17 this._backend, |
| 18 this._resolution, |
| 19 NativeBasicData nativeBasicData, |
| 20 NativeDataBuilder nativeDataBuilder, |
| 17 SelectorConstraintsStrategy selectorConstraintsStrategy) | 21 SelectorConstraintsStrategy selectorConstraintsStrategy) |
| 18 : super(_backend.compiler.elementEnvironment, _resolution.commonElements, | 22 : super(_backend.compiler.elementEnvironment, _resolution.commonElements, |
| 19 _backend.nativeBasicData, selectorConstraintsStrategy); | 23 nativeBasicData, nativeDataBuilder, selectorConstraintsStrategy); |
| 20 | 24 |
| 21 bool isImplemented(ClassElement cls) { | 25 bool isImplemented(ClassElement cls) { |
| 22 return super.isImplemented(cls.declaration); | 26 return super.isImplemented(cls.declaration); |
| 23 } | 27 } |
| 24 | 28 |
| 25 void registerTypeInstantiation( | 29 void registerTypeInstantiation( |
| 26 InterfaceType type, ClassUsedCallback classUsed, | 30 InterfaceType type, ClassUsedCallback classUsed, |
| 27 {ConstructorEntity constructor, | 31 {ConstructorEntity constructor, |
| 28 bool byMirrors: false, | 32 bool byMirrors: false, |
| 29 bool isRedirection: false}) { | 33 bool isRedirection: false}) { |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 175 classSets: _classSets); | 179 classSets: _classSets); |
| 176 } | 180 } |
| 177 | 181 |
| 178 @override | 182 @override |
| 179 void registerMixinUse( | 183 void registerMixinUse( |
| 180 MixinApplicationElement mixinApplication, ClassElement mixin) { | 184 MixinApplicationElement mixinApplication, ClassElement mixin) { |
| 181 assert(mixin.isDeclaration); | 185 assert(mixin.isDeclaration); |
| 182 super.registerMixinUse(mixinApplication, mixin); | 186 super.registerMixinUse(mixinApplication, mixin); |
| 183 } | 187 } |
| 184 } | 188 } |
| OLD | NEW |