* Decompile and recreate Soul Browser v1.4.85 with APK CI builds Co-authored-by: KaKi87 <KaKi87@pm.me> * Fix CI build: include bundled google.jks and remove PR trigger The apktool build failed in CI because app/unknown/.../google.jks was excluded by the *.jks gitignore rule. Whitelist app-bundled JKS files and commit the missing resource. Also remove the redundant pull_request workflow trigger. Co-authored-by: KaKi87 <KaKi87@pm.me> * Change package ID to com.github.kaki87.soulbrowser Rename the application ID so the rebuilt APK can be installed alongside the original Soul Browser from Google Play. - Update AndroidManifest package, permissions, providers, and actions - Update R class references in smali (com/github/kaki87/soulbrowser/R) - Update shortcuts.xml targetPackage - Rename app label to "Soul Rebuild" for easy identification Co-authored-by: KaKi87 <KaKi87@pm.me> * Fix install compatibility: remove split APK metadata and bundle native libs The rebuilt APK still declared requiredSplitTypes and Play Store split metadata, causing Android to reject standalone installs as incompatible. - Remove requiredSplitTypes and split-related manifest meta-data - Merge native libs from all ABI splits with uncompressed storage - Page-align before signing for extractNativeLibs=false - Add .so to apktool doNotCompress list Co-authored-by: KaKi87 <KaKi87@pm.me> * Fix install failure: use apksigner v2/v3 and bundle arm64 native libs Target SDK 36 requires APK Signature Scheme v2+, but jarsigner only produces v1 signatures, causing Android to reject the install. - Sign with apksigner (v1+v2+v3) instead of jarsigner - Add arm64-v8a native libraries from universal Soul Browser 1.4.79 - Set extractNativeLibs=true for reliable sideload installs - Commit stable debug keystore for consistent signatures across builds Co-authored-by: KaKi87 <KaKi87@pm.me> * Add committed debug keystore for consistent APK signatures Co-authored-by: KaKi87 <KaKi87@pm.me> * Fix startup crash: use original classes2.dex desugar libraries Apktool recompiles smali_classes2 into a broken classes2.dex, causing ClassNotFoundException for j$.com.android.tools.r8.a at ML Kit init. Inject the original classes2.dex (Java 8+ desugar libs) after apktool build instead of using the recompiled version. Co-authored-by: KaKi87 <KaKi87@pm.me> * Fix missing drawable resources from density split APKs The base APK is an app bundle module; density-specific drawables like seek_thumb_nor_b live in config.xhdpi.apk and were missing after rebuild, causing Resources$NotFoundException at runtime. - Merge non-9-patch resources from split APKs before apktool build - Sync public.xml IDs from R smali only when backing files exist - Add 713 density-specific resource IDs to public.xml Co-authored-by: KaKi87 <KaKi87@pm.me> --------- Co-authored-by: Cursor Agent <cursoragent@cursor.com>
1903 lines
39 KiB
Smali
1903 lines
39 KiB
Smali
.class public abstract Lkotlinx/coroutines/EventLoopImplBase;
|
|
.super Lkotlinx/coroutines/EventLoopImplPlatform;
|
|
.source "SourceFile"
|
|
|
|
# interfaces
|
|
.implements Lkotlinx/coroutines/Delay;
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/MemberClasses;
|
|
value = {
|
|
Lkotlinx/coroutines/EventLoopImplBase$DelayedResumeTask;,
|
|
Lkotlinx/coroutines/EventLoopImplBase$DelayedRunnableTask;,
|
|
Lkotlinx/coroutines/EventLoopImplBase$DelayedTask;,
|
|
Lkotlinx/coroutines/EventLoopImplBase$DelayedTaskQueue;
|
|
}
|
|
.end annotation
|
|
|
|
.annotation runtime Lkotlin/Metadata;
|
|
d1 = {
|
|
"\u0000$\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0000\n\u0002\u0008\u0006\u0008 \u0018\u00002\u00020\u00012\u00020\u0002:\u0004\n\u000b\u000c\rR\u0013\u0010\u0005\u001a\n\u0012\u0006\u0012\u0004\u0018\u00010\u00040\u00038\u0002X\u0082\u0004R\u000b\u0010\u0007\u001a\u00020\u00068\u0002X\u0082\u0004R\u0013\u0010\t\u001a\n\u0012\u0006\u0012\u0004\u0018\u00010\u00080\u00038\u0002X\u0082\u0004\u00a8\u0006\u000e"
|
|
}
|
|
d2 = {
|
|
"Lkotlinx/coroutines/EventLoopImplBase;",
|
|
"Lkotlinx/coroutines/EventLoopImplPlatform;",
|
|
"Lkotlinx/coroutines/Delay;",
|
|
"Lkotlinx/atomicfu/AtomicRef;",
|
|
"Lkotlinx/coroutines/EventLoopImplBase$DelayedTaskQueue;",
|
|
"_delayed",
|
|
"Lkotlinx/atomicfu/AtomicBoolean;",
|
|
"_isCompleted",
|
|
"",
|
|
"_queue",
|
|
"DelayedResumeTask",
|
|
"DelayedRunnableTask",
|
|
"DelayedTask",
|
|
"DelayedTaskQueue",
|
|
"kotlinx-coroutines-core"
|
|
}
|
|
k = 0x1
|
|
mv = {
|
|
0x1,
|
|
0x9,
|
|
0x0
|
|
}
|
|
xi = 0x30
|
|
.end annotation
|
|
|
|
.annotation build Lkotlin/jvm/internal/SourceDebugExtension;
|
|
value = {
|
|
"SMAP\nEventLoop.common.kt\nKotlin\n*S Kotlin\n*F\n+ 1 EventLoop.common.kt\nkotlinx/coroutines/EventLoopImplBase\n+ 2 ThreadSafeHeap.kt\nkotlinx/coroutines/internal/ThreadSafeHeap\n+ 3 Synchronized.common.kt\nkotlinx/coroutines/internal/Synchronized_commonKt\n+ 4 Synchronized.kt\nkotlinx/coroutines/internal/SynchronizedKt\n+ 5 EventLoop.kt\nkotlinx/coroutines/EventLoopKt\n+ 6 fake.kt\nkotlin/jvm/internal/FakeKt\n*L\n1#1,540:1\n51#2:541\n52#2,7:547\n24#3,4:542\n16#4:546\n53#5:554\n1#6:555\n*S KotlinDebug\n*F\n+ 1 EventLoop.common.kt\nkotlinx/coroutines/EventLoopImplBase\n*L\n266#1:541\n266#1:547,7\n266#1:542,4\n266#1:546\n277#1:554\n*E\n"
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# static fields
|
|
.field public static final synthetic i:Ljava/util/concurrent/atomic/AtomicReferenceFieldUpdater;
|
|
|
|
.field public static final synthetic j:Ljava/util/concurrent/atomic/AtomicReferenceFieldUpdater;
|
|
|
|
.field public static final synthetic k:Ljava/util/concurrent/atomic/AtomicIntegerFieldUpdater;
|
|
|
|
|
|
# instance fields
|
|
.field private volatile synthetic _delayed$volatile:Ljava/lang/Object;
|
|
|
|
.field private volatile synthetic _isCompleted$volatile:I
|
|
|
|
.field private volatile synthetic _queue$volatile:Ljava/lang/Object;
|
|
|
|
|
|
# direct methods
|
|
.method static constructor <clinit>()V
|
|
.locals 3
|
|
|
|
const-string v0, "_queue$volatile"
|
|
|
|
const-class v1, Lkotlinx/coroutines/EventLoopImplBase;
|
|
|
|
const-class v2, Ljava/lang/Object;
|
|
|
|
invoke-static {v1, v2, v0}, Ljava/util/concurrent/atomic/AtomicReferenceFieldUpdater;->newUpdater(Ljava/lang/Class;Ljava/lang/Class;Ljava/lang/String;)Ljava/util/concurrent/atomic/AtomicReferenceFieldUpdater;
|
|
|
|
move-result-object v0
|
|
|
|
sput-object v0, Lkotlinx/coroutines/EventLoopImplBase;->i:Ljava/util/concurrent/atomic/AtomicReferenceFieldUpdater;
|
|
|
|
const-string v0, "_delayed$volatile"
|
|
|
|
invoke-static {v1, v2, v0}, Ljava/util/concurrent/atomic/AtomicReferenceFieldUpdater;->newUpdater(Ljava/lang/Class;Ljava/lang/Class;Ljava/lang/String;)Ljava/util/concurrent/atomic/AtomicReferenceFieldUpdater;
|
|
|
|
move-result-object v0
|
|
|
|
sput-object v0, Lkotlinx/coroutines/EventLoopImplBase;->j:Ljava/util/concurrent/atomic/AtomicReferenceFieldUpdater;
|
|
|
|
const-string v0, "_isCompleted$volatile"
|
|
|
|
invoke-static {v1, v0}, Ljava/util/concurrent/atomic/AtomicIntegerFieldUpdater;->newUpdater(Ljava/lang/Class;Ljava/lang/String;)Ljava/util/concurrent/atomic/AtomicIntegerFieldUpdater;
|
|
|
|
move-result-object v0
|
|
|
|
sput-object v0, Lkotlinx/coroutines/EventLoopImplBase;->k:Ljava/util/concurrent/atomic/AtomicIntegerFieldUpdater;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>()V
|
|
.locals 1
|
|
|
|
.line 1
|
|
invoke-direct {p0}, Lkotlinx/coroutines/CoroutineDispatcher;-><init>()V
|
|
|
|
.line 2
|
|
.line 3
|
|
.line 4
|
|
const/4 v0, 0x0
|
|
|
|
.line 5
|
|
iput v0, p0, Lkotlinx/coroutines/EventLoopImplBase;->_isCompleted$volatile:I
|
|
|
|
.line 6
|
|
.line 7
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public final S(Lkotlin/coroutines/CoroutineContext;Ljava/lang/Runnable;)V
|
|
.locals 0
|
|
|
|
.line 1
|
|
invoke-virtual {p0, p2}, Lkotlinx/coroutines/EventLoopImplBase;->i0(Ljava/lang/Runnable;)V
|
|
|
|
.line 2
|
|
.line 3
|
|
.line 4
|
|
return-void
|
|
.end method
|
|
|
|
.method public final e(JLkotlinx/coroutines/CancellableContinuationImpl;)V
|
|
.locals 3
|
|
|
|
.line 1
|
|
invoke-static {p1, p2}, Lkotlinx/coroutines/EventLoop_commonKt;->a(J)J
|
|
|
|
.line 2
|
|
.line 3
|
|
.line 4
|
|
move-result-wide p1
|
|
|
|
.line 5
|
|
const-wide v0, 0x3fffffffffffffffL # 1.9999999999999998
|
|
|
|
.line 6
|
|
.line 7
|
|
.line 8
|
|
.line 9
|
|
.line 10
|
|
cmp-long v0, p1, v0
|
|
|
|
.line 11
|
|
.line 12
|
|
if-gez v0, :cond_0
|
|
|
|
.line 13
|
|
.line 14
|
|
invoke-static {}, Ljava/lang/System;->nanoTime()J
|
|
|
|
.line 15
|
|
.line 16
|
|
.line 17
|
|
move-result-wide v0
|
|
|
|
.line 18
|
|
new-instance v2, Lkotlinx/coroutines/EventLoopImplBase$DelayedResumeTask;
|
|
|
|
.line 19
|
|
.line 20
|
|
add-long/2addr p1, v0
|
|
|
|
.line 21
|
|
invoke-direct {v2, p0, p1, p2, p3}, Lkotlinx/coroutines/EventLoopImplBase$DelayedResumeTask;-><init>(Lkotlinx/coroutines/EventLoopImplBase;JLkotlinx/coroutines/CancellableContinuationImpl;)V
|
|
|
|
.line 22
|
|
.line 23
|
|
.line 24
|
|
invoke-virtual {p0, v0, v1, v2}, Lkotlinx/coroutines/EventLoopImplBase;->s0(JLkotlinx/coroutines/EventLoopImplBase$DelayedTask;)V
|
|
|
|
.line 25
|
|
.line 26
|
|
.line 27
|
|
invoke-static {p3, v2}, Lkotlinx/coroutines/CancellableContinuationKt;->a(Lkotlinx/coroutines/CancellableContinuationImpl;Lkotlinx/coroutines/DisposableHandle;)V
|
|
|
|
.line 28
|
|
.line 29
|
|
.line 30
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public i0(Ljava/lang/Runnable;)V
|
|
.locals 1
|
|
|
|
.line 1
|
|
invoke-virtual {p0, p1}, Lkotlinx/coroutines/EventLoopImplBase;->k0(Ljava/lang/Runnable;)Z
|
|
|
|
.line 2
|
|
.line 3
|
|
.line 4
|
|
move-result v0
|
|
|
|
.line 5
|
|
if-eqz v0, :cond_1
|
|
|
|
.line 6
|
|
.line 7
|
|
invoke-virtual {p0}, Lkotlinx/coroutines/EventLoopImplPlatform;->e0()Ljava/lang/Thread;
|
|
|
|
.line 8
|
|
.line 9
|
|
.line 10
|
|
move-result-object p1
|
|
|
|
.line 11
|
|
invoke-static {}, Ljava/lang/Thread;->currentThread()Ljava/lang/Thread;
|
|
|
|
.line 12
|
|
.line 13
|
|
.line 14
|
|
move-result-object v0
|
|
|
|
.line 15
|
|
if-eq v0, p1, :cond_0
|
|
|
|
.line 16
|
|
.line 17
|
|
invoke-static {p1}, Ljava/util/concurrent/locks/LockSupport;->unpark(Ljava/lang/Thread;)V
|
|
|
|
.line 18
|
|
.line 19
|
|
.line 20
|
|
:cond_0
|
|
return-void
|
|
|
|
.line 21
|
|
:cond_1
|
|
sget-object v0, Lkotlinx/coroutines/DefaultExecutor;->l:Lkotlinx/coroutines/DefaultExecutor;
|
|
|
|
.line 22
|
|
.line 23
|
|
invoke-virtual {v0, p1}, Lkotlinx/coroutines/DefaultExecutor;->i0(Ljava/lang/Runnable;)V
|
|
|
|
.line 24
|
|
.line 25
|
|
.line 26
|
|
return-void
|
|
.end method
|
|
|
|
.method public final k0(Ljava/lang/Runnable;)Z
|
|
.locals 6
|
|
|
|
.line 1
|
|
:goto_0
|
|
sget-object v0, Lkotlinx/coroutines/EventLoopImplBase;->i:Ljava/util/concurrent/atomic/AtomicReferenceFieldUpdater;
|
|
|
|
.line 2
|
|
.line 3
|
|
invoke-virtual {v0, p0}, Ljava/util/concurrent/atomic/AtomicReferenceFieldUpdater;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
.line 4
|
|
.line 5
|
|
.line 6
|
|
move-result-object v1
|
|
|
|
.line 7
|
|
sget-object v2, Lkotlinx/coroutines/EventLoopImplBase;->k:Ljava/util/concurrent/atomic/AtomicIntegerFieldUpdater;
|
|
|
|
.line 8
|
|
.line 9
|
|
invoke-virtual {v2, p0}, Ljava/util/concurrent/atomic/AtomicIntegerFieldUpdater;->get(Ljava/lang/Object;)I
|
|
|
|
.line 10
|
|
.line 11
|
|
.line 12
|
|
move-result v2
|
|
|
|
.line 13
|
|
const/4 v3, 0x0
|
|
|
|
.line 14
|
|
if-eqz v2, :cond_0
|
|
|
|
.line 15
|
|
.line 16
|
|
return v3
|
|
|
|
.line 17
|
|
:cond_0
|
|
const/4 v2, 0x1
|
|
|
|
.line 18
|
|
if-nez v1, :cond_3
|
|
|
|
.line 19
|
|
.line 20
|
|
:cond_1
|
|
const/4 v1, 0x0
|
|
|
|
.line 21
|
|
invoke-virtual {v0, p0, v1, p1}, Ljava/util/concurrent/atomic/AtomicReferenceFieldUpdater;->compareAndSet(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Z
|
|
|
|
.line 22
|
|
.line 23
|
|
.line 24
|
|
move-result v1
|
|
|
|
.line 25
|
|
if-eqz v1, :cond_2
|
|
|
|
.line 26
|
|
.line 27
|
|
goto :goto_1
|
|
|
|
.line 28
|
|
:cond_2
|
|
invoke-virtual {v0, p0}, Ljava/util/concurrent/atomic/AtomicReferenceFieldUpdater;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
.line 29
|
|
.line 30
|
|
.line 31
|
|
move-result-object v1
|
|
|
|
.line 32
|
|
if-eqz v1, :cond_1
|
|
|
|
.line 33
|
|
.line 34
|
|
goto :goto_0
|
|
|
|
.line 35
|
|
:cond_3
|
|
instance-of v4, v1, Lkotlinx/coroutines/internal/LockFreeTaskQueueCore;
|
|
|
|
.line 36
|
|
.line 37
|
|
if-eqz v4, :cond_7
|
|
|
|
.line 38
|
|
.line 39
|
|
const-string v4, "null cannot be cast to non-null type kotlinx.coroutines.internal.LockFreeTaskQueueCore<java.lang.Runnable{ kotlinx.coroutines.RunnableKt.Runnable }>{ kotlinx.coroutines.EventLoop_commonKt.Queue<java.lang.Runnable{ kotlinx.coroutines.RunnableKt.Runnable }> }"
|
|
|
|
.line 40
|
|
.line 41
|
|
invoke-static {v1, v4}, Lkotlin/jvm/internal/Intrinsics;->checkNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
.line 42
|
|
.line 43
|
|
.line 44
|
|
move-object v4, v1
|
|
|
|
.line 45
|
|
check-cast v4, Lkotlinx/coroutines/internal/LockFreeTaskQueueCore;
|
|
|
|
.line 46
|
|
.line 47
|
|
invoke-virtual {v4, p1}, Lkotlinx/coroutines/internal/LockFreeTaskQueueCore;->a(Ljava/lang/Object;)I
|
|
|
|
.line 48
|
|
.line 49
|
|
.line 50
|
|
move-result v5
|
|
|
|
.line 51
|
|
if-eqz v5, :cond_b
|
|
|
|
.line 52
|
|
.line 53
|
|
if-eq v5, v2, :cond_4
|
|
|
|
.line 54
|
|
.line 55
|
|
const/4 v0, 0x2
|
|
|
|
.line 56
|
|
if-eq v5, v0, :cond_8
|
|
|
|
.line 57
|
|
.line 58
|
|
goto :goto_0
|
|
|
|
.line 59
|
|
:cond_4
|
|
invoke-virtual {v4}, Lkotlinx/coroutines/internal/LockFreeTaskQueueCore;->c()Lkotlinx/coroutines/internal/LockFreeTaskQueueCore;
|
|
|
|
.line 60
|
|
.line 61
|
|
.line 62
|
|
move-result-object v3
|
|
|
|
.line 63
|
|
:cond_5
|
|
invoke-virtual {v0, p0, v1, v3}, Ljava/util/concurrent/atomic/AtomicReferenceFieldUpdater;->compareAndSet(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Z
|
|
|
|
.line 64
|
|
.line 65
|
|
.line 66
|
|
move-result v2
|
|
|
|
.line 67
|
|
if-eqz v2, :cond_6
|
|
|
|
.line 68
|
|
.line 69
|
|
goto :goto_0
|
|
|
|
.line 70
|
|
:cond_6
|
|
invoke-virtual {v0, p0}, Ljava/util/concurrent/atomic/AtomicReferenceFieldUpdater;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
.line 71
|
|
.line 72
|
|
.line 73
|
|
move-result-object v2
|
|
|
|
.line 74
|
|
if-eq v2, v1, :cond_5
|
|
|
|
.line 75
|
|
.line 76
|
|
goto :goto_0
|
|
|
|
.line 77
|
|
:cond_7
|
|
sget-object v4, Lkotlinx/coroutines/EventLoop_commonKt;->b:Lkotlinx/coroutines/internal/Symbol;
|
|
|
|
.line 78
|
|
.line 79
|
|
if-ne v1, v4, :cond_9
|
|
|
|
.line 80
|
|
.line 81
|
|
:cond_8
|
|
return v3
|
|
|
|
.line 82
|
|
:cond_9
|
|
new-instance v3, Lkotlinx/coroutines/internal/LockFreeTaskQueueCore;
|
|
|
|
.line 83
|
|
.line 84
|
|
const/16 v4, 0x8
|
|
|
|
.line 85
|
|
.line 86
|
|
invoke-direct {v3, v4, v2}, Lkotlinx/coroutines/internal/LockFreeTaskQueueCore;-><init>(IZ)V
|
|
|
|
.line 87
|
|
.line 88
|
|
.line 89
|
|
const-string v4, "null cannot be cast to non-null type java.lang.Runnable{ kotlinx.coroutines.RunnableKt.Runnable }"
|
|
|
|
.line 90
|
|
.line 91
|
|
invoke-static {v1, v4}, Lkotlin/jvm/internal/Intrinsics;->checkNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
.line 92
|
|
.line 93
|
|
.line 94
|
|
move-object v4, v1
|
|
|
|
.line 95
|
|
check-cast v4, Ljava/lang/Runnable;
|
|
|
|
.line 96
|
|
.line 97
|
|
invoke-virtual {v3, v4}, Lkotlinx/coroutines/internal/LockFreeTaskQueueCore;->a(Ljava/lang/Object;)I
|
|
|
|
.line 98
|
|
.line 99
|
|
.line 100
|
|
invoke-virtual {v3, p1}, Lkotlinx/coroutines/internal/LockFreeTaskQueueCore;->a(Ljava/lang/Object;)I
|
|
|
|
.line 101
|
|
.line 102
|
|
.line 103
|
|
:cond_a
|
|
invoke-virtual {v0, p0, v1, v3}, Ljava/util/concurrent/atomic/AtomicReferenceFieldUpdater;->compareAndSet(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Z
|
|
|
|
.line 104
|
|
.line 105
|
|
.line 106
|
|
move-result v4
|
|
|
|
.line 107
|
|
if-eqz v4, :cond_c
|
|
|
|
.line 108
|
|
.line 109
|
|
:cond_b
|
|
:goto_1
|
|
return v2
|
|
|
|
.line 110
|
|
:cond_c
|
|
invoke-virtual {v0, p0}, Ljava/util/concurrent/atomic/AtomicReferenceFieldUpdater;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
.line 111
|
|
.line 112
|
|
.line 113
|
|
move-result-object v4
|
|
|
|
.line 114
|
|
if-eq v4, v1, :cond_a
|
|
|
|
.line 115
|
|
.line 116
|
|
goto :goto_0
|
|
.end method
|
|
|
|
.method public final n0()Z
|
|
.locals 7
|
|
|
|
.line 1
|
|
iget-object v0, p0, Lkotlinx/coroutines/EventLoop;->h:Lkotlin/collections/ArrayDeque;
|
|
|
|
.line 2
|
|
.line 3
|
|
const/4 v1, 0x1
|
|
|
|
.line 4
|
|
if-eqz v0, :cond_0
|
|
|
|
.line 5
|
|
.line 6
|
|
invoke-virtual {v0}, Lkotlin/collections/ArrayDeque;->isEmpty()Z
|
|
|
|
.line 7
|
|
.line 8
|
|
.line 9
|
|
move-result v0
|
|
|
|
.line 10
|
|
goto :goto_0
|
|
|
|
.line 11
|
|
:cond_0
|
|
move v0, v1
|
|
|
|
.line 12
|
|
:goto_0
|
|
const/4 v2, 0x0
|
|
|
|
.line 13
|
|
if-nez v0, :cond_1
|
|
|
|
.line 14
|
|
.line 15
|
|
goto :goto_3
|
|
|
|
.line 16
|
|
:cond_1
|
|
sget-object v0, Lkotlinx/coroutines/EventLoopImplBase;->j:Ljava/util/concurrent/atomic/AtomicReferenceFieldUpdater;
|
|
|
|
.line 17
|
|
.line 18
|
|
invoke-virtual {v0, p0}, Ljava/util/concurrent/atomic/AtomicReferenceFieldUpdater;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
.line 19
|
|
.line 20
|
|
.line 21
|
|
move-result-object v0
|
|
|
|
.line 22
|
|
check-cast v0, Lkotlinx/coroutines/EventLoopImplBase$DelayedTaskQueue;
|
|
|
|
.line 23
|
|
.line 24
|
|
if-eqz v0, :cond_3
|
|
|
|
.line 25
|
|
.line 26
|
|
sget-object v3, Lkotlinx/coroutines/internal/ThreadSafeHeap;->b:Ljava/util/concurrent/atomic/AtomicIntegerFieldUpdater;
|
|
|
|
.line 27
|
|
.line 28
|
|
invoke-virtual {v3, v0}, Ljava/util/concurrent/atomic/AtomicIntegerFieldUpdater;->get(Ljava/lang/Object;)I
|
|
|
|
.line 29
|
|
.line 30
|
|
.line 31
|
|
move-result v0
|
|
|
|
.line 32
|
|
if-nez v0, :cond_2
|
|
|
|
.line 33
|
|
.line 34
|
|
move v0, v1
|
|
|
|
.line 35
|
|
goto :goto_1
|
|
|
|
.line 36
|
|
:cond_2
|
|
move v0, v2
|
|
|
|
.line 37
|
|
:goto_1
|
|
if-nez v0, :cond_3
|
|
|
|
.line 38
|
|
.line 39
|
|
goto :goto_3
|
|
|
|
.line 40
|
|
:cond_3
|
|
sget-object v0, Lkotlinx/coroutines/EventLoopImplBase;->i:Ljava/util/concurrent/atomic/AtomicReferenceFieldUpdater;
|
|
|
|
.line 41
|
|
.line 42
|
|
invoke-virtual {v0, p0}, Ljava/util/concurrent/atomic/AtomicReferenceFieldUpdater;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
.line 43
|
|
.line 44
|
|
.line 45
|
|
move-result-object v0
|
|
|
|
.line 46
|
|
if-nez v0, :cond_4
|
|
|
|
.line 47
|
|
.line 48
|
|
goto :goto_2
|
|
|
|
.line 49
|
|
:cond_4
|
|
instance-of v3, v0, Lkotlinx/coroutines/internal/LockFreeTaskQueueCore;
|
|
|
|
.line 50
|
|
.line 51
|
|
if-eqz v3, :cond_6
|
|
|
|
.line 52
|
|
.line 53
|
|
check-cast v0, Lkotlinx/coroutines/internal/LockFreeTaskQueueCore;
|
|
|
|
.line 54
|
|
.line 55
|
|
sget-object v3, Lkotlinx/coroutines/internal/LockFreeTaskQueueCore;->f:Ljava/util/concurrent/atomic/AtomicLongFieldUpdater;
|
|
|
|
.line 56
|
|
.line 57
|
|
invoke-virtual {v3, v0}, Ljava/util/concurrent/atomic/AtomicLongFieldUpdater;->get(Ljava/lang/Object;)J
|
|
|
|
.line 58
|
|
.line 59
|
|
.line 60
|
|
move-result-wide v3
|
|
|
|
.line 61
|
|
const-wide/32 v5, 0x3fffffff
|
|
|
|
.line 62
|
|
.line 63
|
|
.line 64
|
|
and-long/2addr v5, v3
|
|
|
|
.line 65
|
|
long-to-int v0, v5
|
|
|
|
.line 66
|
|
const-wide v5, 0xfffffffc0000000L
|
|
|
|
.line 67
|
|
.line 68
|
|
.line 69
|
|
.line 70
|
|
.line 71
|
|
and-long/2addr v3, v5
|
|
|
|
.line 72
|
|
const/16 v5, 0x1e
|
|
|
|
.line 73
|
|
.line 74
|
|
shr-long/2addr v3, v5
|
|
|
|
.line 75
|
|
long-to-int v3, v3
|
|
|
|
.line 76
|
|
if-ne v0, v3, :cond_5
|
|
|
|
.line 77
|
|
.line 78
|
|
return v1
|
|
|
|
.line 79
|
|
:cond_5
|
|
return v2
|
|
|
|
.line 80
|
|
:cond_6
|
|
sget-object v3, Lkotlinx/coroutines/EventLoop_commonKt;->b:Lkotlinx/coroutines/internal/Symbol;
|
|
|
|
.line 81
|
|
.line 82
|
|
if-ne v0, v3, :cond_7
|
|
|
|
.line 83
|
|
.line 84
|
|
:goto_2
|
|
return v1
|
|
|
|
.line 85
|
|
:cond_7
|
|
:goto_3
|
|
return v2
|
|
.end method
|
|
|
|
.method public o(JLjava/lang/Runnable;Lkotlin/coroutines/CoroutineContext;)Lkotlinx/coroutines/DisposableHandle;
|
|
.locals 1
|
|
|
|
.line 1
|
|
sget-object v0, Lkotlinx/coroutines/DefaultExecutorKt;->a:Lkotlinx/coroutines/Delay;
|
|
|
|
.line 2
|
|
.line 3
|
|
invoke-interface {v0, p1, p2, p3, p4}, Lkotlinx/coroutines/Delay;->o(JLjava/lang/Runnable;Lkotlin/coroutines/CoroutineContext;)Lkotlinx/coroutines/DisposableHandle;
|
|
|
|
.line 4
|
|
.line 5
|
|
.line 6
|
|
move-result-object p1
|
|
|
|
.line 7
|
|
return-object p1
|
|
.end method
|
|
|
|
.method public final q0()J
|
|
.locals 10
|
|
|
|
.line 1
|
|
invoke-virtual {p0}, Lkotlinx/coroutines/EventLoop;->b0()Z
|
|
|
|
.line 2
|
|
.line 3
|
|
.line 4
|
|
move-result v0
|
|
|
|
.line 5
|
|
const-wide/16 v1, 0x0
|
|
|
|
.line 6
|
|
.line 7
|
|
if-eqz v0, :cond_0
|
|
|
|
.line 8
|
|
.line 9
|
|
goto/16 :goto_a
|
|
|
|
.line 10
|
|
.line 11
|
|
:cond_0
|
|
sget-object v0, Lkotlinx/coroutines/EventLoopImplBase;->j:Ljava/util/concurrent/atomic/AtomicReferenceFieldUpdater;
|
|
|
|
.line 12
|
|
.line 13
|
|
invoke-virtual {v0, p0}, Ljava/util/concurrent/atomic/AtomicReferenceFieldUpdater;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
.line 14
|
|
.line 15
|
|
.line 16
|
|
move-result-object v0
|
|
|
|
.line 17
|
|
check-cast v0, Lkotlinx/coroutines/EventLoopImplBase$DelayedTaskQueue;
|
|
|
|
.line 18
|
|
.line 19
|
|
const/4 v3, 0x0
|
|
|
|
.line 20
|
|
const/4 v4, 0x0
|
|
|
|
.line 21
|
|
if-eqz v0, :cond_7
|
|
|
|
.line 22
|
|
.line 23
|
|
sget-object v5, Lkotlinx/coroutines/internal/ThreadSafeHeap;->b:Ljava/util/concurrent/atomic/AtomicIntegerFieldUpdater;
|
|
|
|
.line 24
|
|
.line 25
|
|
invoke-virtual {v5, v0}, Ljava/util/concurrent/atomic/AtomicIntegerFieldUpdater;->get(Ljava/lang/Object;)I
|
|
|
|
.line 26
|
|
.line 27
|
|
.line 28
|
|
move-result v5
|
|
|
|
.line 29
|
|
if-nez v5, :cond_1
|
|
|
|
.line 30
|
|
.line 31
|
|
goto :goto_5
|
|
|
|
.line 32
|
|
:cond_1
|
|
invoke-static {}, Ljava/lang/System;->nanoTime()J
|
|
|
|
.line 33
|
|
.line 34
|
|
.line 35
|
|
move-result-wide v5
|
|
|
|
.line 36
|
|
:cond_2
|
|
monitor-enter v0
|
|
|
|
.line 37
|
|
:try_start_0
|
|
iget-object v7, v0, Lkotlinx/coroutines/internal/ThreadSafeHeap;->a:[Lkotlinx/coroutines/internal/ThreadSafeHeapNode;
|
|
|
|
.line 38
|
|
.line 39
|
|
if-eqz v7, :cond_3
|
|
|
|
.line 40
|
|
.line 41
|
|
aget-object v7, v7, v3
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
.line 42
|
|
.line 43
|
|
goto :goto_0
|
|
|
|
.line 44
|
|
:cond_3
|
|
move-object v7, v4
|
|
|
|
.line 45
|
|
:goto_0
|
|
if-nez v7, :cond_4
|
|
|
|
.line 46
|
|
.line 47
|
|
monitor-exit v0
|
|
|
|
.line 48
|
|
move-object v7, v4
|
|
|
|
.line 49
|
|
goto :goto_3
|
|
|
|
.line 50
|
|
:cond_4
|
|
:try_start_1
|
|
check-cast v7, Lkotlinx/coroutines/EventLoopImplBase$DelayedTask;
|
|
|
|
.line 51
|
|
.line 52
|
|
iget-wide v8, v7, Lkotlinx/coroutines/EventLoopImplBase$DelayedTask;->c:J
|
|
|
|
.line 53
|
|
.line 54
|
|
sub-long v8, v5, v8
|
|
|
|
.line 55
|
|
.line 56
|
|
cmp-long v8, v8, v1
|
|
|
|
.line 57
|
|
.line 58
|
|
if-ltz v8, :cond_5
|
|
|
|
.line 59
|
|
.line 60
|
|
invoke-virtual {p0, v7}, Lkotlinx/coroutines/EventLoopImplBase;->k0(Ljava/lang/Runnable;)Z
|
|
|
|
.line 61
|
|
.line 62
|
|
.line 63
|
|
move-result v7
|
|
|
|
.line 64
|
|
goto :goto_1
|
|
|
|
.line 65
|
|
:catchall_0
|
|
move-exception v1
|
|
|
|
.line 66
|
|
goto :goto_4
|
|
|
|
.line 67
|
|
:cond_5
|
|
move v7, v3
|
|
|
|
.line 68
|
|
:goto_1
|
|
if-eqz v7, :cond_6
|
|
|
|
.line 69
|
|
.line 70
|
|
invoke-virtual {v0, v3}, Lkotlinx/coroutines/internal/ThreadSafeHeap;->d(I)Lkotlinx/coroutines/internal/ThreadSafeHeapNode;
|
|
|
|
.line 71
|
|
.line 72
|
|
.line 73
|
|
move-result-object v7
|
|
:try_end_1
|
|
.catchall {:try_start_1 .. :try_end_1} :catchall_0
|
|
|
|
.line 74
|
|
goto :goto_2
|
|
|
|
.line 75
|
|
:cond_6
|
|
move-object v7, v4
|
|
|
|
.line 76
|
|
:goto_2
|
|
monitor-exit v0
|
|
|
|
.line 77
|
|
:goto_3
|
|
check-cast v7, Lkotlinx/coroutines/EventLoopImplBase$DelayedTask;
|
|
|
|
.line 78
|
|
.line 79
|
|
if-nez v7, :cond_2
|
|
|
|
.line 80
|
|
.line 81
|
|
goto :goto_5
|
|
|
|
.line 82
|
|
:goto_4
|
|
monitor-exit v0
|
|
|
|
.line 83
|
|
throw v1
|
|
|
|
.line 84
|
|
:cond_7
|
|
:goto_5
|
|
sget-object v0, Lkotlinx/coroutines/EventLoopImplBase;->i:Ljava/util/concurrent/atomic/AtomicReferenceFieldUpdater;
|
|
|
|
.line 85
|
|
.line 86
|
|
:goto_6
|
|
invoke-virtual {v0, p0}, Ljava/util/concurrent/atomic/AtomicReferenceFieldUpdater;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
.line 87
|
|
.line 88
|
|
.line 89
|
|
move-result-object v5
|
|
|
|
.line 90
|
|
if-nez v5, :cond_8
|
|
|
|
.line 91
|
|
.line 92
|
|
goto :goto_7
|
|
|
|
.line 93
|
|
:cond_8
|
|
instance-of v6, v5, Lkotlinx/coroutines/internal/LockFreeTaskQueueCore;
|
|
|
|
.line 94
|
|
.line 95
|
|
if-eqz v6, :cond_c
|
|
|
|
.line 96
|
|
.line 97
|
|
const-string v6, "null cannot be cast to non-null type kotlinx.coroutines.internal.LockFreeTaskQueueCore<java.lang.Runnable{ kotlinx.coroutines.RunnableKt.Runnable }>{ kotlinx.coroutines.EventLoop_commonKt.Queue<java.lang.Runnable{ kotlinx.coroutines.RunnableKt.Runnable }> }"
|
|
|
|
.line 98
|
|
.line 99
|
|
invoke-static {v5, v6}, Lkotlin/jvm/internal/Intrinsics;->checkNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
.line 100
|
|
.line 101
|
|
.line 102
|
|
move-object v6, v5
|
|
|
|
.line 103
|
|
check-cast v6, Lkotlinx/coroutines/internal/LockFreeTaskQueueCore;
|
|
|
|
.line 104
|
|
.line 105
|
|
invoke-virtual {v6}, Lkotlinx/coroutines/internal/LockFreeTaskQueueCore;->d()Ljava/lang/Object;
|
|
|
|
.line 106
|
|
.line 107
|
|
.line 108
|
|
move-result-object v7
|
|
|
|
.line 109
|
|
sget-object v8, Lkotlinx/coroutines/internal/LockFreeTaskQueueCore;->g:Lkotlinx/coroutines/internal/Symbol;
|
|
|
|
.line 110
|
|
.line 111
|
|
if-eq v7, v8, :cond_9
|
|
|
|
.line 112
|
|
.line 113
|
|
move-object v4, v7
|
|
|
|
.line 114
|
|
check-cast v4, Ljava/lang/Runnable;
|
|
|
|
.line 115
|
|
.line 116
|
|
goto :goto_7
|
|
|
|
.line 117
|
|
:cond_9
|
|
invoke-virtual {v6}, Lkotlinx/coroutines/internal/LockFreeTaskQueueCore;->c()Lkotlinx/coroutines/internal/LockFreeTaskQueueCore;
|
|
|
|
.line 118
|
|
.line 119
|
|
.line 120
|
|
move-result-object v6
|
|
|
|
.line 121
|
|
:cond_a
|
|
invoke-virtual {v0, p0, v5, v6}, Ljava/util/concurrent/atomic/AtomicReferenceFieldUpdater;->compareAndSet(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Z
|
|
|
|
.line 122
|
|
.line 123
|
|
.line 124
|
|
move-result v7
|
|
|
|
.line 125
|
|
if-eqz v7, :cond_b
|
|
|
|
.line 126
|
|
.line 127
|
|
goto :goto_6
|
|
|
|
.line 128
|
|
:cond_b
|
|
invoke-virtual {v0, p0}, Ljava/util/concurrent/atomic/AtomicReferenceFieldUpdater;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
.line 129
|
|
.line 130
|
|
.line 131
|
|
move-result-object v7
|
|
|
|
.line 132
|
|
if-eq v7, v5, :cond_a
|
|
|
|
.line 133
|
|
.line 134
|
|
goto :goto_6
|
|
|
|
.line 135
|
|
:cond_c
|
|
sget-object v6, Lkotlinx/coroutines/EventLoop_commonKt;->b:Lkotlinx/coroutines/internal/Symbol;
|
|
|
|
.line 136
|
|
.line 137
|
|
if-ne v5, v6, :cond_d
|
|
|
|
.line 138
|
|
.line 139
|
|
goto :goto_7
|
|
|
|
.line 140
|
|
:cond_d
|
|
invoke-virtual {v0, p0, v5, v4}, Ljava/util/concurrent/atomic/AtomicReferenceFieldUpdater;->compareAndSet(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Z
|
|
|
|
.line 141
|
|
.line 142
|
|
.line 143
|
|
move-result v6
|
|
|
|
.line 144
|
|
if-eqz v6, :cond_18
|
|
|
|
.line 145
|
|
.line 146
|
|
const-string v0, "null cannot be cast to non-null type java.lang.Runnable{ kotlinx.coroutines.RunnableKt.Runnable }"
|
|
|
|
.line 147
|
|
.line 148
|
|
invoke-static {v5, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
.line 149
|
|
.line 150
|
|
.line 151
|
|
move-object v4, v5
|
|
|
|
.line 152
|
|
check-cast v4, Ljava/lang/Runnable;
|
|
|
|
.line 153
|
|
.line 154
|
|
:goto_7
|
|
if-eqz v4, :cond_e
|
|
|
|
.line 155
|
|
.line 156
|
|
invoke-interface {v4}, Ljava/lang/Runnable;->run()V
|
|
|
|
.line 157
|
|
.line 158
|
|
.line 159
|
|
return-wide v1
|
|
|
|
.line 160
|
|
:cond_e
|
|
iget-object v0, p0, Lkotlinx/coroutines/EventLoop;->h:Lkotlin/collections/ArrayDeque;
|
|
|
|
.line 161
|
|
.line 162
|
|
const-wide v4, 0x7fffffffffffffffL
|
|
|
|
.line 163
|
|
.line 164
|
|
.line 165
|
|
.line 166
|
|
.line 167
|
|
if-nez v0, :cond_f
|
|
|
|
.line 168
|
|
.line 169
|
|
:goto_8
|
|
move-wide v6, v4
|
|
|
|
.line 170
|
|
goto :goto_9
|
|
|
|
.line 171
|
|
:cond_f
|
|
invoke-virtual {v0}, Lkotlin/collections/ArrayDeque;->isEmpty()Z
|
|
|
|
.line 172
|
|
.line 173
|
|
.line 174
|
|
move-result v0
|
|
|
|
.line 175
|
|
if-eqz v0, :cond_10
|
|
|
|
.line 176
|
|
.line 177
|
|
goto :goto_8
|
|
|
|
.line 178
|
|
:cond_10
|
|
move-wide v6, v1
|
|
|
|
.line 179
|
|
:goto_9
|
|
cmp-long v0, v6, v1
|
|
|
|
.line 180
|
|
.line 181
|
|
if-nez v0, :cond_11
|
|
|
|
.line 182
|
|
.line 183
|
|
goto :goto_a
|
|
|
|
.line 184
|
|
:cond_11
|
|
sget-object v0, Lkotlinx/coroutines/EventLoopImplBase;->i:Ljava/util/concurrent/atomic/AtomicReferenceFieldUpdater;
|
|
|
|
.line 185
|
|
.line 186
|
|
invoke-virtual {v0, p0}, Ljava/util/concurrent/atomic/AtomicReferenceFieldUpdater;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
.line 187
|
|
.line 188
|
|
.line 189
|
|
move-result-object v0
|
|
|
|
.line 190
|
|
if-eqz v0, :cond_15
|
|
|
|
.line 191
|
|
.line 192
|
|
instance-of v6, v0, Lkotlinx/coroutines/internal/LockFreeTaskQueueCore;
|
|
|
|
.line 193
|
|
.line 194
|
|
if-eqz v6, :cond_13
|
|
|
|
.line 195
|
|
.line 196
|
|
check-cast v0, Lkotlinx/coroutines/internal/LockFreeTaskQueueCore;
|
|
|
|
.line 197
|
|
.line 198
|
|
sget-object v6, Lkotlinx/coroutines/internal/LockFreeTaskQueueCore;->f:Ljava/util/concurrent/atomic/AtomicLongFieldUpdater;
|
|
|
|
.line 199
|
|
.line 200
|
|
invoke-virtual {v6, v0}, Ljava/util/concurrent/atomic/AtomicLongFieldUpdater;->get(Ljava/lang/Object;)J
|
|
|
|
.line 201
|
|
.line 202
|
|
.line 203
|
|
move-result-wide v6
|
|
|
|
.line 204
|
|
const-wide/32 v8, 0x3fffffff
|
|
|
|
.line 205
|
|
.line 206
|
|
.line 207
|
|
and-long/2addr v8, v6
|
|
|
|
.line 208
|
|
long-to-int v0, v8
|
|
|
|
.line 209
|
|
const-wide v8, 0xfffffffc0000000L
|
|
|
|
.line 210
|
|
.line 211
|
|
.line 212
|
|
.line 213
|
|
.line 214
|
|
and-long/2addr v6, v8
|
|
|
|
.line 215
|
|
const/16 v8, 0x1e
|
|
|
|
.line 216
|
|
.line 217
|
|
shr-long/2addr v6, v8
|
|
|
|
.line 218
|
|
long-to-int v6, v6
|
|
|
|
.line 219
|
|
if-ne v0, v6, :cond_12
|
|
|
|
.line 220
|
|
.line 221
|
|
const/4 v3, 0x1
|
|
|
|
.line 222
|
|
:cond_12
|
|
if-nez v3, :cond_15
|
|
|
|
.line 223
|
|
.line 224
|
|
goto :goto_a
|
|
|
|
.line 225
|
|
:cond_13
|
|
sget-object v3, Lkotlinx/coroutines/EventLoop_commonKt;->b:Lkotlinx/coroutines/internal/Symbol;
|
|
|
|
.line 226
|
|
.line 227
|
|
if-ne v0, v3, :cond_14
|
|
|
|
.line 228
|
|
.line 229
|
|
goto :goto_b
|
|
|
|
.line 230
|
|
:cond_14
|
|
:goto_a
|
|
return-wide v1
|
|
|
|
.line 231
|
|
:cond_15
|
|
sget-object v0, Lkotlinx/coroutines/EventLoopImplBase;->j:Ljava/util/concurrent/atomic/AtomicReferenceFieldUpdater;
|
|
|
|
.line 232
|
|
.line 233
|
|
invoke-virtual {v0, p0}, Ljava/util/concurrent/atomic/AtomicReferenceFieldUpdater;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
.line 234
|
|
.line 235
|
|
.line 236
|
|
move-result-object v0
|
|
|
|
.line 237
|
|
check-cast v0, Lkotlinx/coroutines/EventLoopImplBase$DelayedTaskQueue;
|
|
|
|
.line 238
|
|
.line 239
|
|
if-eqz v0, :cond_17
|
|
|
|
.line 240
|
|
.line 241
|
|
invoke-virtual {v0}, Lkotlinx/coroutines/internal/ThreadSafeHeap;->b()Lkotlinx/coroutines/internal/ThreadSafeHeapNode;
|
|
|
|
.line 242
|
|
.line 243
|
|
.line 244
|
|
move-result-object v0
|
|
|
|
.line 245
|
|
check-cast v0, Lkotlinx/coroutines/EventLoopImplBase$DelayedTask;
|
|
|
|
.line 246
|
|
.line 247
|
|
if-nez v0, :cond_16
|
|
|
|
.line 248
|
|
.line 249
|
|
goto :goto_b
|
|
|
|
.line 250
|
|
:cond_16
|
|
iget-wide v0, v0, Lkotlinx/coroutines/EventLoopImplBase$DelayedTask;->c:J
|
|
|
|
.line 251
|
|
.line 252
|
|
invoke-static {}, Ljava/lang/System;->nanoTime()J
|
|
|
|
.line 253
|
|
.line 254
|
|
.line 255
|
|
move-result-wide v2
|
|
|
|
.line 256
|
|
sub-long/2addr v0, v2
|
|
|
|
.line 257
|
|
invoke-static {v0, v1}, Lkotlin/ranges/RangesKt;->a(J)J
|
|
|
|
.line 258
|
|
.line 259
|
|
.line 260
|
|
move-result-wide v0
|
|
|
|
.line 261
|
|
return-wide v0
|
|
|
|
.line 262
|
|
:cond_17
|
|
:goto_b
|
|
return-wide v4
|
|
|
|
.line 263
|
|
:cond_18
|
|
invoke-virtual {v0, p0}, Ljava/util/concurrent/atomic/AtomicReferenceFieldUpdater;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
.line 264
|
|
.line 265
|
|
.line 266
|
|
move-result-object v6
|
|
|
|
.line 267
|
|
if-eq v6, v5, :cond_d
|
|
|
|
.line 268
|
|
.line 269
|
|
goto/16 :goto_6
|
|
.end method
|
|
|
|
.method public final s0(JLkotlinx/coroutines/EventLoopImplBase$DelayedTask;)V
|
|
.locals 5
|
|
|
|
.line 1
|
|
sget-object v0, Lkotlinx/coroutines/EventLoopImplBase;->k:Ljava/util/concurrent/atomic/AtomicIntegerFieldUpdater;
|
|
|
|
.line 2
|
|
.line 3
|
|
invoke-virtual {v0, p0}, Ljava/util/concurrent/atomic/AtomicIntegerFieldUpdater;->get(Ljava/lang/Object;)I
|
|
|
|
.line 4
|
|
.line 5
|
|
.line 6
|
|
move-result v0
|
|
|
|
.line 7
|
|
const/4 v1, 0x0
|
|
|
|
.line 8
|
|
const/4 v2, 0x1
|
|
|
|
.line 9
|
|
sget-object v3, Lkotlinx/coroutines/EventLoopImplBase;->j:Ljava/util/concurrent/atomic/AtomicReferenceFieldUpdater;
|
|
|
|
.line 10
|
|
.line 11
|
|
if-eqz v0, :cond_0
|
|
|
|
.line 12
|
|
.line 13
|
|
move v0, v2
|
|
|
|
.line 14
|
|
goto :goto_1
|
|
|
|
.line 15
|
|
:cond_0
|
|
invoke-virtual {v3, p0}, Ljava/util/concurrent/atomic/AtomicReferenceFieldUpdater;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
.line 16
|
|
.line 17
|
|
.line 18
|
|
move-result-object v0
|
|
|
|
.line 19
|
|
check-cast v0, Lkotlinx/coroutines/EventLoopImplBase$DelayedTaskQueue;
|
|
|
|
.line 20
|
|
.line 21
|
|
if-nez v0, :cond_3
|
|
|
|
.line 22
|
|
.line 23
|
|
new-instance v4, Lkotlinx/coroutines/EventLoopImplBase$DelayedTaskQueue;
|
|
|
|
.line 24
|
|
.line 25
|
|
invoke-direct {v4}, Ljava/lang/Object;-><init>()V
|
|
|
|
.line 26
|
|
.line 27
|
|
.line 28
|
|
iput-wide p1, v4, Lkotlinx/coroutines/EventLoopImplBase$DelayedTaskQueue;->c:J
|
|
|
|
.line 29
|
|
.line 30
|
|
:cond_1
|
|
invoke-virtual {v3, p0, v1, v4}, Ljava/util/concurrent/atomic/AtomicReferenceFieldUpdater;->compareAndSet(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Z
|
|
|
|
.line 31
|
|
.line 32
|
|
.line 33
|
|
move-result v0
|
|
|
|
.line 34
|
|
if-eqz v0, :cond_2
|
|
|
|
.line 35
|
|
.line 36
|
|
goto :goto_0
|
|
|
|
.line 37
|
|
:cond_2
|
|
invoke-virtual {v3, p0}, Ljava/util/concurrent/atomic/AtomicReferenceFieldUpdater;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
.line 38
|
|
.line 39
|
|
.line 40
|
|
move-result-object v0
|
|
|
|
.line 41
|
|
if-eqz v0, :cond_1
|
|
|
|
.line 42
|
|
.line 43
|
|
:goto_0
|
|
invoke-virtual {v3, p0}, Ljava/util/concurrent/atomic/AtomicReferenceFieldUpdater;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
.line 44
|
|
.line 45
|
|
.line 46
|
|
move-result-object v0
|
|
|
|
.line 47
|
|
invoke-static {v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNull(Ljava/lang/Object;)V
|
|
|
|
.line 48
|
|
.line 49
|
|
.line 50
|
|
check-cast v0, Lkotlinx/coroutines/EventLoopImplBase$DelayedTaskQueue;
|
|
|
|
.line 51
|
|
.line 52
|
|
:cond_3
|
|
invoke-virtual {p3, p1, p2, v0, p0}, Lkotlinx/coroutines/EventLoopImplBase$DelayedTask;->e(JLkotlinx/coroutines/EventLoopImplBase$DelayedTaskQueue;Lkotlinx/coroutines/EventLoopImplBase;)I
|
|
|
|
.line 53
|
|
.line 54
|
|
.line 55
|
|
move-result v0
|
|
|
|
.line 56
|
|
:goto_1
|
|
if-eqz v0, :cond_6
|
|
|
|
.line 57
|
|
.line 58
|
|
if-eq v0, v2, :cond_5
|
|
|
|
.line 59
|
|
.line 60
|
|
const/4 p1, 0x2
|
|
|
|
.line 61
|
|
if-ne v0, p1, :cond_4
|
|
|
|
.line 62
|
|
.line 63
|
|
goto :goto_2
|
|
|
|
.line 64
|
|
:cond_4
|
|
new-instance p1, Ljava/lang/IllegalStateException;
|
|
|
|
.line 65
|
|
.line 66
|
|
const-string p2, "unexpected result"
|
|
|
|
.line 67
|
|
.line 68
|
|
invoke-direct {p1, p2}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
|
|
|
|
.line 69
|
|
.line 70
|
|
.line 71
|
|
throw p1
|
|
|
|
.line 72
|
|
:cond_5
|
|
invoke-virtual {p0, p1, p2, p3}, Lkotlinx/coroutines/EventLoopImplPlatform;->h0(JLkotlinx/coroutines/EventLoopImplBase$DelayedTask;)V
|
|
|
|
.line 73
|
|
.line 74
|
|
.line 75
|
|
return-void
|
|
|
|
.line 76
|
|
:cond_6
|
|
invoke-virtual {v3, p0}, Ljava/util/concurrent/atomic/AtomicReferenceFieldUpdater;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
.line 77
|
|
.line 78
|
|
.line 79
|
|
move-result-object p1
|
|
|
|
.line 80
|
|
check-cast p1, Lkotlinx/coroutines/EventLoopImplBase$DelayedTaskQueue;
|
|
|
|
.line 81
|
|
.line 82
|
|
if-eqz p1, :cond_7
|
|
|
|
.line 83
|
|
.line 84
|
|
invoke-virtual {p1}, Lkotlinx/coroutines/internal/ThreadSafeHeap;->b()Lkotlinx/coroutines/internal/ThreadSafeHeapNode;
|
|
|
|
.line 85
|
|
.line 86
|
|
.line 87
|
|
move-result-object p1
|
|
|
|
.line 88
|
|
move-object v1, p1
|
|
|
|
.line 89
|
|
check-cast v1, Lkotlinx/coroutines/EventLoopImplBase$DelayedTask;
|
|
|
|
.line 90
|
|
.line 91
|
|
:cond_7
|
|
if-ne v1, p3, :cond_8
|
|
|
|
.line 92
|
|
.line 93
|
|
invoke-virtual {p0}, Lkotlinx/coroutines/EventLoopImplPlatform;->e0()Ljava/lang/Thread;
|
|
|
|
.line 94
|
|
.line 95
|
|
.line 96
|
|
move-result-object p1
|
|
|
|
.line 97
|
|
invoke-static {}, Ljava/lang/Thread;->currentThread()Ljava/lang/Thread;
|
|
|
|
.line 98
|
|
.line 99
|
|
.line 100
|
|
move-result-object p2
|
|
|
|
.line 101
|
|
if-eq p2, p1, :cond_8
|
|
|
|
.line 102
|
|
.line 103
|
|
invoke-static {p1}, Ljava/util/concurrent/locks/LockSupport;->unpark(Ljava/lang/Thread;)V
|
|
|
|
.line 104
|
|
.line 105
|
|
.line 106
|
|
:cond_8
|
|
:goto_2
|
|
return-void
|
|
.end method
|
|
|
|
.method public shutdown()V
|
|
.locals 7
|
|
|
|
.line 1
|
|
sget-object v0, Lkotlinx/coroutines/ThreadLocalEventLoop;->a:Ljava/lang/ThreadLocal;
|
|
|
|
.line 2
|
|
.line 3
|
|
const/4 v1, 0x0
|
|
|
|
.line 4
|
|
invoke-virtual {v0, v1}, Ljava/lang/ThreadLocal;->set(Ljava/lang/Object;)V
|
|
|
|
.line 5
|
|
.line 6
|
|
.line 7
|
|
sget-object v0, Lkotlinx/coroutines/EventLoopImplBase;->k:Ljava/util/concurrent/atomic/AtomicIntegerFieldUpdater;
|
|
|
|
.line 8
|
|
.line 9
|
|
const/4 v2, 0x1
|
|
|
|
.line 10
|
|
invoke-virtual {v0, p0, v2}, Ljava/util/concurrent/atomic/AtomicIntegerFieldUpdater;->set(Ljava/lang/Object;I)V
|
|
|
|
.line 11
|
|
.line 12
|
|
.line 13
|
|
sget-object v0, Lkotlinx/coroutines/EventLoop_commonKt;->b:Lkotlinx/coroutines/internal/Symbol;
|
|
|
|
.line 14
|
|
.line 15
|
|
sget-object v3, Lkotlinx/coroutines/EventLoopImplBase;->i:Ljava/util/concurrent/atomic/AtomicReferenceFieldUpdater;
|
|
|
|
.line 16
|
|
.line 17
|
|
:goto_0
|
|
invoke-virtual {v3, p0}, Ljava/util/concurrent/atomic/AtomicReferenceFieldUpdater;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
.line 18
|
|
.line 19
|
|
.line 20
|
|
move-result-object v4
|
|
|
|
.line 21
|
|
if-nez v4, :cond_2
|
|
|
|
.line 22
|
|
.line 23
|
|
:cond_0
|
|
invoke-virtual {v3, p0, v1, v0}, Ljava/util/concurrent/atomic/AtomicReferenceFieldUpdater;->compareAndSet(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Z
|
|
|
|
.line 24
|
|
.line 25
|
|
.line 26
|
|
move-result v4
|
|
|
|
.line 27
|
|
if-eqz v4, :cond_1
|
|
|
|
.line 28
|
|
.line 29
|
|
goto :goto_1
|
|
|
|
.line 30
|
|
:cond_1
|
|
invoke-virtual {v3, p0}, Ljava/util/concurrent/atomic/AtomicReferenceFieldUpdater;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
.line 31
|
|
.line 32
|
|
.line 33
|
|
move-result-object v4
|
|
|
|
.line 34
|
|
if-eqz v4, :cond_0
|
|
|
|
.line 35
|
|
.line 36
|
|
goto :goto_0
|
|
|
|
.line 37
|
|
:cond_2
|
|
instance-of v5, v4, Lkotlinx/coroutines/internal/LockFreeTaskQueueCore;
|
|
|
|
.line 38
|
|
.line 39
|
|
if-eqz v5, :cond_3
|
|
|
|
.line 40
|
|
.line 41
|
|
check-cast v4, Lkotlinx/coroutines/internal/LockFreeTaskQueueCore;
|
|
|
|
.line 42
|
|
.line 43
|
|
invoke-virtual {v4}, Lkotlinx/coroutines/internal/LockFreeTaskQueueCore;->b()Z
|
|
|
|
.line 44
|
|
.line 45
|
|
.line 46
|
|
goto :goto_1
|
|
|
|
.line 47
|
|
:cond_3
|
|
if-ne v4, v0, :cond_4
|
|
|
|
.line 48
|
|
.line 49
|
|
goto :goto_1
|
|
|
|
.line 50
|
|
:cond_4
|
|
new-instance v5, Lkotlinx/coroutines/internal/LockFreeTaskQueueCore;
|
|
|
|
.line 51
|
|
.line 52
|
|
const/16 v6, 0x8
|
|
|
|
.line 53
|
|
.line 54
|
|
invoke-direct {v5, v6, v2}, Lkotlinx/coroutines/internal/LockFreeTaskQueueCore;-><init>(IZ)V
|
|
|
|
.line 55
|
|
.line 56
|
|
.line 57
|
|
const-string v6, "null cannot be cast to non-null type java.lang.Runnable{ kotlinx.coroutines.RunnableKt.Runnable }"
|
|
|
|
.line 58
|
|
.line 59
|
|
invoke-static {v4, v6}, Lkotlin/jvm/internal/Intrinsics;->checkNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
.line 60
|
|
.line 61
|
|
.line 62
|
|
move-object v6, v4
|
|
|
|
.line 63
|
|
check-cast v6, Ljava/lang/Runnable;
|
|
|
|
.line 64
|
|
.line 65
|
|
invoke-virtual {v5, v6}, Lkotlinx/coroutines/internal/LockFreeTaskQueueCore;->a(Ljava/lang/Object;)I
|
|
|
|
.line 66
|
|
.line 67
|
|
.line 68
|
|
:cond_5
|
|
invoke-virtual {v3, p0, v4, v5}, Ljava/util/concurrent/atomic/AtomicReferenceFieldUpdater;->compareAndSet(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Z
|
|
|
|
.line 69
|
|
.line 70
|
|
.line 71
|
|
move-result v6
|
|
|
|
.line 72
|
|
if-eqz v6, :cond_a
|
|
|
|
.line 73
|
|
.line 74
|
|
:cond_6
|
|
:goto_1
|
|
invoke-virtual {p0}, Lkotlinx/coroutines/EventLoopImplBase;->q0()J
|
|
|
|
.line 75
|
|
.line 76
|
|
.line 77
|
|
move-result-wide v2
|
|
|
|
.line 78
|
|
const-wide/16 v4, 0x0
|
|
|
|
.line 79
|
|
.line 80
|
|
cmp-long v0, v2, v4
|
|
|
|
.line 81
|
|
.line 82
|
|
if-lez v0, :cond_6
|
|
|
|
.line 83
|
|
.line 84
|
|
invoke-static {}, Ljava/lang/System;->nanoTime()J
|
|
|
|
.line 85
|
|
.line 86
|
|
.line 87
|
|
move-result-wide v2
|
|
|
|
.line 88
|
|
:goto_2
|
|
sget-object v0, Lkotlinx/coroutines/EventLoopImplBase;->j:Ljava/util/concurrent/atomic/AtomicReferenceFieldUpdater;
|
|
|
|
.line 89
|
|
.line 90
|
|
invoke-virtual {v0, p0}, Ljava/util/concurrent/atomic/AtomicReferenceFieldUpdater;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
.line 91
|
|
.line 92
|
|
.line 93
|
|
move-result-object v0
|
|
|
|
.line 94
|
|
check-cast v0, Lkotlinx/coroutines/EventLoopImplBase$DelayedTaskQueue;
|
|
|
|
.line 95
|
|
.line 96
|
|
if-eqz v0, :cond_9
|
|
|
|
.line 97
|
|
.line 98
|
|
monitor-enter v0
|
|
|
|
.line 99
|
|
:try_start_0
|
|
sget-object v4, Lkotlinx/coroutines/internal/ThreadSafeHeap;->b:Ljava/util/concurrent/atomic/AtomicIntegerFieldUpdater;
|
|
|
|
.line 100
|
|
.line 101
|
|
invoke-virtual {v4, v0}, Ljava/util/concurrent/atomic/AtomicIntegerFieldUpdater;->get(Ljava/lang/Object;)I
|
|
|
|
.line 102
|
|
.line 103
|
|
.line 104
|
|
move-result v4
|
|
|
|
.line 105
|
|
if-lez v4, :cond_7
|
|
|
|
.line 106
|
|
.line 107
|
|
const/4 v4, 0x0
|
|
|
|
.line 108
|
|
invoke-virtual {v0, v4}, Lkotlinx/coroutines/internal/ThreadSafeHeap;->d(I)Lkotlinx/coroutines/internal/ThreadSafeHeapNode;
|
|
|
|
.line 109
|
|
.line 110
|
|
.line 111
|
|
move-result-object v4
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
.line 112
|
|
goto :goto_3
|
|
|
|
.line 113
|
|
:catchall_0
|
|
move-exception v1
|
|
|
|
.line 114
|
|
goto :goto_4
|
|
|
|
.line 115
|
|
:cond_7
|
|
move-object v4, v1
|
|
|
|
.line 116
|
|
:goto_3
|
|
monitor-exit v0
|
|
|
|
.line 117
|
|
check-cast v4, Lkotlinx/coroutines/EventLoopImplBase$DelayedTask;
|
|
|
|
.line 118
|
|
.line 119
|
|
if-nez v4, :cond_8
|
|
|
|
.line 120
|
|
.line 121
|
|
goto :goto_5
|
|
|
|
.line 122
|
|
:cond_8
|
|
invoke-virtual {p0, v2, v3, v4}, Lkotlinx/coroutines/EventLoopImplPlatform;->h0(JLkotlinx/coroutines/EventLoopImplBase$DelayedTask;)V
|
|
|
|
.line 123
|
|
.line 124
|
|
.line 125
|
|
goto :goto_2
|
|
|
|
.line 126
|
|
:goto_4
|
|
monitor-exit v0
|
|
|
|
.line 127
|
|
throw v1
|
|
|
|
.line 128
|
|
:cond_9
|
|
:goto_5
|
|
return-void
|
|
|
|
.line 129
|
|
:cond_a
|
|
invoke-virtual {v3, p0}, Ljava/util/concurrent/atomic/AtomicReferenceFieldUpdater;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
.line 130
|
|
.line 131
|
|
.line 132
|
|
move-result-object v6
|
|
|
|
.line 133
|
|
if-eq v6, v4, :cond_5
|
|
|
|
.line 134
|
|
.line 135
|
|
goto :goto_0
|
|
.end method
|