| Index: pkg/compiler/lib/src/resolution/resolution_strategy.dart
|
| diff --git a/pkg/compiler/lib/src/resolution/resolution_strategy.dart b/pkg/compiler/lib/src/resolution/resolution_strategy.dart
|
| index ee21ec0397a20326818ad63fec1ec727853afd36..83d4aaf230babe9b116f2726e61b66ad9e077c9a 100644
|
| --- a/pkg/compiler/lib/src/resolution/resolution_strategy.dart
|
| +++ b/pkg/compiler/lib/src/resolution/resolution_strategy.dart
|
| @@ -8,21 +8,22 @@ import 'package:front_end/src/fasta/scanner.dart' show Token;
|
|
|
| import '../../compiler_new.dart' as api;
|
| import '../common.dart';
|
| -import '../common_elements.dart';
|
| import '../common/backend_api.dart';
|
| import '../common/names.dart';
|
| import '../common/resolution.dart';
|
| import '../common/tasks.dart';
|
| import '../common/work.dart';
|
| +import '../common_elements.dart';
|
| import '../compiler.dart';
|
| +import '../constants/expressions.dart' show ConstantExpression;
|
| import '../constants/values.dart';
|
| import '../elements/elements.dart';
|
| import '../elements/entities.dart';
|
| import '../elements/modelx.dart';
|
| import '../elements/resolution_types.dart';
|
| import '../elements/types.dart';
|
| -import '../environment.dart';
|
| import '../enqueue.dart';
|
| +import '../environment.dart';
|
| import '../frontend_strategy.dart';
|
| import '../js_backend/backend.dart';
|
| import '../js_backend/backend_usage.dart';
|
| @@ -36,10 +37,10 @@ import '../library_loader.dart';
|
| import '../native/enqueue.dart' show NativeResolutionEnqueuer;
|
| import '../native/resolver.dart';
|
| import '../options.dart';
|
| -import '../tree/tree.dart' show Node;
|
| -import '../serialization/task.dart';
|
| import '../patch_parser.dart';
|
| import '../resolved_uri_translator.dart';
|
| +import '../serialization/task.dart';
|
| +import '../tree/tree.dart' show Node;
|
| import '../universe/call_structure.dart';
|
| import '../universe/use.dart';
|
| import '../universe/world_builder.dart';
|
| @@ -517,10 +518,11 @@ class _CompilerElementEnvironment implements ElementEnvironment {
|
|
|
| @override
|
| void forEachConstructor(
|
| - covariant ClassElement cls, void f(ConstructorEntity constructor)) {
|
| - cls.ensureResolved(_resolution);
|
| + covariant ClassElement cls, void f(ConstructorEntity constructor),
|
| + {bool ensureResolved: true}) {
|
| + if (ensureResolved) cls.ensureResolved(_resolution);
|
| for (ConstructorElement constructor in cls.implementation.constructors) {
|
| - _resolution.ensureResolved(constructor.declaration);
|
| + if (ensureResolved) _resolution.ensureResolved(constructor.declaration);
|
| if (constructor.isRedirectingFactory) continue;
|
| f(constructor);
|
| }
|
| @@ -532,6 +534,14 @@ class _CompilerElementEnvironment implements ElementEnvironment {
|
| cls.forEachConstructorBody(f);
|
| }
|
|
|
| + @override
|
| + void forEachNestedClosure(
|
| + covariant MemberElement member, void f(FunctionEntity closure)) {
|
| + for (var closure in member.nestedClosures) {
|
| + f(closure);
|
| + }
|
| + }
|
| +
|
| @override
|
| ClassEntity getSuperClass(covariant ClassElement cls,
|
| {bool skipUnnamedMixinApplications: false}) {
|
| @@ -679,6 +689,11 @@ class _CompilerElementEnvironment implements ElementEnvironment {
|
| return function.type;
|
| }
|
|
|
| + @override
|
| + ConstantExpression getFieldConstant(covariant FieldElement field) {
|
| + return field.constant;
|
| + }
|
| +
|
| @override
|
| ResolutionDartType getUnaliasedType(covariant ResolutionDartType type) {
|
| type.computeUnaliased(_resolution);
|
|
|