Resolve/replace TODOs from moving interface desugaring to CF.

Bug: 199134556
Change-Id: Ic1d42dfd14b4c43b1a28c5a6d47140625a8df5b6
diff --git a/src/main/java/com/android/tools/r8/ir/desugar/itf/InterfaceDesugaringSyntheticHelper.java b/src/main/java/com/android/tools/r8/ir/desugar/itf/InterfaceDesugaringSyntheticHelper.java
index 1c99088..6b76836 100644
--- a/src/main/java/com/android/tools/r8/ir/desugar/itf/InterfaceDesugaringSyntheticHelper.java
+++ b/src/main/java/com/android/tools/r8/ir/desugar/itf/InterfaceDesugaringSyntheticHelper.java
@@ -220,13 +220,7 @@
             method.getHolder().asClasspathOrLibraryClass(),
             appView,
             classBuilder -> {},
-            clazz -> {
-              // TODO(b/183998768): When interface method desugaring is cf to cf in R8, the
-              //  eventConsumer should always be non null.
-              if (eventConsumer != null) {
-                eventConsumer.acceptClasspathEmulatedInterface(clazz);
-              }
-            },
+            eventConsumer::acceptClasspathEmulatedInterface,
             methodBuilder ->
                 methodBuilder
                     .setAccessFlags(MethodAccessFlags.createPublicStaticSynthetic())
@@ -303,7 +297,7 @@
               .setAnnotations(definition.annotations())
               // Will be traced by the enqueuer.
               .disableAndroidApiLevelCheck()
-              // TODO(b/183998768): Should this not also be updating with a fake 'this'
+              // TODO(b/200938394): Should this not also be updating with a fake 'this'
               .setParameterAnnotationsList(definition.getParameterAnnotations())
               .setCode(ignored -> InvalidCode.getInstance());
         },
diff --git a/src/main/java/com/android/tools/r8/ir/desugar/itf/InterfaceMethodProcessorFacade.java b/src/main/java/com/android/tools/r8/ir/desugar/itf/InterfaceMethodProcessorFacade.java
index 41668bd..434238a 100644
--- a/src/main/java/com/android/tools/r8/ir/desugar/itf/InterfaceMethodProcessorFacade.java
+++ b/src/main/java/com/android/tools/r8/ir/desugar/itf/InterfaceMethodProcessorFacade.java
@@ -47,8 +47,6 @@
       InterfaceProcessingDesugaringEventConsumer eventConsumer,
       ExecutorService executorService)
       throws ExecutionException {
-    // TODO(b/183998768): Would be nice to use the ClassProcessing for the processing of classes,
-    //  and do here only the finalization.
     ThreadUtils.processItems(
         Iterables.filter(programClasses, (DexProgramClass clazz) -> shouldProcess(clazz, flavour)),
         clazz -> classProcessor.process(clazz, eventConsumer),
diff --git a/src/main/java/com/android/tools/r8/ir/desugar/itf/InterfaceMethodRewriter.java b/src/main/java/com/android/tools/r8/ir/desugar/itf/InterfaceMethodRewriter.java
index 6ab7f62..2152ef0 100644
--- a/src/main/java/com/android/tools/r8/ir/desugar/itf/InterfaceMethodRewriter.java
+++ b/src/main/java/com/android/tools/r8/ir/desugar/itf/InterfaceMethodRewriter.java
@@ -365,7 +365,7 @@
           .addScanEffect(() -> leavingStaticInvokeToInterface(context))
           .build();
     }
-    // TODO(b/183998768): This should not be needed. Targeted synthetics should be in place.
+    // TODO(b/199135051): This should not be needed. Targeted synthetics should be in place.
     if (appView.getSyntheticItems().isPendingSynthetic(invoke.getMethod().getHolderType())) {
       // We did not create this code yet, but it will not require rewriting.
       return DesugarDescription.nothing();
@@ -551,7 +551,7 @@
                             directTarget.asProgramMethod());
                     companionMethod = companionMethodDefinition.getReference();
                   } else {
-                    // TODO(b/183998768): Why does this not create a stub on the class path?
+                    // TODO(b/200938617): Why does this not create a stub on the class path?
                     companionMethod = helper.privateAsMethodOfCompanionClass(directTarget);
                   }
                 } else {
@@ -716,11 +716,9 @@
                     methodProcessingContext,
                     dexItemFactory) -> {
                   DexClassAndMethod method = resolutionResult.getResolutionPair();
-                  // TODO(b/183998768): Why do this amend routine. We have done resolution, so would
-                  // that
-                  //  not be the correct target!? I think this is just legacy from before resolution
-                  // was
-                  //  implemented in full.
+                  // TODO(b/199135051): Why do this amend routine. We have done resolution, so would
+                  //  that not be the correct target!? I think this is just legacy from before
+                  //  resolution was implemented in full.
                   DexMethod amendedMethod =
                       amendDefaultMethod(context12.getHolder(), invokedMethod);
                   assert method.getReference() == amendedMethod;
diff --git a/src/main/java/com/android/tools/r8/synthesis/SyntheticItems.java b/src/main/java/com/android/tools/r8/synthesis/SyntheticItems.java
index 2b8affa..e407c3a 100644
--- a/src/main/java/com/android/tools/r8/synthesis/SyntheticItems.java
+++ b/src/main/java/com/android/tools/r8/synthesis/SyntheticItems.java
@@ -717,9 +717,6 @@
       builder.setName(methodReference.getName());
       builder.setProto(methodReference.getProto());
       buildMethodCallback.accept(builder);
-      // TODO(b/183998768): Make this safe for recursive definitions.
-      //  For example, the builder should be split into the creation of the method structure
-      //  and the creation of the method code. The code can then be constructed outside the lock.
       methodDefinition = builder.build();
       methodCollection.addMethod(methodDefinition);
       newMethodCallback.accept((T) DexClassAndMethod.create(clazz, methodDefinition));