anchor.diff:  
     // Emit a switch statement.
     bool emitSwitch(int depth) {
  -    emitLn('switch (', newline: false);
  -    emitExpr(0, DartType.INT);
  -    emit(') {', newline: true);
  -    int start = choose(1 << 32);
  -    int step = chooseOneUpTo(10);
  -    for (int i = 0; i < 2; i++, start += step) {
  -      incIndent();
  -      if (i == 2) {
  -        emitLn('default: ');
  +    emitCase(Function bodyEmitter, {int kase}) {
  +      if (kase == null) {
  +        emitLn('default: ', newline: false);
         } else {
  -        emitLn('case $start: ');
  -      }
  -      _emitBraceWrapped(() => emitStatements(depth + 1));
  -      emitLn('break;'); // always generate, avoid FE complaints
  -      decIndent();
  -    }
  -    emitLn('}');
  +        emitLn('case $kase: ', newline: false);
  +      }
  +      emitBraceWrapped(() {
  +        bodyEmitter();
  +        emitNewline();
  +        emitLn('break;',
  +            newline: false); // always generate, avoid FE complaints
  +      });
  +    }
  +
  +    emitLn('switch ', newline: false);
  +    emitParenWrapped(() => emitExpr(0, DartType.INT));
  +    emitBraceWrapped(() {
  +      int start = choose(1 << 32);
  +      int step = chooseOneUpTo(10);
  +      final maxCases = 3;
  +      for (int i = 0; i < maxCases; i++, start += step) {
  +        emitCase(() => emitStatement(depth + 1),
  +            kase: (i == 2 && coinFlip()) ? null : start);
  +        if (i + 1 != maxCases) {
  +          emitNewline();
  +        }
  +      }
  +    });
       return true;
     }
   
     // Emit a new program scope that introduces a new local variable.
     bool emitScope(int depth) {
  -    _emitBraceWrapped(() {
  +    emitIndentation();
  +    emitBraceWrapped(() {
         DartType tp = oneOfSet(dartType.allTypes);
         final int i = localVars.length;
  -      emitLn('${tp.name} $localName$i = ', newline: false);
  -      localVars.add(null); // declared, but don't use
  -      emitExpr(0, tp, includeSemicolon: true);
  -      localVars.removeLast(); // will get type
  +      final name = '$localName$i';
  +      emitVariableDeclaration(name, tp, initializerEmitter: () {
  +        localVars.add(null); // declared, but don't use
  +        emitExpr(0, tp);
  +        localVars.removeLast(); // will get type
  +      });
         localVars.add(tp);
         emitStatements(depth + 1);
         localVars.removeLast();
  
positive.code:     } else if (binop == "*" &&
          DartType.isGrowableType(binOpParams[1]) &&
          dartType.isInterfaceOfType(binOpParams[0], DartType.NUM)) {
        _emitParenWrapped(() {
          emitLiteral(depth + 1, binOpParams[0], smallPositiveValue: true);
          emit(' $binop ');
          emitExpr(depth + 1, binOpParams[1], rhsFilter: rhsFilter);
        });
      } else {
        _emitParenWrapped(() {
          emitExpr(depth + 1, binOpParams[0], rhsFilter: rhsFilter);
          emit(' $binop ');
          emitExpr(depth + 1, binOpParams[1], rhsFilter: rhsFilter);
  
negative.code:         // TODO(bkonyi): remove unnecessary new
          emit('new ${tp.name}');
        }
        emitParenWrapped(() {
          // Iterate over constructor parameters.
          List<DartType> constructorParameters =
              dartType.constructorParameters(tp, constructor);
          if (constructorParameters == null) {
            throw 'No constructor parameters for ${tp.name}.$constructor';
          }
          emitCommaSeparated((int i) {
            // If we are emitting a constructor parameter, we want to use small
            // values to avoid programs that run out of memory.
            // TODO (felih): maybe allow occasionally?
  