1 .class LTestSync; 2 .super Ljava/lang/Object; 3 .source "Main.java" 4 5 6 # direct methods 7 .method constructor <init>()V 8 .registers 1 9 10 .prologue 11 .line 6 12 invoke-direct {p0}, Ljava/lang/Object;-><init>()V 13 14 return-void 15 .end method 16 17 .method public static run()V 18 # v0-v2 were generated by javac+dx for the original src code, keeping them. 19 # v10..v19 are for tracking, aliasing and manipulating the first lock. 20 # v20..v29 are for tracking, aliasing and manipulating the second lock. 21 .registers 30 22 23 .prologue 24 .line 8 25 const-string v1, "First" 26 27 .line 9 28 const-string v2, "Second" 29 30 move-object v10, v1 31 const v1, 0x1 32 33 .line 10 34 monitor-enter v10 35 36 # Introduce a range of dead copies. 37 move-object v11, v10 38 move-object v12, v10 39 move-object v13, v10 40 move-object v14, v10 41 move-object v15, v10 42 move-object/16 v16, v10 43 move-object/16 v17, v10 44 move-object/16 v18, v10 45 46 # Introduce a copy that we'll use for unlock. 47 move-object/16 v19, v10 48 49 # Clobber the original alias. 50 const v10, 0x3 51 52 move-object/16 v20, v2 53 const v2, 0x2 54 55 .line 11 56 :try_start_b 57 monitor-enter v20 58 :try_end_c 59 60 # Introduce a range of dead copies. 61 move-object/16 v21, v20 62 move-object/16 v22, v20 63 move-object/16 v23, v20 64 move-object/16 v24, v20 65 move-object/16 v25, v20 66 move-object/16 v26, v20 67 move-object/16 v27, v20 68 69 # Introduce another copy that we will hold live. 70 move-object/16 v28, v20 71 72 # Clobber the original alias. 73 const v20, 0x5 74 75 # Introduce another copy that we'll use for unlock. 76 move-object/16 v29, v28 77 78 .catchall {:try_start_b .. :try_end_c} :catchall_15 79 80 .line 12 81 :try_start_c 82 invoke-static/range { v28 }, LMain;->run(Ljava/lang/Object;)V 83 84 .line 13 85 monitor-exit v29 86 :try_end_10 87 .catchall {:try_start_c .. :try_end_10} :catchall_12 88 89 .line 14 90 :try_start_10 91 monitor-exit v19 92 :try_end_11 93 .catchall {:try_start_10 .. :try_end_11} :catchall_15 94 95 .line 15 96 return-void 97 98 .line 13 99 :catchall_12 100 move-exception v0 101 102 :try_start_13 103 monitor-exit v29 104 :try_end_14 105 .catchall {:try_start_13 .. :try_end_14} :catchall_12 106 107 :try_start_14 108 throw v0 109 110 .line 14 111 :catchall_15 112 move-exception v0 113 114 monitor-exit v19 115 :try_end_17 116 .catchall {:try_start_14 .. :try_end_17} :catchall_15 117 118 throw v0 119 .end method 120