Fix CF code generation utilities after type refactoring.
Change-Id: Iee9afc3fcc57289578cad2ae51895df87f745028
diff --git a/src/main/java/com/android/tools/r8/cf/CfCodePrinter.java b/src/main/java/com/android/tools/r8/cf/CfCodePrinter.java
index e3eb9da..954f595 100644
--- a/src/main/java/com/android/tools/r8/cf/CfCodePrinter.java
+++ b/src/main/java/com/android/tools/r8/cf/CfCodePrinter.java
@@ -209,10 +209,6 @@
return r8Type("FrameType", ImmutableList.of("cf", "code", "frame"));
}
- private String monitorType() {
- return r8Type("Monitor", ImmutableList.of("ir", "code"));
- }
-
private String asmOpcodesType() {
return type("Opcodes", ImmutableList.of("org", "objectweb", "asm"));
}
@@ -268,7 +264,11 @@
}
private String ifTypeKind(IfType kind) {
- return irType("If") + ".Type." + kind.name();
+ return irType("IfType") + "." + kind.name();
+ }
+
+ private String monitorTypeKind(MonitorType kind) {
+ return irType("MonitorType") + "." + kind.name();
}
private String dexString(DexString string) {
@@ -415,11 +415,7 @@
@Override
public void print(CfMonitor monitor) {
- printNewInstruction(
- "CfMonitor",
- monitor.getType() == MonitorType.ENTER
- ? monitorType() + ".Type.ENTER"
- : monitorType() + ".Type.EXIT");
+ printNewInstruction("CfMonitor", monitorTypeKind(monitor.getType()));
}
@Override