| // Copyright (c) 2016, the R8 project authors. Please see the AUTHORS file |
| // for details. All rights reserved. Use of this source code is governed by a |
| // BSD-style license that can be found in the LICENSE file. |
| // This code is not run directly. It needs to be compiled to dex code. |
| // 'controlflow.dex' is what is run. |
| public class ControlFlow { |
| public static void simpleIf(boolean b) { |
| public static void simpleIfMoreValues(boolean b) { |
| System.out.println(s + " " + i + " " + d + " " + b); |
| public static void simpleIfFallthrough(boolean b) { |
| public static void sequenceOfIfs(int i) { |
| System.out.println("10"); |
| public static void nestedIfs(int i) { |
| System.out.println("10"); |
| public static void simpleLoop(int count) { |
| System.out.println("simpleLoop"); |
| for (int i = 0; i < count; i++) { |
| System.out.println("count: " + i); |
| public static void main(String[] args) { |
| simpleIfMoreValues(true); |
| simpleIfMoreValues(false); |
| simpleIfFallthrough(true); |
| simpleIfFallthrough(false); |