anchor.diff:          parameters = <ir.Parameter>[],
           environment = new Environment.empty(),
           breakCollectors = <JumpCollector>[],
  +        continueCollectors = <JumpCollector>[],
           localConstants = <ConstDeclaration>[],
           closureLocals = new DetectClosureVariables(elements),
           super(elements, compiler) {
  
positive.code:                               exitContinuation)));
      // If there are breaks in the body, then there must be a join-point
      // continuation for the normal exit and the breaks.
      ir.LetCont letJoin;
      if (breakCollector.isEmpty) {
        condBuilder.add(branch);
      } else {
        letJoin = new ir.LetCont(null, branch);
        condBuilder.add(letJoin);
        condBuilder.current = branch;
      }
      List<ir.Parameter> parameters = condBuilder.parameters;
      ir.Continuation loopContinuation = new ir.Continuation(parameters);
      if (bodyBuilder.isOpen) {
        invokeRecursiveJoin(loopContinuation, [bodyBuilder]);
      }
      bodyContinuation.body = bodyBuilder.root;
  
      loopContinuation.body = condBuilder.root;
      add(new ir.LetCont(loopContinuation,
              new ir.InvokeContinuation(loopContinuation,
                                        environment.index2value)));
      if (letJoin == null) {
        current = condBuilder.current;
        environment = condBuilder.environment;
      } else {
        current = branch;
        environment = condBuilder.environment;
        breakCollector.addJump(this);
        letJoin.continuation = createJoin(environment.length, breakCollector);
        current = letJoin;
      }
      return null;
    }
  
negative.code:                               exitContinuation)));
      // If there are breaks in the body, then there must be a join-point
      // continuation for the normal exit and the breaks.
      bool hasBreaks = !breakCollector.isEmpty;
      ir.LetCont letJoin;
      if (hasBreaks) {
        letJoin = new ir.LetCont(null, branch);
        condBuilder.add(letJoin);
        condBuilder.current = branch;
      } else {
        condBuilder.add(branch);
      }
      ir.Continuation continueContinuation;
      if (hasContinues) {
        // If there are continues in the body, we need a named continue
        // continuation as a join point.
        continueContinuation = new ir.Continuation(updateBuilder.parameters);
        if (bodyBuilder.isOpen) continueCollector.addJump(bodyBuilder);
        invokeFullJoin(continueContinuation, continueCollector);
      }
      ir.Continuation loopContinuation =
          new ir.Continuation(condBuilder.parameters);
      if (updateBuilder.isOpen) {
        JumpCollector backEdges = new JumpCollector(null);
        backEdges.addJump(updateBuilder);
        invokeFullJoin(loopContinuation, backEdges, recursive: true);
      }
  
      // Fill in the body and possible continue continuation bodies.  Do this
      // only after it is guaranteed that they are not empty.
      if (hasContinues) {
        continueContinuation.body = updateBuilder.root;
        bodyContinuation.body =
            new ir.LetCont(continueContinuation, bodyBuilder.root);
      } else {
        bodyContinuation.body = bodyBuilder.root;
      }
  
      loopContinuation.body = condBuilder.root;
      add(new ir.LetCont(loopContinuation,
              new ir.InvokeContinuation(loopContinuation,
                                        environment.index2value)));
      if (hasBreaks) {
        current = branch;
        environment = condBuilder.environment;
        breakCollector.addJump(this);
        letJoin.continuation = createJoin(environment.length, breakCollector);
        current = letJoin;
      } else {
        current = condBuilder.current;
        environment = condBuilder.environment;
      }
      return null;
    }
  