Chromium Code Reviews| Index: pkg/compiler/lib/src/ssa/locals_handler.dart |
| diff --git a/pkg/compiler/lib/src/ssa/locals_handler.dart b/pkg/compiler/lib/src/ssa/locals_handler.dart |
| index c521f9cf4e88c663ca2834d80fa544c64cac3600..21dd387674a4b7706a669586084e6a12d4adf994 100644 |
| --- a/pkg/compiler/lib/src/ssa/locals_handler.dart |
| +++ b/pkg/compiler/lib/src/ssa/locals_handler.dart |
| @@ -4,9 +4,9 @@ |
| import '../closure.dart'; |
| import '../common.dart'; |
| -import '../elements/resolution_types.dart'; |
| import '../elements/elements.dart'; |
| import '../elements/entities.dart'; |
| +import '../elements/types.dart'; |
| import '../io/source_information.dart'; |
| import '../js_backend/native_data.dart'; |
| import '../js_backend/interceptor_data.dart'; |
| @@ -34,8 +34,8 @@ class LocalsHandler { |
| new Map<Local, CapturedVariable>(); |
| final GraphBuilder builder; |
| ClosureClassMap closureData; |
| - Map<ResolutionTypeVariableType, TypeVariableLocal> typeVariableLocals = |
| - new Map<ResolutionTypeVariableType, TypeVariableLocal>(); |
| + Map<TypeVariableType, TypeVariableLocal> typeVariableLocals = |
| + new Map<TypeVariableType, TypeVariableLocal>(); |
| final Entity executableContext; |
| final MemberEntity memberContext; |
| @@ -59,7 +59,7 @@ class LocalsHandler { |
| /// [instanceType] is not used if it contains type variables, since these |
| /// might not be in scope or from the current instance. |
| /// |
| - final ResolutionInterfaceType instanceType; |
| + final InterfaceType instanceType; |
| final NativeData _nativeData; |
| @@ -70,7 +70,7 @@ class LocalsHandler { |
| this.executableContext, |
| this.memberContext, |
| this.contextClass, |
| - ResolutionInterfaceType instanceType, |
| + InterfaceType instanceType, |
| this._nativeData, |
| this._interceptorData) |
| : this.instanceType = |
| @@ -89,15 +89,20 @@ class LocalsHandler { |
| /// Substituted type variables occurring in [type] into the context of |
| /// [contextClass]. |
| - ResolutionDartType substInContext(ResolutionDartType type) { |
| + DartType substInContext(DartType type) { |
| if (contextClass != null) { |
| - ClassElement typeContext = Types.getClassContext(type); |
| + ClassElement typeContext = DartTypes.getClassContext(type); |
| if (typeContext != null) { |
| - type = type.substByContext(contextClass.asInstanceOf(typeContext)); |
| + type = builder.types.substByContext( |
| + type, |
| + builder.types.asInstanceOf( |
| + builder.types.getThisType(contextClass), typeContext)); |
| + //type = type.substByContext(contextClass.asInstanceOf(typeContext)); |
|
Siggi Cherem (dart-lang)
2017/06/02 18:09:23
delete old code? also below?
Johnni Winther
2017/06/02 18:53:46
Done.
|
| } |
| } |
| if (instanceType != null) { |
| - type = type.substByContext(instanceType); |
| + type = builder.types.substByContext(type, instanceType); |
| + //type = type.substByContext(instanceType); |
| } |
| return type; |
| } |
| @@ -398,7 +403,7 @@ class LocalsHandler { |
| }); |
| } |
| - Local getTypeVariableAsLocal(ResolutionTypeVariableType type) { |
| + Local getTypeVariableAsLocal(TypeVariableType type) { |
| return typeVariableLocals.putIfAbsent(type, () { |
| return new TypeVariableLocal(type, executableContext); |
| }); |