AutoCloseableKt.smali
4.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
.class public final Lkotlin/jdk7/AutoCloseableKt;
.super Ljava/lang/Object;
.source "AutoCloseable.kt"
# annotations
.annotation runtime Lkotlin/Metadata;
bv = {
0x1,
0x0,
0x3
}
d1 = {
"\u0000\u001c\n\u0000\n\u0002\u0010\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0003\n\u0002\u0008\u0004\n\u0002\u0018\u0002\n\u0002\u0008\u0002\u001a\u0018\u0010\u0000\u001a\u00020\u0001*\u0004\u0018\u00010\u00022\u0008\u0010\u0003\u001a\u0004\u0018\u00010\u0004H\u0001\u001a8\u0010\u0005\u001a\u0002H\u0006\"\n\u0008\u0000\u0010\u0007*\u0004\u0018\u00010\u0002\"\u0004\u0008\u0001\u0010\u0006*\u0002H\u00072\u0012\u0010\u0008\u001a\u000e\u0012\u0004\u0012\u0002H\u0007\u0012\u0004\u0012\u0002H\u00060\tH\u0087\u0008\u00a2\u0006\u0002\u0010\n\u00a8\u0006\u000b"
}
d2 = {
"closeFinally",
"",
"Ljava/lang/AutoCloseable;",
"cause",
"",
"use",
"R",
"T",
"block",
"Lkotlin/Function1;",
"(Ljava/lang/AutoCloseable;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;",
"kotlin-stdlib-jdk7"
}
k = 0x2
mv = {
0x1,
0x1,
0xf
}
pn = "kotlin"
.end annotation
.annotation build Lkotlin/jvm/JvmName;
name = "AutoCloseableKt"
.end annotation
# direct methods
.method public static final closeFinally(Ljava/lang/AutoCloseable;Ljava/lang/Throwable;)V
.locals 0
.param p0 # Ljava/lang/AutoCloseable;
.annotation build Lorg/jetbrains/annotations/Nullable;
.end annotation
.end param
.param p1 # Ljava/lang/Throwable;
.annotation build Lorg/jetbrains/annotations/Nullable;
.end annotation
.end param
.annotation build Lkotlin/PublishedApi;
.end annotation
.annotation build Lkotlin/SinceKotlin;
version = "1.2"
.end annotation
if-nez p0, :cond_0
goto :goto_0
:cond_0
if-nez p1, :cond_1
.line 56
invoke-interface {p0}, Ljava/lang/AutoCloseable;->close()V
goto :goto_0
.line 59
:cond_1
:try_start_0
invoke-interface {p0}, Ljava/lang/AutoCloseable;->close()V
:try_end_0
.catch Ljava/lang/Throwable; {:try_start_0 .. :try_end_0} :catch_0
goto :goto_0
:catch_0
move-exception p0
.line 61
invoke-virtual {p1, p0}, Ljava/lang/Throwable;->addSuppressed(Ljava/lang/Throwable;)V
:goto_0
return-void
.end method
.method private static final use(Ljava/lang/AutoCloseable;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
.locals 2
.annotation system Ldalvik/annotation/Signature;
value = {
"<T::",
"Ljava/lang/AutoCloseable;",
"R:",
"Ljava/lang/Object;",
">(TT;",
"Lkotlin/jvm/functions/Function1<",
"-TT;+TR;>;)TR;"
}
.end annotation
.annotation build Lkotlin/SinceKotlin;
version = "1.2"
.end annotation
.annotation build Lkotlin/internal/InlineOnly;
.end annotation
const/4 v0, 0x0
.line 35
check-cast v0, Ljava/lang/Throwable;
const/4 v1, 0x1
.line 37
:try_start_0
invoke-interface {p1, p0}, Lkotlin/jvm/functions/Function1;->invoke(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object p1
:try_end_0
.catch Ljava/lang/Throwable; {:try_start_0 .. :try_end_0} :catch_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
invoke-static {v1}, Lkotlin/jvm/internal/InlineMarker;->finallyStart(I)V
.line 42
invoke-static {p0, v0}, Lkotlin/jdk7/AutoCloseableKt;->closeFinally(Ljava/lang/AutoCloseable;Ljava/lang/Throwable;)V
invoke-static {v1}, Lkotlin/jvm/internal/InlineMarker;->finallyEnd(I)V
return-object p1
:catchall_0
move-exception p1
goto :goto_0
:catch_0
move-exception v0
.line 40
:try_start_1
throw v0
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
.line 43
:goto_0
invoke-static {v1}, Lkotlin/jvm/internal/InlineMarker;->finallyStart(I)V
.line 42
invoke-static {p0, v0}, Lkotlin/jdk7/AutoCloseableKt;->closeFinally(Ljava/lang/AutoCloseable;Ljava/lang/Throwable;)V
invoke-static {v1}, Lkotlin/jvm/internal/InlineMarker;->finallyEnd(I)V
throw p1
.end method