CF backend: Don't read stack frames in with ASM

This reverts Ia0c6ebde 48d45864 ("Read frames into JarCode for CF
backend fallback", 2018-03-12) since we now have a complete IR->CF
construction.

Change-Id: I0acb2ebf1d82645c105761875e167b68c7f12910
diff --git a/src/main/java/com/android/tools/r8/graph/JarCode.java b/src/main/java/com/android/tools/r8/graph/JarCode.java
index 8c1a6c5..55ae757 100644
--- a/src/main/java/com/android/tools/r8/graph/JarCode.java
+++ b/src/main/java/com/android/tools/r8/graph/JarCode.java
@@ -199,14 +199,8 @@
     if (context != null) {
       // The SecondVistor is in charge of setting the context to null.
       DexProgramClass owner = context.owner;
-      int flags = ClassReader.SKIP_FRAMES;
-      if (application.options.isGeneratingClassFiles()) {
-        // TODO(mathiasr): Keep frames in JarCode until IR->CF construction is complete.
-        // When we throw Unimplemented in IR->CF construction, the original JarCode is output
-        // instead. In this case we must output frames as well, or we will fail verification.
-        flags = 0;
-      }
-      new ClassReader(context.classCache).accept(new SecondVisitor(context, application), flags);
+      new ClassReader(context.classCache).accept(new SecondVisitor(context, application),
+          ClassReader.SKIP_FRAMES);
       assert verifyNoReparseContext(owner);
     }
   }
diff --git a/src/main/java/com/android/tools/r8/ir/conversion/JarSourceCode.java b/src/main/java/com/android/tools/r8/ir/conversion/JarSourceCode.java
index 2298bc6..4dd5656 100644
--- a/src/main/java/com/android/tools/r8/ir/conversion/JarSourceCode.java
+++ b/src/main/java/com/android/tools/r8/ir/conversion/JarSourceCode.java
@@ -49,7 +49,6 @@
 import org.objectweb.asm.Type;
 import org.objectweb.asm.tree.AbstractInsnNode;
 import org.objectweb.asm.tree.FieldInsnNode;
-import org.objectweb.asm.tree.FrameNode;
 import org.objectweb.asm.tree.IincInsnNode;
 import org.objectweb.asm.tree.InsnNode;
 import org.objectweb.asm.tree.IntInsnNode;
@@ -1171,9 +1170,6 @@
       case AbstractInsnNode.LINE:
         updateState((LineNumberNode) insn);
         break;
-      case AbstractInsnNode.FRAME:
-        updateState((FrameNode) insn);
-        break;
       default:
         throw new Unreachable("Unexpected instruction " + insn);
     }
@@ -1795,11 +1791,6 @@
     // Intentionally empty.
   }
 
-  private void updateState(FrameNode insn) {
-    assert application.options.isGeneratingClassFiles();
-    // Intentionally empty.
-  }
-
   private void updateStateForConversion(Type from, Type to) {
     state.pop();
     state.push(to);
@@ -1854,9 +1845,6 @@
       case AbstractInsnNode.LINE:
         build((LineNumberNode) insn, builder);
         break;
-      case AbstractInsnNode.FRAME:
-        build((FrameNode) insn, builder);
-        break;
       default:
         throw new Unreachable("Unexpected instruction " + insn);
     }
@@ -2836,11 +2824,6 @@
     builder.addDebugPosition(currentPosition);
   }
 
-  private void build(FrameNode insn, IRBuilder builder) {
-    assert application.options.isGeneratingClassFiles();
-    // Intentionally empty.
-  }
-
   @Override
   public Position getDebugPositionAtOffset(int offset) {
     if (offset == EXCEPTIONAL_SYNC_EXIT_OFFSET) {