anchor.diff:      }
     }
   
  +  @override
  +  void visitFunctionExpression(ir.FunctionExpression funcExpression) {
  +    LocalFunctionElement methodElement = astAdapter.getElement(funcExpression);
  +    ClosureClassMap nestedClosureData = compiler.closureToClassMapper
  +        .getClosureToClassMapping(methodElement.resolvedAst);
  +    assert(nestedClosureData != null);
  +    assert(nestedClosureData.closureClassElement != null);
  +    ClosureClassElement closureClassElement =
  +        nestedClosureData.closureClassElement;
  +    FunctionElement callElement = nestedClosureData.callElement;
  +    // TODO(ahe): This should be registered in codegen, not here.
  +    // TODO(johnniwinther): Is [registerStaticUse] equivalent to
  +    // [addToWorkList]?
  +    registry?.registerStaticUse(new StaticUse.foreignUse(callElement));
  +
  +    List<HInstruction> capturedVariables = <HInstruction>[];
  +    closureClassElement.closureFields.forEach((ClosureFieldElement field) {
  +      Local capturedLocal =
  +          nestedClosureData.getLocalVariableForClosureField(field);
  +      assert(capturedLocal != null);
  +      capturedVariables.add(localsHandler.readLocal(capturedLocal));
  +    });
  +
  +    TypeMask type =
  +        new TypeMask.nonNullExact(closureClassElement, compiler.closedWorld);
  +    // TODO(efortuna): Add source information here.
  +    push(new HCreate(closureClassElement, capturedVariables, type));
  +
  +    registry?.registerInstantiatedClosure(methodElement);
  +  }
  +
     // TODO(het): Decide when to inline
     @override
     void visitMethodInvocation(ir.MethodInvocation invocation) {
  
positive.code:     if (returnStatement.expression == null) {
        value = graph.addConstantNull(compiler);
      } else {
        assert(target is ir.Procedure);
        returnStatement.expression.accept(this);
        value = typeBuilder.potentiallyCheckOrTrustType(pop(),
            astAdapter.getFunctionReturnType((target as ir.Procedure).function));
      }
      // TODO(het): Add source information
      // TODO(het): Set a return value instead of closing the function when we
  
negative.code: 
  import 'package:kernel/ast.dart' as ir;
  
  import '../closure.dart';
  import '../common.dart';
  import '../common/codegen.dart' show CodegenRegistry, CodegenWorkItem;
  import '../common/names.dart';
  