anchor.diff:      }
     }
   
  -  @override
     void createSubscription(o.Expression streamReference, o.Expression handler,
         {bool isMockLike = false}) {
       final subscription = o.variable('subscription_${subscriptions.length}');
  
positive.code:   }
  }
  
  /// Interface to generate a build function for an AppView.
  abstract class AppViewBuilder {
    /// Creates an HTML document fragment from trusted [html].
    ///
    /// The [html] argument may be any expression that evaluates to a string
    /// containing **trusted** HTML.
    NodeReference createHtml(
      ir.BindingSource html,
      CompileElement parent,
      int nodeIndex,
    );
  
    NodeReference createTextBinding(
        ir.BindingSource text, CompileElement parent, int nodeIndex);
  
    /// Create an html node and appends to parent element.
    void createElement(CompileElement parent, NodeReference elementRef,
        int nodeIndex, String tagName, TemplateAst ast);
  
    /// Creates an html node with a namespace and appends to parent element.
    void createElementNs(CompileElement parent, NodeReference elementRef,
        int nodeIndex, String ns, String tagName, TemplateAst ast);
  
    /// Create a view container for a given node reference and index.
    ///
    /// isPrivate indicates that the view container is only used for an embedded
    /// view and is not publicly shared through injection or view query.
    o.Expression createViewContainer(
        NodeReference nodeReference, int nodeIndex, bool isPrivate,
        [int parentNodeIndex]);
  
    /// Locally caches node reference for component and appends to parent
    /// html node.
    AppViewReference createComponentNodeAndAppend(
        CompileDirectiveMetadata component,
        CompileElement parent,
        NodeReference elementRef,
        int nodeIndex,
        ElementAst ast,
        {bool isDeferred});
  
    /// Creates call to AppView.create to build an AppView.
    ///
    /// contentNodesArray provides projectable nodes to be used during
    /// initialization.
    void createAppView(AppViewReference appViewRef,
        o.Expression componentInstance, o.Expression contentNodesArray);
  
    /// Projects projectables at sourceAstIndex into target element.
    void projectNodesIntoElement(
        CompileElement target, int sourceAstIndex, NgContentAst ast);
  
    /// Writes instruction to enable css encapsulation for a node.
    void shimCssForNode(NodeReference nodeReference, int nodeIndex,
        CompileIdentifierMetadata nodeType);
  
    /// Creates a field to store a stream subscription to be destroyed.
    void createSubscription(o.Expression streamReference, o.Expression handler,
        {bool isMockLike = false});
  
    /// Add DOM event listener.
    void addDomEventListener(
        NodeReference node, String eventName, o.Expression handler);
  
    /// Adds event listener that is routed through EventManager for custom
    /// events.
    void addCustomEventListener(
        NodeReference node, String eventName, o.Expression handler);
  
    /// Initializes query target on component at startup/build time.
    void updateQueryAtStartup(CompileQuery query);
  
    /// Writes code to update content query targets.
    void updateContentQuery(CompileQuery query);
  
    /// Creates a provider as a field or local expression.
    o.Expression createProvider(
        String propName,
        CompileDirectiveMetadata directiveMetadata,
        ProviderAst provider,
        List<o.Expression> providerValueExpressions,
        bool isMulti,
        bool isEager,
        CompileElement compileElement,
        {bool forceDynamic = false});
  
    /// Calls function directive on view startup.
    void callFunctionalDirective(o.Expression invokeExpr);
  
    /// Creates a pipe and stores reference expression in fieldName.
    void createPipeInstance(String pipeFieldName, CompilePipeMetadata pipeMeta);
  
    /// Constructs a pure proxy and stores instance in class member.
    void createPureProxy(
        o.Expression fn, int argCount, o.ReadClassMemberExpr pureProxyProp);
  
    /// Writes literal attribute values on the element itself and those
    /// contributed from directives on the ast node.
    ///
    /// !Component level attributes are excluded since we want to avoid per
    ///  call site duplication.
    void writeLiteralAttributeValues(
        ElementAst elementAst,
        NodeReference elementRef,
        int nodeIndex,
        List<CompileDirectiveMetadata> directives);
  
    /// Writes code to start defer loading an embedded template.
    void deferLoadEmbeddedTemplate(
        CompileView deferredView, CompileElement targetElement);
  
    /// Finally writes build statements into target.
    void writeBuildStatements(List<o.Statement> targetStatements);
  
    /// Writes change detection code for detectChangesInternal method.
    List<o.Statement> writeChangeDetectionStatements();
  
    /// Adds reference to a provider by token type and nodeIndex range.
    void addInjectable(int nodeIndex, int childNodeCount, ProviderAst provider,
        o.Expression providerExpr, List<CompileTokenMetadata> aliases);
  
    o.ClassMethod writeInjectorGetMethod();
  }
  
  /// Represents data to generate a host, component or embedded AppView.
  ///
  /// Members and method builders are populated by ViewBuilder.
  class CompileView implements AppViewBuilder {
    final CompileDirectiveMetadata component;
    final CompilerFlags genConfig;
    final List<CompilePipeMetadata> pipeMetas;
  
negative.code:     }
    }
  
    void shimCssForNode(NodeReference nodeReference, int nodeIndex,
        CompileIdentifierMetadata nodeType) {
      if (_isRootNodeOfHost(nodeIndex)) return;
  