anchor.diff:    /** Caches the statics where the initial value cannot be eagerly compiled. */
     final Set<VariableElement> lazyStatics;
   
  +  /** Caches the createRuntimeType function if registered. */
  +  Element createRuntimeTypeFunction = null;
  +
     ConstantHandler(Compiler compiler, this.constantSystem)
         : initialVariableValues = new Map<VariableElement, dynamic>(),
           compiledConstants = new Set<Constant>(),
           pendingVariables = new Set<VariableElement>(),
           lazyStatics = new Set<VariableElement>(),
           super(compiler);
  +
     String get name => 'ConstantHandler';
   
     void registerCompileTimeConstant(Constant constant) {
  -    compiler.enqueuer.codegen.registerInstantiatedClass(
  -        constant.computeType(compiler).element);
  +    registerInstantiatedClass(constant.computeType(compiler).element);
  +    if (constant.isFunction()) {
  +      FunctionConstant function = constant;
  +      registerGetOfStaticFunction(function.element);
  +    }
       compiledConstants.add(constant);
  +  }
  +
  +  void registerInstantiatedClass(ClassElement element) {
  +    compiler.enqueuer.codegen.registerInstantiatedClass(element);
  +  }
  +
  +  void registerStaticUse(Element element) {
  +    compiler.enqueuer.codegen.registerStaticUse(element);
  +  }
  +
  +  void registerGetOfStaticFunction(FunctionElement element) {
  +    compiler.enqueuer.codegen.registerGetOfStaticFunction(element);
  +  }
  +
  +  void registerStringInstance() {
  +    registerInstantiatedClass(compiler.stringClass);
  +  }
  +
  +  void registerCreateRuntimeTypeFunction() {
  +    if (createRuntimeTypeFunction != null) return;
  +    SourceString helperName = const SourceString('createRuntimeType');
  +    createRuntimeTypeFunction = compiler.findHelper(helperName);
  +    registerStaticUse(createRuntimeTypeFunction);
  +    // TODO(kasperl): It looks a bit fishy that we have to register
  +    // this in the resolution queue too. Can we do this in the
  +    // resolver instead? That would be more consistent with how we
  +    // register all the other resolution work items.
  +    compiler.enqueuer.resolution.registerStaticUse(createRuntimeTypeFunction);
     }
   
     /**
  
positive.code:     Element element = elements[send];
      if (send.isPropertyAccess) {
        if (Elements.isStaticOrTopLevelFunction(element)) {
          compiler.codegenWorld.staticFunctionsNeedingGetter.add(element);
          Constant constant = new FunctionConstant(element);
          handler.registerCompileTimeConstant(constant);
          compiler.enqueuer.codegen.registerStaticUse(element);
          return constant;
        } else if (Elements.isStaticOrTopLevelField(element)) {
          Constant result;
  
negative.code:   final ConstantHandler handler;
    final TreeElements elements;
    final Compiler compiler;
  
    CompileTimeConstantEvaluator(this.handler,
                                 this.elements,
  