From 2ebdc88fa5914414f439853efaa4efa3144a80a9 Mon Sep 17 00:00:00 2001 From: Col-E <mcoley2@gmu.edu> Date: Wed, 16 Aug 2023 15:28:31 -0400 Subject: [PATCH] Use insn consts in new desugarded method impls --- .../retargeter/DesugaredLibraryCfMethods.java | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/src/main/java/com/android/tools/r8/ir/desugar/desugaredlibrary/retargeter/DesugaredLibraryCfMethods.java b/src/main/java/com/android/tools/r8/ir/desugar/desugaredlibrary/retargeter/DesugaredLibraryCfMethods.java index 0fdac184c9..e1e21a152b 100644 --- a/src/main/java/com/android/tools/r8/ir/desugar/desugaredlibrary/retargeter/DesugaredLibraryCfMethods.java +++ b/src/main/java/com/android/tools/r8/ir/desugar/desugaredlibrary/retargeter/DesugaredLibraryCfMethods.java @@ -58,9 +58,9 @@ public static CfCode DesugaredLibraryBridge_fromArgType( 4, ImmutableList.of( label0, - new CfLoad(ValueType.OBJECT, 1), + CfLoad.ALOAD_1, new CfIf(IfType.EQ, ValueType.OBJECT, label1), - new CfLoad(ValueType.OBJECT, 1), + CfLoad.ALOAD_1, new CfConstString(factory.createString("java")), new CfInvoke( 182, @@ -80,9 +80,9 @@ public static CfCode DesugaredLibraryBridge_fromArgType( FrameType.initializedNonNullReference(factory.stringType), FrameType.initializedNonNullReference(factory.stringType) })), - new CfLoad(ValueType.OBJECT, 0), - new CfLoad(ValueType.OBJECT, 1), - new CfLoad(ValueType.OBJECT, 2), + CfLoad.ALOAD_0, + CfLoad.ALOAD_1, + CfLoad.ALOAD_2, new CfInvoke( 182, factory.createMethod( @@ -104,9 +104,9 @@ public static CfCode DesugaredLibraryBridge_fromArgType( FrameType.initializedNonNullReference(factory.stringType), FrameType.initializedNonNullReference(factory.stringType) })), - new CfLoad(ValueType.OBJECT, 0), + CfLoad.ALOAD_0, new CfNew(factory.stringBuilderType), - new CfStackInstruction(CfStackInstruction.Opcode.Dup), + CfStackInstruction.DUP, new CfInvoke( 183, factory.createMethod( @@ -122,7 +122,7 @@ public static CfCode DesugaredLibraryBridge_fromArgType( factory.createProto(factory.stringBuilderType, factory.stringType), factory.createString("append")), false), - new CfLoad(ValueType.OBJECT, 1), + CfLoad.ALOAD_1, new CfConstString(factory.createString("java")), new CfInvoke( 182, @@ -152,7 +152,7 @@ public static CfCode DesugaredLibraryBridge_fromArgType( factory.createProto(factory.stringType), factory.createString("toString")), false), - new CfLoad(ValueType.OBJECT, 2), + CfLoad.ALOAD_2, new CfInvoke( 182, factory.createMethod( @@ -179,9 +179,9 @@ public static CfCode DesugaredLibraryBridge_fromArgType( Arrays.asList( FrameType.initializedNonNullReference( factory.createType("Ljava/lang/RuntimeException;"))))), - new CfStore(ValueType.OBJECT, 3), + CfStore.ASTORE_2, label5, - new CfLoad(ValueType.OBJECT, 3), + CfLoad.ALOAD_3, new CfInvoke( 182, factory.createMethod( @@ -192,9 +192,9 @@ public static CfCode DesugaredLibraryBridge_fromArgType( new CfInstanceOf(factory.createType("Ljava/lang/ClassNotFoundException;")), new CfIf(IfType.EQ, ValueType.INT, label7), label6, - new CfLoad(ValueType.OBJECT, 0), - new CfLoad(ValueType.OBJECT, 1), - new CfLoad(ValueType.OBJECT, 2), + CfLoad.ALOAD_0, + CfLoad.ALOAD_1, + CfLoad.ALOAD_2, new CfInvoke( 182, factory.createMethod( @@ -218,8 +218,8 @@ public static CfCode DesugaredLibraryBridge_fromArgType( FrameType.initializedNonNullReference( factory.createType("Ljava/lang/RuntimeException;")) })), - new CfLoad(ValueType.OBJECT, 3), - new CfThrow(), + CfLoad.ALOAD_3, + CfThrow.INSTANCE, label8), ImmutableList.of( new CfTryCatch(