D8 Optimizations
[]
Jake Wharton
[0005f0] Main.greetingType:(LGreeting;)Ljava/lang/String; 0000: sget-object v0, LMain$1;.$SwitchMap$Greeting:[I 0002: invoke-virtual {v1}, LGreeting;.ordinal:()I 0005: move-result v1 0006: aget v0, v0, v1 -0008: packed-switch v0, 00000017 +0008: const/4 v1, #int 1 +0009: if-eq v0, v1, 0014 +000b: const/4 v1, #int 2 +000c: if-eq v0, v1, 0017 000e: new-instance v0, Ljava/lang/AssertionError; 0010: invoke-direct {v0}, Ljava/lang/AssertionError;.<init>:()V 0013: throw v0 0014: const-string v0, "formal" 0016: return-object v0 0017: const-string v0, "informal" 0019: return-object v0 -0017: packed-switch-data (8 units) Both D8 and R8 will compute isEmpty() , startsWith(String) , endsWith(String) , contains(String) , equals(String) , equalsIgnoreCase(String) , contentEquals(String) , hashCode() ,…