Version 1.6.64
Remove the assertion chack for identifier name string instructions
when minifying.
Bug: 148021799
Change-Id: I97645fa62de36afc9aa381b43f5aee9655b2dfca
diff --git a/src/main/java/com/android/tools/r8/Version.java b/src/main/java/com/android/tools/r8/Version.java
index 4489d22..7d429e9 100644
--- a/src/main/java/com/android/tools/r8/Version.java
+++ b/src/main/java/com/android/tools/r8/Version.java
@@ -11,7 +11,7 @@
// This field is accessed from release scripts using simple pattern matching.
// Therefore, changing this field could break our release scripts.
- public static final String LABEL = "1.6.63";
+ public static final String LABEL = "1.6.64";
private Version() {
}
diff --git a/src/main/java/com/android/tools/r8/naming/IdentifierMinifier.java b/src/main/java/com/android/tools/r8/naming/IdentifierMinifier.java
index 4b6bbab..e2b4a9f 100644
--- a/src/main/java/com/android/tools/r8/naming/IdentifierMinifier.java
+++ b/src/main/java/com/android/tools/r8/naming/IdentifierMinifier.java
@@ -23,7 +23,6 @@
import com.android.tools.r8.graph.DexValue.DexValueString;
import com.android.tools.r8.shaking.AppInfoWithLiveness;
import com.android.tools.r8.shaking.ProguardClassFilter;
-import java.util.Arrays;
import java.util.List;
import java.util.Map;
@@ -139,21 +138,20 @@
}
private void replaceDexItemBasedConstStringInMethod(DexEncodedMethod encodedMethod) {
- if (!encodedMethod.getOptimizationInfo().useIdentifierNameString()) {
- assert (encodedMethod.getCode().isDexCode()
- && Arrays.stream(encodedMethod.getCode().asDexCode().instructions)
- .noneMatch(Instruction::isDexItemBasedConstString))
- || (encodedMethod.getCode().isCfCode()
- && encodedMethod.getCode().asCfCode().instructions.stream()
- .noneMatch(CfInstruction::isDexItemBasedConstString));
- // This return statement is commented out on the 1.6 branch. The change merged to fix
- // b/147718617 (version 1.6.62) revealed that there could be other places where the
- // identifier name string marker is not propagated. Due to changes to desugaring on the 2.1
- // version line coverage of the propagation of this flag is unknown. Conservatively looking
- // at all code for identifier name string instructions is safer.
- //
- // return;
- }
+ // This bailout is commented out on the 1.6 branch. The change merged to fix
+ // b/147718617 (version 1.6.62) revealed that there could be other places where the
+ // identifier name string marker is not propagated. Due to changes to desugaring on the 2.1
+ // version line coverage of the propagation of this flag is unknown. Conservatively looking
+ // at all code for identifier name string instructions is safer.
+ // if (!encodedMethod.getOptimizationInfo().useIdentifierNameString()) {
+ // assert (encodedMethod.getCode().isDexCode()
+ // && Arrays.stream(encodedMethod.getCode().asDexCode().instructions)
+ // .noneMatch(Instruction::isDexItemBasedConstString))
+ // || (encodedMethod.getCode().isCfCode()
+ // && encodedMethod.getCode().asCfCode().instructions.stream()
+ // .noneMatch(CfInstruction::isDexItemBasedConstString));
+ // return;
+ // }
Code code = encodedMethod.getCode();
assert code != null;
if (code.isDexCode()) {