CloseableKt.smali
5.1 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
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
.class public final Lkotlin/io/CloseableKt;
.super Ljava/lang/Object;
.source "Closeable.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\u0003\u001a\u0018\u0010\u0000\u001a\u00020\u0001*\u0004\u0018\u00010\u00022\u0008\u0010\u0003\u001a\u0004\u0018\u00010\u0004H\u0001\u001a;\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\u00f8\u0001\u0000\u00a2\u0006\u0002\u0010\u000b\u0082\u0002\u0008\n\u0006\u0008\u0011(\n0\u0001\u00a8\u0006\u000c"
}
d2 = {
"closeFinally",
"",
"Ljava/io/Closeable;",
"cause",
"",
"use",
"R",
"T",
"block",
"Lkotlin/Function1;",
"Requires newer compiler version to be inlined correctly.",
"(Ljava/io/Closeable;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;",
"kotlin-stdlib"
}
k = 0x2
mv = {
0x1,
0x1,
0xf
}
.end annotation
.annotation build Lkotlin/jvm/JvmName;
name = "CloseableKt"
.end annotation
# direct methods
.method public static final closeFinally(Ljava/io/Closeable;Ljava/lang/Throwable;)V
.locals 0
.param p0 # Ljava/io/Closeable;
.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.1"
.end annotation
if-nez p0, :cond_0
goto :goto_0
:cond_0
if-nez p1, :cond_1
.line 53
invoke-interface {p0}, Ljava/io/Closeable;->close()V
goto :goto_0
.line 56
:cond_1
:try_start_0
invoke-interface {p0}, Ljava/io/Closeable;->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 58
invoke-static {p1, p0}, Lkotlin/ExceptionsKt;->addSuppressed(Ljava/lang/Throwable;Ljava/lang/Throwable;)V
:goto_0
return-void
.end method
.method private static final use(Ljava/io/Closeable;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
.locals 3
.annotation system Ldalvik/annotation/Signature;
value = {
"<T::",
"Ljava/io/Closeable;",
"R:",
"Ljava/lang/Object;",
">(TT;",
"Lkotlin/jvm/functions/Function1<",
"-TT;+TR;>;)TR;"
}
.end annotation
.annotation build Lkotlin/internal/InlineOnly;
.end annotation
const/4 v0, 0x0
.line 22
check-cast v0, Ljava/lang/Throwable;
const/4 v1, 0x0
const/4 v2, 0x1
.line 24
: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 {v2}, Lkotlin/jvm/internal/InlineMarker;->finallyStart(I)V
.line 30
invoke-static {v2, v2, v1}, Lkotlin/internal/PlatformImplementationsKt;->apiVersionIsAtLeast(III)Z
move-result v1
if-eqz v1, :cond_0
invoke-static {p0, v0}, Lkotlin/io/CloseableKt;->closeFinally(Ljava/io/Closeable;Ljava/lang/Throwable;)V
goto :goto_0
:cond_0
if-nez p0, :cond_1
goto :goto_0
.line 32
:cond_1
invoke-interface {p0}, Ljava/io/Closeable;->close()V
.line 39
:goto_0
invoke-static {v2}, Lkotlin/jvm/internal/InlineMarker;->finallyEnd(I)V
return-object p1
:catchall_0
move-exception p1
goto :goto_1
:catch_0
move-exception v0
.line 27
:try_start_1
throw v0
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
.line 40
:goto_1
invoke-static {v2}, Lkotlin/jvm/internal/InlineMarker;->finallyStart(I)V
.line 30
invoke-static {v2, v2, v1}, Lkotlin/internal/PlatformImplementationsKt;->apiVersionIsAtLeast(III)Z
move-result v1
if-nez v1, :cond_3
if-eqz p0, :cond_4
if-nez v0, :cond_2
.line 32
invoke-interface {p0}, Ljava/io/Closeable;->close()V
goto :goto_2
.line 35
:cond_2
:try_start_2
invoke-interface {p0}, Ljava/io/Closeable;->close()V
:try_end_2
.catch Ljava/lang/Throwable; {:try_start_2 .. :try_end_2} :catch_1
goto :goto_2
.line 30
:cond_3
invoke-static {p0, v0}, Lkotlin/io/CloseableKt;->closeFinally(Ljava/io/Closeable;Ljava/lang/Throwable;)V
.line 39
:catch_1
:cond_4
:goto_2
invoke-static {v2}, Lkotlin/jvm/internal/InlineMarker;->finallyEnd(I)V
throw p1
.end method