anchor.diff:  import '../types/masks.dart';
   import '../universe/call_structure.dart' show CallStructure;
   import '../universe/selector.dart';
  -import '../universe/use.dart' show TypeUse;
  +import '../universe/use.dart' show StaticUse, TypeUse;
   import '../universe/side_effects.dart' show SideEffects;
   import 'graph_builder.dart';
   import 'kernel_ast_adapter.dart';
  
positive.code:       }
        _pushStaticInvocation(target, <HInstruction>[], backend.dynamicType);
      }
  
      /*
      if (!node.arguments.isEmpty) {
        reporter.internalError(
            node, 'Too many arguments to JS_CURRENT_ISOLATE_CONTEXT.');
      }
  
      if (!compiler.hasIsolateSupport) {
        // If the isolate library is not used, we just generate code
        // to fetch the static state.
        String name = backend.namer.staticStateHolder;
        push(new HForeignCode(
            js.js.parseForeignJS(name), backend.dynamicType, <HInstruction>[],
            nativeBehavior: native.NativeBehavior.DEPENDS_OTHER));
      } else {
        // Call a helper method from the isolate library. The isolate
        // library uses its own isolate structure, that encapsulates
        // Leg's isolate.
        Element element = helpers.currentIsolate;
        if (element == null) {
          reporter.internalError(node, 'Isolate library and compiler mismatch.');
        }
        pushInvokeStatic(null, element, [], typeMask: backend.dynamicType);
      }
      */
    }
  
    void handleForeignJsCallInIsolate(ir.StaticInvocation invocation) {
  
negative.code: 
    void handleForeignDartClosureToJs(
        ir.StaticInvocation invocation, String name) {
      // TODO(sra): Do we need to wrap the closure in something that saves the
      // current isolate?
      handleForeignRawFunctionRef(invocation, name);
    }
  
    void handleForeignRawFunctionRef(
        ir.StaticInvocation invocation, String name) {
      if (_unexpectedForeignArguments(invocation, 1, 1)) {
        stack.add(graph.addConstantNull(compiler)); // Result expected on stack.
        return;
      }
  
      ir.Expression closure = invocation.arguments.positional.single;
      String problem = 'requires a static method or top-level method';
      if (closure is ir.StaticGet) {
        ir.Member staticTarget = closure.target;
        if (staticTarget is ir.Procedure) {
          if (staticTarget.kind == ir.ProcedureKind.Method) {
            ir.FunctionNode function = staticTarget.function;
            if (function != null &&
                function.requiredParameterCount ==
                    function.positionalParameters.length &&
                function.namedParameters.isEmpty) {
              registry?.registerStaticUse(
                  new StaticUse.foreignUse(astAdapter.getMember(staticTarget)));
              push(new HForeignCode(
                  js.js.expressionTemplateYielding(backend.emitter
                      .staticFunctionAccess(astAdapter.getMember(staticTarget))),
                  backend.dynamicType,
                  <HInstruction>[],
                  nativeBehavior: native.NativeBehavior.PURE));
              return;
            }
            problem = 'does not handle a closure with optional parameters';
          }
        }
      }
  
      compiler.reporter.reportErrorMessage(astAdapter.getNode(invocation),
          MessageKind.GENERIC, {'text': "'$name' $problem."});
      stack.add(graph.addConstantNull(compiler)); // Result expected on stack.
      return;
    }
  
    void handleForeignJsSetStaticState(ir.StaticInvocation invocation) {
  