| Index: pkg/compiler/lib/src/ssa/builder_kernel.dart
|
| diff --git a/pkg/compiler/lib/src/ssa/builder_kernel.dart b/pkg/compiler/lib/src/ssa/builder_kernel.dart
|
| index b5e6dd1b4f2ecc412cffc9eb848c209d670f42ba..a6c50a25d066949727d05893f5a5c76aa100c66f 100644
|
| --- a/pkg/compiler/lib/src/ssa/builder_kernel.dart
|
| +++ b/pkg/compiler/lib/src/ssa/builder_kernel.dart
|
| @@ -594,15 +594,20 @@ class KernelSsaBuilder extends ir.Visitor with GraphBuilder {
|
| ..forEach(handleParameter);
|
|
|
| // Set the locals handler state as if we were inlining the constructor.
|
| - ConstructorElement astElement = _elementMap.getConstructor(constructor);
|
| - ResolvedAst resolvedAst = astElement.resolvedAst;
|
| + ConstructorEntity astElement = _elementMap.getConstructor(constructor);
|
| ClosureClassMap oldClosureData = localsHandler.closureData;
|
| ClosureClassMap newClosureData =
|
| closureToClassMapper.getMemberMap(astElement);
|
| - localsHandler.closureData = newClosureData;
|
| - if (resolvedAst.kind == ResolvedAstKind.PARSED) {
|
| - localsHandler.enterScope(newClosureData.capturingScopes[resolvedAst.node],
|
| - forGenerativeConstructorBody: astElement.isGenerativeConstructorBody);
|
| + if (astElement is ConstructorElement) {
|
| + // TODO(johnniwinther): Support constructor (body) entities.
|
| + ResolvedAst resolvedAst = astElement.resolvedAst;
|
| + localsHandler.closureData = newClosureData;
|
| + if (resolvedAst.kind == ResolvedAstKind.PARSED) {
|
| + localsHandler.enterScope(
|
| + newClosureData.capturingScopes[resolvedAst.node],
|
| + forGenerativeConstructorBody:
|
| + astElement.isGenerativeConstructorBody);
|
| + }
|
| }
|
| inlinedFrom(astElement, () {
|
| _buildInitializers(constructor, constructorChain, fieldValues);
|
| @@ -633,7 +638,7 @@ class KernelSsaBuilder extends ir.Visitor with GraphBuilder {
|
| if (parent is ir.Procedure &&
|
| parent.kind == ir.ProcedureKind.Operator &&
|
| parent.name.name == '==') {
|
| - MethodElement method = _elementMap.getMethod(parent);
|
| + FunctionEntity method = _elementMap.getMethod(parent);
|
| if (!backend.operatorEqHandlesNullArgument(method)) {
|
| handleIf(
|
| visitCondition: () {
|
| @@ -644,7 +649,9 @@ class KernelSsaBuilder extends ir.Visitor with GraphBuilder {
|
| visitThen: () {
|
| closeAndGotoExit(new HReturn(
|
| graph.addConstantBool(false, closedWorld),
|
| - sourceInformationBuilder.buildImplicitReturn(method)));
|
| + // TODO(johnniwinther): Provider source information like
|
| + // `sourceInformationBuilder.buildImplicitReturn(method)`.
|
| + null));
|
| },
|
| visitElse: null,
|
| // TODO(27394): Add sourceInformation via
|
| @@ -3036,7 +3043,7 @@ class KernelSsaBuilder extends ir.Visitor with GraphBuilder {
|
| return;
|
| }
|
|
|
| - ResolutionDartType typeValue =
|
| + DartType typeValue =
|
| localsHandler.substInContext(_elementMap.getDartType(type));
|
|
|
| if (type is ir.FunctionType) {
|
| @@ -3064,10 +3071,11 @@ class KernelSsaBuilder extends ir.Visitor with GraphBuilder {
|
| }
|
|
|
| if (_isInterfaceWithNoDynamicTypes(type)) {
|
| + InterfaceType interfaceType = typeValue;
|
| HInstruction representations = typeBuilder
|
| .buildTypeArgumentRepresentations(typeValue, sourceElement);
|
| add(representations);
|
| - ClassElement element = typeValue.element;
|
| + ClassEntity element = interfaceType.element;
|
| js.Name operator = namer.operatorIs(element);
|
| HInstruction isFieldName =
|
| graph.addConstantStringFromName(operator, closedWorld);
|
|
|