Skip to content

Commit

Permalink
docs: invert example
Browse files Browse the repository at this point in the history
  • Loading branch information
algomaster99 committed Aug 6, 2024
1 parent fb923f3 commit e8ef769
Showing 1 changed file with 35 additions and 35 deletions.
70 changes: 35 additions & 35 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1207,47 +1207,47 @@ lot of noise, see example 2.
<blockquote>Java 22</blockquote>
</summary>
<pre>
--- /home/aman/Desktop/personal/bytecode-diff/src/test/resources/infiniteRecursion/decompiled/A.class
+++ /home/aman/Desktop/personal/bytecode-diff/src/test/resources/infiniteRecursion/original/A.class
--- /home/aman/Desktop/personal/bytecode-diff/src/test/resources/infiniteRecursion/original/A.class
+++ /home/aman/Desktop/personal/bytecode-diff/src/test/resources/infiniteRecursion/decompiled/A.class
├── javap -verbose -constants -s -l -private {}
│ @@ -1,8 +1,8 @@
│ - SHA-256 checksum 039eb028d004305c9ee56b5429d116f773b75265617153c072ac6eb1d34d83b4
│ + SHA-256 checksum 44a81df8eb39d7819ae5e8f07f5eb483f7a8fd363776f0307ec0ebfb3057ce6c
│ - SHA-256 checksum 44a81df8eb39d7819ae5e8f07f5eb483f7a8fd363776f0307ec0ebfb3057ce6c
│ + SHA-256 checksum 039eb028d004305c9ee56b5429d116f773b75265617153c072ac6eb1d34d83b4
│ Compiled from "A.java"
│ public class A
│ minor version: 0
│ major version: 65
│ flags: (0x0021) ACC_PUBLIC, ACC_SUPER
│ this_class: #13 // A
│ super_class: #2 // java/lang/Object
│ @@ -21,34 +21,36 @@
│ @@ -21,36 +21,34 @@
│ #11 = Methodref #9.#3 // java/lang/StringBuffer."<init>":()V
│ #12 = Methodref #13.#14 // A.applyRules:(Ljava/lang/String;Ljava/lang/StringBuffer;)Ljava/lang/StringBuffer;
│ #13 = Class #15 // A
│ #14 = NameAndType #16:#17 // applyRules:(Ljava/lang/String;Ljava/lang/StringBuffer;)Ljava/lang/StringBuffer;
│ #15 = Utf8 A
│ #16 = Utf8 applyRules
│ #17 = Utf8 (Ljava/lang/String;Ljava/lang/StringBuffer;)Ljava/lang/StringBuffer;
│ - #18 = Utf8 Code
│ - #19 = Utf8 LineNumberTable
│ - #20 = Utf8 main
│ - #21 = Utf8 ([Ljava/lang/String;)V
│ - #22 = Utf8 (Ljava/lang/String;Ljava/lang/Appendable;)Ljava/lang/Appendable;
│ - #23 = Utf8 Signature
│ - #24 = Utf8 <B::Ljava/lang/Appendable;>(Ljava/lang/String;TB;)TB;
│ - #25 = Utf8 SourceFile
│ - #26 = Utf8 A.java
+ #18 = Methodref #13.#19 // A.applyRules:(Ljava/lang/String;Ljava/lang/Appendable;)Ljava/lang/Appendable;
+ #19 = NameAndType #16:#20 // applyRules:(Ljava/lang/String;Ljava/lang/Appendable;)Ljava/lang/Appendable;
│ + #20 = Utf8 (Ljava/lang/String;Ljava/lang/Appendable;)Ljava/lang/Appendable;
│ + #21 = Utf8 Code
│ + #22 = Utf8 LineNumberTable
│ + #23 = Utf8 main
│ + #24 = Utf8 ([Ljava/lang/String;)V
│ + #25 = Utf8 Signature
│ + #26 = Utf8 <B::Ljava/lang/Appendable;>(Ljava/lang/String;TB;)TB;
│ + #27 = Utf8 SourceFile
│ + #28 = Utf8 A.java
│ - #18 = Methodref #13.#19 // A.applyRules:(Ljava/lang/String;Ljava/lang/Appendable;)Ljava/lang/Appendable;
│ - #19 = NameAndType #16:#20 // applyRules:(Ljava/lang/String;Ljava/lang/Appendable;)Ljava/lang/Appendable;
│ - #20 = Utf8 (Ljava/lang/String;Ljava/lang/Appendable;)Ljava/lang/Appendable;
│ - #21 = Utf8 Code
│ - #22 = Utf8 LineNumberTable
│ - #23 = Utf8 main
│ - #24 = Utf8 ([Ljava/lang/String;)V
│ - #25 = Utf8 Signature
│ - #26 = Utf8 <B::Ljava/lang/Appendable;>(Ljava/lang/String;TB;)TB;
- #27 = Utf8 SourceFile
- #28 = Utf8 A.java
│ + #18 = Utf8 Code
│ + #19 = Utf8 LineNumberTable
│ + #20 = Utf8 main
│ + #21 = Utf8 ([Ljava/lang/String;)V
│ + #22 = Utf8 (Ljava/lang/String;Ljava/lang/Appendable;)Ljava/lang/Appendable;
│ + #23 = Utf8 Signature
│ + #24 = Utf8 <B::Ljava/lang/Appendable;>(Ljava/lang/String;TB;)TB;
│ + #25 = Utf8 SourceFile
│ + #26 = Utf8 A.java
│ {
│ public A();
│ descriptor: ()V
Expand All @@ -1258,25 +1258,25 @@ lot of noise, see example 2.
│ 1: invokespecial #1 // Method java/lang/Object."<init>":()V
│ 4: return
│ LineNumberTable:
│ - line 3: 0
│ + line 4: 0
│ - line 4: 0
│ + line 3: 0
│ public static void main(java.lang.String[]);
│ descriptor: ([Ljava/lang/String;)V
│ flags: (0x0009) ACC_PUBLIC, ACC_STATIC
│ Code:
│ stack=3, locals=1, args_size=1
│ 0: ldc #7 // String Hello, World!
│ @@ -67,22 +69,23 @@
│ @@ -69,23 +67,22 @@
│ flags: (0x000a) ACC_PRIVATE, ACC_STATIC
│ Code:
│ stack=1, locals=2, args_size=2
│ 0: aload_1
│ 1: areturn
│ LineNumberTable:
│ line 10: 0
│ - Signature: #24 // <B::Ljava/lang/Appendable;>(Ljava/lang/String;TB;)TB;
│ + Signature: #26 // <B::Ljava/lang/Appendable;>(Ljava/lang/String;TB;)TB;
│ - Signature: #26 // <B::Ljava/lang/Appendable;>(Ljava/lang/String;TB;)TB;
│ + Signature: #24 // <B::Ljava/lang/Appendable;>(Ljava/lang/String;TB;)TB;
│ protected static java.lang.StringBuffer applyRules(java.lang.String, java.lang.StringBuffer);
│ descriptor: (Ljava/lang/String;Ljava/lang/StringBuffer;)Ljava/lang/StringBuffer;
Expand All @@ -1285,11 +1285,11 @@ lot of noise, see example 2.
│ stack=2, locals=2, args_size=2
│ 0: aload_0
│ 1: aload_1
│ - 2: invokestatic #12 // Method applyRules:(Ljava/lang/String;Ljava/lang/StringBuffer;)Ljava/lang/StringBuffer;
│ - 5: areturn
+ 2: invokestatic #18 // Method applyRules:(Ljava/lang/String;Ljava/lang/Appendable;)Ljava/lang/Appendable;
│ + 5: checkcast #9 // class java/lang/StringBuffer
│ + 8: areturn
│ - 2: invokestatic #18 // Method applyRules:(Ljava/lang/String;Ljava/lang/Appendable;)Ljava/lang/Appendable;
│ - 5: checkcast #9 // class java/lang/StringBuffer
- 8: areturn
│ + 2: invokestatic #12 // Method applyRules:(Ljava/lang/String;Ljava/lang/StringBuffer;)Ljava/lang/StringBuffer;
│ + 5: areturn
│ LineNumberTable:
│ line 14: 0
│ }
Expand Down

0 comments on commit e8ef769

Please sign in to comment.