Rabbit-R1/switch port/smali/smali_classes3/kotlin/concurrent/LocksKt.smali
2024-05-21 17:08:36 -04:00

272 lines
8.5 KiB
Smali

.class public final Lkotlin/concurrent/LocksKt;
.super Ljava/lang/Object;
.source "Locks.kt"
# annotations
.annotation system Ldalvik/annotation/SourceDebugExtension;
value = "SMAP\nLocks.kt\nKotlin\n*S Kotlin\n*F\n+ 1 Locks.kt\nkotlin/concurrent/LocksKt\n+ 2 fake.kt\nkotlin/jvm/internal/FakeKt\n*L\n1#1,74:1\n1#2:75\n*E\n"
.end annotation
.annotation runtime Lkotlin/Metadata;
d1 = {
"\u0000\u001a\n\u0002\u0008\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0008\u0002\n\u0002\u0018\u0002\n\u0002\u0008\u0003\u001a6\u0010\u0000\u001a\u0002H\u0001\"\u0004\u0008\u0000\u0010\u0001*\u00020\u00022\u000c\u0010\u0003\u001a\u0008\u0012\u0004\u0012\u0002H\u00010\u0004H\u0087\u0008\u00f8\u0001\u0000\u0082\u0002\n\n\u0008\u0008\u0001\u0012\u0002\u0010\u0001 \u0001\u00a2\u0006\u0002\u0010\u0005\u001a6\u0010\u0006\u001a\u0002H\u0001\"\u0004\u0008\u0000\u0010\u0001*\u00020\u00072\u000c\u0010\u0003\u001a\u0008\u0012\u0004\u0012\u0002H\u00010\u0004H\u0087\u0008\u00f8\u0001\u0000\u0082\u0002\n\n\u0008\u0008\u0001\u0012\u0002\u0010\u0001 \u0001\u00a2\u0006\u0002\u0010\u0008\u001a6\u0010\t\u001a\u0002H\u0001\"\u0004\u0008\u0000\u0010\u0001*\u00020\u00022\u000c\u0010\u0003\u001a\u0008\u0012\u0004\u0012\u0002H\u00010\u0004H\u0087\u0008\u00f8\u0001\u0000\u0082\u0002\n\n\u0008\u0008\u0001\u0012\u0002\u0010\u0001 \u0001\u00a2\u0006\u0002\u0010\u0005\u0082\u0002\u0007\n\u0005\u0008\u009920\u0001\u00a8\u0006\n"
}
d2 = {
"read",
"T",
"Ljava/util/concurrent/locks/ReentrantReadWriteLock;",
"action",
"Lkotlin/Function0;",
"(Ljava/util/concurrent/locks/ReentrantReadWriteLock;Lkotlin/jvm/functions/Function0;)Ljava/lang/Object;",
"withLock",
"Ljava/util/concurrent/locks/Lock;",
"(Ljava/util/concurrent/locks/Lock;Lkotlin/jvm/functions/Function0;)Ljava/lang/Object;",
"write",
"kotlin-stdlib"
}
k = 0x2
mv = {
0x1,
0x9,
0x0
}
xi = 0x30
.end annotation
# direct methods
.method private static final read(Ljava/util/concurrent/locks/ReentrantReadWriteLock;Lkotlin/jvm/functions/Function0;)Ljava/lang/Object;
.locals 1
.annotation system Ldalvik/annotation/Signature;
value = {
"<T:",
"Ljava/lang/Object;",
">(",
"Ljava/util/concurrent/locks/ReentrantReadWriteLock;",
"Lkotlin/jvm/functions/Function0<",
"+TT;>;)TT;"
}
.end annotation
const-string v0, "<this>"
invoke-static {p0, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
const-string v0, "action"
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
.line 35
invoke-virtual {p0}, Ljava/util/concurrent/locks/ReentrantReadWriteLock;->readLock()Ljava/util/concurrent/locks/ReentrantReadWriteLock$ReadLock;
move-result-object p0
.line 36
invoke-virtual {p0}, Ljava/util/concurrent/locks/ReentrantReadWriteLock$ReadLock;->lock()V
const/4 v0, 0x1
.line 38
:try_start_0
invoke-interface {p1}, Lkotlin/jvm/functions/Function0;->invoke()Ljava/lang/Object;
move-result-object p1
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
invoke-static {v0}, Lkotlin/jvm/internal/InlineMarker;->finallyStart(I)V
.line 40
invoke-virtual {p0}, Ljava/util/concurrent/locks/ReentrantReadWriteLock$ReadLock;->unlock()V
invoke-static {v0}, Lkotlin/jvm/internal/InlineMarker;->finallyEnd(I)V
return-object p1
:catchall_0
move-exception p1
invoke-static {v0}, Lkotlin/jvm/internal/InlineMarker;->finallyStart(I)V
invoke-virtual {p0}, Ljava/util/concurrent/locks/ReentrantReadWriteLock$ReadLock;->unlock()V
invoke-static {v0}, Lkotlin/jvm/internal/InlineMarker;->finallyEnd(I)V
throw p1
.end method
.method private static final withLock(Ljava/util/concurrent/locks/Lock;Lkotlin/jvm/functions/Function0;)Ljava/lang/Object;
.locals 1
.annotation system Ldalvik/annotation/Signature;
value = {
"<T:",
"Ljava/lang/Object;",
">(",
"Ljava/util/concurrent/locks/Lock;",
"Lkotlin/jvm/functions/Function0<",
"+TT;>;)TT;"
}
.end annotation
const-string v0, "<this>"
invoke-static {p0, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
const-string v0, "action"
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
.line 20
invoke-interface {p0}, Ljava/util/concurrent/locks/Lock;->lock()V
const/4 v0, 0x1
.line 22
:try_start_0
invoke-interface {p1}, Lkotlin/jvm/functions/Function0;->invoke()Ljava/lang/Object;
move-result-object p1
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
invoke-static {v0}, Lkotlin/jvm/internal/InlineMarker;->finallyStart(I)V
.line 24
invoke-interface {p0}, Ljava/util/concurrent/locks/Lock;->unlock()V
invoke-static {v0}, Lkotlin/jvm/internal/InlineMarker;->finallyEnd(I)V
return-object p1
:catchall_0
move-exception p1
invoke-static {v0}, Lkotlin/jvm/internal/InlineMarker;->finallyStart(I)V
invoke-interface {p0}, Ljava/util/concurrent/locks/Lock;->unlock()V
invoke-static {v0}, Lkotlin/jvm/internal/InlineMarker;->finallyEnd(I)V
throw p1
.end method
.method private static final write(Ljava/util/concurrent/locks/ReentrantReadWriteLock;Lkotlin/jvm/functions/Function0;)Ljava/lang/Object;
.locals 4
.annotation system Ldalvik/annotation/Signature;
value = {
"<T:",
"Ljava/lang/Object;",
">(",
"Ljava/util/concurrent/locks/ReentrantReadWriteLock;",
"Lkotlin/jvm/functions/Function0<",
"+TT;>;)TT;"
}
.end annotation
const-string v0, "<this>"
invoke-static {p0, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
const-string v0, "action"
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
.line 60
invoke-virtual {p0}, Ljava/util/concurrent/locks/ReentrantReadWriteLock;->readLock()Ljava/util/concurrent/locks/ReentrantReadWriteLock$ReadLock;
move-result-object v0
.line 62
invoke-virtual {p0}, Ljava/util/concurrent/locks/ReentrantReadWriteLock;->getWriteHoldCount()I
move-result v1
const/4 v2, 0x0
if-nez v1, :cond_0
invoke-virtual {p0}, Ljava/util/concurrent/locks/ReentrantReadWriteLock;->getReadHoldCount()I
move-result v1
goto :goto_0
:cond_0
move v1, v2
:goto_0
move v3, v2
:goto_1
if-ge v3, v1, :cond_1
.line 63
invoke-virtual {v0}, Ljava/util/concurrent/locks/ReentrantReadWriteLock$ReadLock;->unlock()V
add-int/lit8 v3, v3, 0x1
goto :goto_1
.line 65
:cond_1
invoke-virtual {p0}, Ljava/util/concurrent/locks/ReentrantReadWriteLock;->writeLock()Ljava/util/concurrent/locks/ReentrantReadWriteLock$WriteLock;
move-result-object p0
.line 66
invoke-virtual {p0}, Ljava/util/concurrent/locks/ReentrantReadWriteLock$WriteLock;->lock()V
const/4 v3, 0x1
.line 68
:try_start_0
invoke-interface {p1}, Lkotlin/jvm/functions/Function0;->invoke()Ljava/lang/Object;
move-result-object p1
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
invoke-static {v3}, Lkotlin/jvm/internal/InlineMarker;->finallyStart(I)V
:goto_2
if-ge v2, v1, :cond_2
.line 70
invoke-virtual {v0}, Ljava/util/concurrent/locks/ReentrantReadWriteLock$ReadLock;->lock()V
add-int/lit8 v2, v2, 0x1
goto :goto_2
.line 71
:cond_2
invoke-virtual {p0}, Ljava/util/concurrent/locks/ReentrantReadWriteLock$WriteLock;->unlock()V
invoke-static {v3}, Lkotlin/jvm/internal/InlineMarker;->finallyEnd(I)V
return-object p1
:catchall_0
move-exception p1
.line 70
invoke-static {v3}, Lkotlin/jvm/internal/InlineMarker;->finallyStart(I)V
:goto_3
if-ge v2, v1, :cond_3
invoke-virtual {v0}, Ljava/util/concurrent/locks/ReentrantReadWriteLock$ReadLock;->lock()V
add-int/lit8 v2, v2, 0x1
goto :goto_3
.line 71
:cond_3
invoke-virtual {p0}, Ljava/util/concurrent/locks/ReentrantReadWriteLock$WriteLock;->unlock()V
invoke-static {v3}, Lkotlin/jvm/internal/InlineMarker;->finallyEnd(I)V
throw p1
.end method