ADD week 5

This commit is contained in:
2025-03-31 16:33:42 +02:00
parent 86f265f22d
commit bf645048e6
4927 changed files with 544053 additions and 0 deletions

View File

@ -0,0 +1,92 @@
package kotlinx.coroutines.debug;
import java.lang.instrument.ClassFileTransformer;
import java.lang.instrument.Instrumentation;
import java.security.ProtectionDomain;
import kotlin.Metadata;
import kotlin.Result;
import kotlin.ResultKt;
import kotlin.io.ByteStreamsKt;
import kotlin.jvm.JvmStatic;
import kotlin.jvm.internal.Intrinsics;
import kotlinx.coroutines.debug.internal.AgentInstallationType;
import kotlinx.coroutines.debug.internal.DebugProbesImpl;
import sun.misc.Signal;
import sun.misc.SignalHandler;
/* compiled from: AgentPremain.kt */
@Metadata(d1 = {"\u0000(\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0002\n\u0002\u0010\u000b\n\u0000\n\u0002\u0010\u0002\n\u0002\b\u0002\n\u0002\u0010\u000e\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\\u0002\u0018\u00002\u00020\u0001:\u0001\fB\u0007\b\u0002¢\u0006\u0002\u0010\u0002J\b\u0010\u0005\u001a\u00020\u0006H\u0002J\u001a\u0010\u0007\u001a\u00020\u00062\b\u0010\b\u001a\u0004\u0018\u00010\t2\u0006\u0010\n\u001a\u00020\u000bH\u0007R\u000e\u0010\u0003\u001a\u00020\u0004X\u0082\u0004¢\u0006\u0002\n\u0000¨\u0006\r"}, d2 = {"Lkotlinx/coroutines/debug/AgentPremain;", "", "()V", "enableCreationStackTraces", "", "installSignalHandler", "", "premain", "args", "", "instrumentation", "Ljava/lang/instrument/Instrumentation;", "DebugProbesTransformer", "kotlinx-coroutines-core"}, k = 1, mv = {1, 8, 0}, xi = 48)
/* loaded from: classes.dex */
public final class AgentPremain {
public static final AgentPremain INSTANCE = new AgentPremain();
private static final boolean enableCreationStackTraces;
private AgentPremain() {
}
static {
Object m288constructorimpl;
boolean enableCreationStackTraces2;
try {
Result.Companion companion = Result.INSTANCE;
String property = System.getProperty("kotlinx.coroutines.debug.enable.creation.stack.trace");
m288constructorimpl = Result.m288constructorimpl(property != null ? Boolean.valueOf(Boolean.parseBoolean(property)) : null);
} catch (Throwable th) {
Result.Companion companion2 = Result.INSTANCE;
m288constructorimpl = Result.m288constructorimpl(ResultKt.createFailure(th));
}
Boolean bool = (Boolean) (Result.m294isFailureimpl(m288constructorimpl) ? null : m288constructorimpl);
if (bool != null) {
enableCreationStackTraces2 = bool.booleanValue();
} else {
enableCreationStackTraces2 = DebugProbesImpl.INSTANCE.getEnableCreationStackTraces();
}
enableCreationStackTraces = enableCreationStackTraces2;
}
@JvmStatic
public static final void premain(String args, Instrumentation instrumentation) {
AgentInstallationType.INSTANCE.setInstalledStatically$kotlinx_coroutines_core(true);
instrumentation.addTransformer(DebugProbesTransformer.INSTANCE);
DebugProbesImpl.INSTANCE.setEnableCreationStackTraces(enableCreationStackTraces);
DebugProbesImpl.INSTANCE.install();
INSTANCE.installSignalHandler();
}
/* compiled from: AgentPremain.kt */
@Metadata(d1 = {"\u0000,\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\u0012\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u000e\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\\u0002\u0018\u00002\u00020\u0001B\u0007\b\u0002¢\u0006\u0002\u0010\u0002J<\u0010\u0003\u001a\u0004\u0018\u00010\u00042\b\u0010\u0005\u001a\u0004\u0018\u00010\u00062\u0006\u0010\u0007\u001a\u00020\b2\f\u0010\t\u001a\b\u0012\u0002\b\u0003\u0018\u00010\n2\u0006\u0010\u000b\u001a\u00020\f2\b\u0010\r\u001a\u0004\u0018\u00010\u0004H\u0016¨\u0006\u000e"}, d2 = {"Lkotlinx/coroutines/debug/AgentPremain$DebugProbesTransformer;", "Ljava/lang/instrument/ClassFileTransformer;", "()V", "transform", "", "loader", "Ljava/lang/ClassLoader;", "className", "", "classBeingRedefined", "Ljava/lang/Class;", "protectionDomain", "Ljava/security/ProtectionDomain;", "classfileBuffer", "kotlinx-coroutines-core"}, k = 1, mv = {1, 8, 0}, xi = 48)
public static final class DebugProbesTransformer implements ClassFileTransformer {
public static final DebugProbesTransformer INSTANCE = new DebugProbesTransformer();
private DebugProbesTransformer() {
}
public byte[] transform(ClassLoader loader, String className, Class<?> classBeingRedefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) {
if (loader == null || !Intrinsics.areEqual(className, "kotlin/coroutines/jvm/internal/DebugProbesKt")) {
return null;
}
AgentInstallationType.INSTANCE.setInstalledStatically$kotlinx_coroutines_core(true);
return ByteStreamsKt.readBytes(loader.getResourceAsStream("DebugProbesKt.bin"));
}
}
private final void installSignalHandler() {
try {
Signal.handle(new Signal("TRAP"), new SignalHandler() { // from class: kotlinx.coroutines.debug.AgentPremain$$ExternalSyntheticLambda0
public final void handle(Signal signal) {
AgentPremain.installSignalHandler$lambda$1(signal);
}
});
} catch (Throwable unused) {
}
}
/* JADX INFO: Access modifiers changed from: private */
public static final void installSignalHandler$lambda$1(Signal signal) {
if (DebugProbesImpl.INSTANCE.isInstalled$kotlinx_coroutines_core()) {
DebugProbesImpl.INSTANCE.dumpCoroutines(System.out);
} else {
System.out.println((Object) "Cannot perform coroutines dump, debug probes are disabled");
}
}
}

View File

@ -0,0 +1,22 @@
package kotlinx.coroutines.debug.internal;
import kotlin.Metadata;
/* compiled from: AgentInstallationType.kt */
@Metadata(d1 = {"\u0000\u0014\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0002\n\u0002\u0010\u000b\n\u0002\b\u0005\\u0002\u0018\u00002\u00020\u0001B\u0007\b\u0002¢\u0006\u0002\u0010\u0002R\u001a\u0010\u0003\u001a\u00020\u0004X\u0080\u000e¢\u0006\u000e\n\u0000\u001a\u0004\b\u0005\u0010\u0006\"\u0004\b\u0007\u0010\\u0006\t"}, d2 = {"Lkotlinx/coroutines/debug/internal/AgentInstallationType;", "", "()V", "isInstalledStatically", "", "isInstalledStatically$kotlinx_coroutines_core", "()Z", "setInstalledStatically$kotlinx_coroutines_core", "(Z)V", "kotlinx-coroutines-core"}, k = 1, mv = {1, 8, 0}, xi = 48)
/* loaded from: classes.dex */
public final class AgentInstallationType {
public static final AgentInstallationType INSTANCE = new AgentInstallationType();
private static boolean isInstalledStatically;
public final boolean isInstalledStatically$kotlinx_coroutines_core() {
return isInstalledStatically;
}
public final void setInstalledStatically$kotlinx_coroutines_core(boolean z) {
isInstalledStatically = z;
}
private AgentInstallationType() {
}
}

View File

@ -0,0 +1,535 @@
package kotlinx.coroutines.debug.internal;
import java.lang.ref.Reference;
import java.lang.ref.ReferenceQueue;
import java.util.Iterator;
import java.util.Map;
import java.util.NoSuchElementException;
import java.util.Set;
import java.util.concurrent.atomic.AtomicIntegerFieldUpdater;
import java.util.concurrent.atomic.AtomicReferenceArray;
import java.util.concurrent.atomic.AtomicReferenceFieldUpdater;
import kotlin.KotlinNothingValueException;
import kotlin.Metadata;
import kotlin.Unit;
import kotlin.collections.AbstractMutableMap;
import kotlin.collections.AbstractMutableSet;
import kotlin.jvm.Volatile;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.functions.Function2;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.markers.KMutableIterator;
import kotlin.jvm.internal.markers.KMutableMap;
import kotlin.ranges.RangesKt;
import kotlinx.coroutines.channels.ChannelSegment$$ExternalSyntheticBackportWithForwarding0;
import kotlinx.coroutines.debug.internal.ConcurrentWeakMap;
import kotlinx.coroutines.internal.Symbol;
/* compiled from: ConcurrentWeakMap.kt */
@Metadata(d1 = {"\u0000R\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0000\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u000b\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010#\n\u0002\u0010'\n\u0002\b\u0005\n\u0002\u0010\b\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u000f\b\u0000\u0018\u0000*\b\b\u0000\u0010\u0001*\u00020\u0002*\b\b\u0001\u0010\u0003*\u00020\u00022\u000e\u0012\u0004\u0012\u0002H\u0001\u0012\u0004\u0012\u0002H\u00030\u0004:\u0003()*B\u000f\u0012\b\b\u0002\u0010\u0005\u001a\u00020\u0006¢\u0006\u0002\u0010\u0007J\u0014\u0010\u0019\u001a\u00020\u001a2\n\u0010\u001b\u001a\u0006\u0012\u0002\b\u00030\u001cH\u0002J\b\u0010\u001d\u001a\u00020\u001aH\u0016J\b\u0010\u001e\u001a\u00020\u001aH\u0002J\u0018\u0010\u001f\u001a\u0004\u0018\u00018\u00012\u0006\u0010 \u001a\u00028\u0000H\u0096\u0002¢\u0006\u0002\u0010!J\u001f\u0010\"\u001a\u0004\u0018\u00018\u00012\u0006\u0010 \u001a\u00028\u00002\u0006\u0010#\u001a\u00028\u0001H\u0016¢\u0006\u0002\u0010$J!\u0010%\u001a\u0004\u0018\u00018\u00012\u0006\u0010 \u001a\u00028\u00002\b\u0010#\u001a\u0004\u0018\u00018\u0001H\u0002¢\u0006\u0002\u0010$J\u0017\u0010&\u001a\u0004\u0018\u00018\u00012\u0006\u0010 \u001a\u00028\u0000H\u0016¢\u0006\u0002\u0010!J\u0006\u0010'\u001a\u00020\u001aR\t\u0010\b\u001a\u00020\tX\u0082\u0004R\u001f\u0010\n\u001a\u0018\u0012\u0014\u0012\u00120\fR\u000e\u0012\u0004\u0012\u00028\u0000\u0012\u0004\u0012\u00028\u00010\u00000\u000bX\u0082\u0004R&\u0010\r\u001a\u0014\u0012\u0010\u0012\u000e\u0012\u0004\u0012\u00028\u0000\u0012\u0004\u0012\u00028\u00010\u000f0\u000e8VX\u0096\u0004¢\u0006\u0006\u001a\u0004\b\u0010\u0010\u0011R\u001a\u0010\u0012\u001a\b\u0012\u0004\u0012\u00028\u00000\u000e8VX\u0096\u0004¢\u0006\u0006\u001a\u0004\b\u0013\u0010\u0011R\u0014\u0010\u0014\u001a\u00020\u00158VX\u0096\u0004¢\u0006\u0006\u001a\u0004\b\u0016\u0010\u0017R\u0016\u0010\u0005\u001a\n\u0012\u0004\u0012\u00028\u0000\u0018\u00010\u0018X\u0082\u0004¢\u0006\u0002\n\u0000¨\u0006+"}, d2 = {"Lkotlinx/coroutines/debug/internal/ConcurrentWeakMap;", "K", "", "V", "Lkotlin/collections/AbstractMutableMap;", "weakRefQueue", "", "(Z)V", "_size", "Lkotlinx/atomicfu/AtomicInt;", "core", "Lkotlinx/atomicfu/AtomicRef;", "Lkotlinx/coroutines/debug/internal/ConcurrentWeakMap$Core;", "entries", "", "", "getEntries", "()Ljava/util/Set;", "keys", "getKeys", "size", "", "getSize", "()I", "Ljava/lang/ref/ReferenceQueue;", "cleanWeakRef", "", "w", "Lkotlinx/coroutines/debug/internal/HashedWeakRef;", "clear", "decrementSize", "get", "key", "(Ljava/lang/Object;)Ljava/lang/Object;", "put", "value", "(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;", "putSynchronized", "remove", "runWeakRefQueueCleaningLoopUntilInterrupted", "Core", "Entry", "KeyValueSet", "kotlinx-coroutines-core"}, k = 1, mv = {1, 8, 0}, xi = 48)
/* loaded from: classes.dex */
public final class ConcurrentWeakMap<K, V> extends AbstractMutableMap<K, V> {
private static final AtomicIntegerFieldUpdater _size$FU = AtomicIntegerFieldUpdater.newUpdater(ConcurrentWeakMap.class, "_size");
private static final AtomicReferenceFieldUpdater core$FU = AtomicReferenceFieldUpdater.newUpdater(ConcurrentWeakMap.class, Object.class, "core");
@Volatile
private volatile int _size;
@Volatile
private volatile Object core;
private final ReferenceQueue<K> weakRefQueue;
public ConcurrentWeakMap() {
this(false, 1, null);
}
public /* synthetic */ ConcurrentWeakMap(boolean z, int i, DefaultConstructorMarker defaultConstructorMarker) {
this((i & 1) != 0 ? false : z);
}
public ConcurrentWeakMap(boolean z) {
this.core = new Core(16);
this.weakRefQueue = z ? new ReferenceQueue<>() : null;
}
@Override // kotlin.collections.AbstractMutableMap
public int getSize() {
return _size$FU.get(this);
}
/* JADX INFO: Access modifiers changed from: private */
public final void decrementSize() {
_size$FU.decrementAndGet(this);
}
@Override // java.util.AbstractMap, java.util.Map
public V get(Object key) {
if (key == null) {
return null;
}
return (V) ((Core) core$FU.get(this)).getImpl(key);
}
@Override // kotlin.collections.AbstractMutableMap, java.util.AbstractMap, java.util.Map
public V put(K key, V value) {
Symbol symbol;
V v = (V) Core.putImpl$default((Core) core$FU.get(this), key, value, null, 4, null);
symbol = ConcurrentWeakMapKt.REHASH;
if (v == symbol) {
v = putSynchronized(key, value);
}
if (v == null) {
_size$FU.incrementAndGet(this);
}
return v;
}
/* JADX WARN: Multi-variable type inference failed */
@Override // java.util.AbstractMap, java.util.Map
public V remove(Object key) {
Symbol symbol;
if (key == 0) {
return null;
}
V v = (V) Core.putImpl$default((Core) core$FU.get(this), key, null, null, 4, null);
symbol = ConcurrentWeakMapKt.REHASH;
if (v == symbol) {
v = putSynchronized(key, null);
}
if (v != null) {
_size$FU.decrementAndGet(this);
}
return v;
}
private final synchronized V putSynchronized(K key, V value) {
V v;
Symbol symbol;
Core core = (Core) core$FU.get(this);
while (true) {
v = (V) Core.putImpl$default(core, key, value, null, 4, null);
symbol = ConcurrentWeakMapKt.REHASH;
if (v == symbol) {
core = core.rehash();
core$FU.set(this, core);
}
}
return v;
}
@Override // kotlin.collections.AbstractMutableMap
public Set<K> getKeys() {
return new KeyValueSet(new Function2<K, V, K>() { // from class: kotlinx.coroutines.debug.internal.ConcurrentWeakMap$keys$1
@Override // kotlin.jvm.functions.Function2
public final K invoke(K k, V v) {
return k;
}
});
}
@Override // kotlin.collections.AbstractMutableMap
public Set<Map.Entry<K, V>> getEntries() {
return new KeyValueSet(new Function2<K, V, Map.Entry<K, V>>() { // from class: kotlinx.coroutines.debug.internal.ConcurrentWeakMap$entries$1
/* JADX WARN: Multi-variable type inference failed */
@Override // kotlin.jvm.functions.Function2
public /* bridge */ /* synthetic */ Object invoke(Object obj, Object obj2) {
return invoke((ConcurrentWeakMap$entries$1<K, V>) obj, obj2);
}
@Override // kotlin.jvm.functions.Function2
public final Map.Entry<K, V> invoke(K k, V v) {
return new ConcurrentWeakMap.Entry(k, v);
}
});
}
@Override // java.util.AbstractMap, java.util.Map
public void clear() {
Iterator<K> it = keySet().iterator();
while (it.hasNext()) {
remove(it.next());
}
}
public final void runWeakRefQueueCleaningLoopUntilInterrupted() {
if (this.weakRefQueue == null) {
throw new IllegalStateException("Must be created with weakRefQueue = true".toString());
}
while (true) {
try {
Reference<? extends K> remove = this.weakRefQueue.remove();
Intrinsics.checkNotNull(remove, "null cannot be cast to non-null type kotlinx.coroutines.debug.internal.HashedWeakRef<*>");
cleanWeakRef((HashedWeakRef) remove);
} catch (InterruptedException unused) {
Thread.currentThread().interrupt();
return;
}
}
}
private final void cleanWeakRef(HashedWeakRef<?> w) {
((Core) core$FU.get(this)).cleanWeakRef(w);
}
/* compiled from: ConcurrentWeakMap.kt */
@Metadata(d1 = {"\u0000D\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\n\u0002\u0010\b\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0010\u0002\n\u0002\b\u0007\n\u0002\u0010)\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0018\u0002\n\u0002\b\u0003\b\u0082\u0004\u0018\u00002\u00020\u0001:\u0001!B\r\u0012\u0006\u0010\u0002\u001a\u00020\u0003¢\u0006\u0002\u0010\u0004J\u0012\u0010\r\u001a\u00020\u000e2\n\u0010\u000f\u001a\u0006\u0012\u0002\b\u00030\u0007J\u0015\u0010\u0010\u001a\u0004\u0018\u00018\u00012\u0006\u0010\u0011\u001a\u00028\u0000¢\u0006\u0002\u0010\u0012J\u0010\u0010\u0013\u001a\u00020\u00032\u0006\u0010\u0014\u001a\u00020\u0003H\u0002J,\u0010\u0015\u001a\b\u0012\u0004\u0012\u0002H\u00170\u0016\"\u0004\b\u0002\u0010\u00172\u0018\u0010\u0018\u001a\u0014\u0012\u0004\u0012\u00028\u0000\u0012\u0004\u0012\u00028\u0001\u0012\u0004\u0012\u0002H\u00170\u0019J1\u0010\u001a\u001a\u0004\u0018\u00010\u00012\u0006\u0010\u0011\u001a\u00028\u00002\b\u0010\u001b\u001a\u0004\u0018\u00018\u00012\u0010\b\u0002\u0010\u001c\u001a\n\u0012\u0004\u0012\u00028\u0000\u0018\u00010\u0007¢\u0006\u0002\u0010\u001dJ\u0016\u0010\u001e\u001a\u00120\u0000R\u000e\u0012\u0004\u0012\u00028\u0000\u0012\u0004\u0012\u00028\u00010\u001fJ\u0010\u0010 \u001a\u00020\u000e2\u0006\u0010\u0013\u001a\u00020\u0003H\u0002R\u000e\u0010\u0002\u001a\u00020\u0003X\u0082\u0004¢\u0006\u0002\n\u0000R\u0017\u0010\u0005\u001a\u0010\u0012\f\u0012\n\u0012\u0004\u0012\u00028\u0000\u0018\u00010\u00070\u0006X\u0082\u0004R\t\u0010\b\u001a\u00020\tX\u0082\u0004R\u000e\u0010\n\u001a\u00020\u0003X\u0082\u0004¢\u0006\u0002\n\u0000R\u000e\u0010\u000b\u001a\u00020\u0003X\u0082\u0004¢\u0006\u0002\n\u0000R\u0011\u0010\f\u001a\n\u0012\u0006\u0012\u0004\u0018\u00010\u00010\u0006X\u0082\u0004¨\u0006\""}, d2 = {"Lkotlinx/coroutines/debug/internal/ConcurrentWeakMap$Core;", "", "allocated", "", "(Lkotlinx/coroutines/debug/internal/ConcurrentWeakMap;I)V", "keys", "Lkotlinx/atomicfu/AtomicArray;", "Lkotlinx/coroutines/debug/internal/HashedWeakRef;", "load", "Lkotlinx/atomicfu/AtomicInt;", "shift", "threshold", "values", "cleanWeakRef", "", "weakRef", "getImpl", "key", "(Ljava/lang/Object;)Ljava/lang/Object;", "index", "hash", "keyValueIterator", "", "E", "factory", "Lkotlin/Function2;", "putImpl", "value", "weakKey0", "(Ljava/lang/Object;Ljava/lang/Object;Lkotlinx/coroutines/debug/internal/HashedWeakRef;)Ljava/lang/Object;", "rehash", "Lkotlinx/coroutines/debug/internal/ConcurrentWeakMap;", "removeCleanedAt", "KeyValueIterator", "kotlinx-coroutines-core"}, k = 1, mv = {1, 8, 0}, xi = 48)
private final class Core {
private static final AtomicIntegerFieldUpdater load$FU = AtomicIntegerFieldUpdater.newUpdater(Core.class, "load");
private final int allocated;
private final AtomicReferenceArray keys;
@Volatile
private volatile int load;
private final int shift;
private final int threshold;
private final AtomicReferenceArray values;
private final int index(int hash) {
return (hash * (-1640531527)) >>> this.shift;
}
private final void update$atomicfu(AtomicIntegerFieldUpdater atomicIntegerFieldUpdater, Function1<? super Integer, Integer> function1, Object obj) {
int i;
do {
i = atomicIntegerFieldUpdater.get(obj);
} while (!atomicIntegerFieldUpdater.compareAndSet(obj, i, function1.invoke(Integer.valueOf(i)).intValue()));
}
public Core(int i) {
this.allocated = i;
this.shift = Integer.numberOfLeadingZeros(i) + 1;
this.threshold = (i * 2) / 3;
this.keys = new AtomicReferenceArray(i);
this.values = new AtomicReferenceArray(i);
}
/* JADX WARN: Multi-variable type inference failed */
public final V getImpl(K key) {
int index = index(key.hashCode());
while (true) {
HashedWeakRef hashedWeakRef = (HashedWeakRef) this.keys.get(index);
if (hashedWeakRef == null) {
return null;
}
Object obj = hashedWeakRef.get();
if (Intrinsics.areEqual(key, obj)) {
V v = (V) this.values.get(index);
return v instanceof Marked ? (V) ((Marked) v).ref : v;
}
if (obj == null) {
removeCleanedAt(index);
}
if (index == 0) {
index = this.allocated;
}
index--;
}
}
private final void removeCleanedAt(int index) {
Object obj;
do {
obj = this.values.get(index);
if (obj == null || (obj instanceof Marked)) {
return;
}
} while (!ChannelSegment$$ExternalSyntheticBackportWithForwarding0.m(this.values, index, obj, null));
ConcurrentWeakMap.this.decrementSize();
}
/* JADX WARN: Multi-variable type inference failed */
public static /* synthetic */ Object putImpl$default(Core core, Object obj, Object obj2, HashedWeakRef hashedWeakRef, int i, Object obj3) {
if ((i & 4) != 0) {
hashedWeakRef = null;
}
return core.putImpl(obj, obj2, hashedWeakRef);
}
/* JADX WARN: Code restructure failed: missing block: B:18:0x0058, code lost:
r6 = r5.values.get(r0);
*/
/* JADX WARN: Code restructure failed: missing block: B:19:0x0060, code lost:
if ((r6 instanceof kotlinx.coroutines.debug.internal.Marked) == false) goto L30;
*/
/* JADX WARN: Code restructure failed: missing block: B:21:0x006d, code lost:
if (kotlinx.coroutines.channels.ChannelSegment$$ExternalSyntheticBackportWithForwarding0.m(r5.values, r0, r6, r7) == false) goto L50;
*/
/* JADX WARN: Code restructure failed: missing block: B:23:0x006f, code lost:
return r6;
*/
/* JADX WARN: Code restructure failed: missing block: B:27:0x0062, code lost:
r6 = kotlinx.coroutines.debug.internal.ConcurrentWeakMapKt.REHASH;
*/
/* JADX WARN: Code restructure failed: missing block: B:28:0x0066, code lost:
return r6;
*/
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public final java.lang.Object putImpl(K r6, V r7, kotlinx.coroutines.debug.internal.HashedWeakRef<K> r8) {
/*
r5 = this;
int r0 = r6.hashCode()
int r0 = r5.index(r0)
r1 = 0
L9:
java.util.concurrent.atomic.AtomicReferenceArray r2 = r5.keys
java.lang.Object r2 = r2.get(r0)
kotlinx.coroutines.debug.internal.HashedWeakRef r2 = (kotlinx.coroutines.debug.internal.HashedWeakRef) r2
if (r2 != 0) goto L47
r2 = 0
if (r7 != 0) goto L17
return r2
L17:
if (r1 != 0) goto L31
java.util.concurrent.atomic.AtomicIntegerFieldUpdater r3 = kotlinx.coroutines.debug.internal.ConcurrentWeakMap.Core.load$FU
L1b:
int r1 = r3.get(r5)
int r4 = r5.threshold
if (r1 < r4) goto L28
kotlinx.coroutines.internal.Symbol r6 = kotlinx.coroutines.debug.internal.ConcurrentWeakMapKt.access$getREHASH$p()
return r6
L28:
int r4 = r1 + 1
boolean r1 = r3.compareAndSet(r5, r1, r4)
if (r1 == 0) goto L1b
r1 = 1
L31:
if (r8 != 0) goto L3e
kotlinx.coroutines.debug.internal.HashedWeakRef r8 = new kotlinx.coroutines.debug.internal.HashedWeakRef
kotlinx.coroutines.debug.internal.ConcurrentWeakMap<K, V> r3 = kotlinx.coroutines.debug.internal.ConcurrentWeakMap.this
java.lang.ref.ReferenceQueue r3 = kotlinx.coroutines.debug.internal.ConcurrentWeakMap.access$getWeakRefQueue$p(r3)
r8.<init>(r6, r3)
L3e:
java.util.concurrent.atomic.AtomicReferenceArray r3 = r5.keys
boolean r2 = kotlinx.coroutines.channels.ChannelSegment$$ExternalSyntheticBackportWithForwarding0.m(r3, r0, r2, r8)
if (r2 != 0) goto L58
goto L9
L47:
java.lang.Object r2 = r2.get()
boolean r3 = kotlin.jvm.internal.Intrinsics.areEqual(r6, r2)
if (r3 == 0) goto L70
if (r1 == 0) goto L58
java.util.concurrent.atomic.AtomicIntegerFieldUpdater r6 = kotlinx.coroutines.debug.internal.ConcurrentWeakMap.Core.load$FU
r6.decrementAndGet(r5)
L58:
java.util.concurrent.atomic.AtomicReferenceArray r6 = r5.values
java.lang.Object r6 = r6.get(r0)
boolean r8 = r6 instanceof kotlinx.coroutines.debug.internal.Marked
if (r8 == 0) goto L67
kotlinx.coroutines.internal.Symbol r6 = kotlinx.coroutines.debug.internal.ConcurrentWeakMapKt.access$getREHASH$p()
return r6
L67:
java.util.concurrent.atomic.AtomicReferenceArray r8 = r5.values
boolean r8 = kotlinx.coroutines.channels.ChannelSegment$$ExternalSyntheticBackportWithForwarding0.m(r8, r0, r6, r7)
if (r8 == 0) goto L58
return r6
L70:
if (r2 != 0) goto L75
r5.removeCleanedAt(r0)
L75:
if (r0 != 0) goto L79
int r0 = r5.allocated
L79:
int r0 = r0 + (-1)
goto L9
*/
throw new UnsupportedOperationException("Method not decompiled: kotlinx.coroutines.debug.internal.ConcurrentWeakMap.Core.putImpl(java.lang.Object, java.lang.Object, kotlinx.coroutines.debug.internal.HashedWeakRef):java.lang.Object");
}
/* JADX WARN: Multi-variable type inference failed */
public final ConcurrentWeakMap<K, V>.Core rehash() {
Object obj;
Symbol symbol;
Marked mark;
while (true) {
ConcurrentWeakMap<K, V>.Core core = (ConcurrentWeakMap<K, V>.Core) ConcurrentWeakMap.this.new Core(Integer.highestOneBit(RangesKt.coerceAtLeast(ConcurrentWeakMap.this.size(), 4)) * 4);
int i = this.allocated;
for (int i2 = 0; i2 < i; i2++) {
HashedWeakRef hashedWeakRef = (HashedWeakRef) this.keys.get(i2);
Object obj2 = hashedWeakRef != null ? hashedWeakRef.get() : null;
if (hashedWeakRef != null && obj2 == null) {
removeCleanedAt(i2);
}
while (true) {
obj = this.values.get(i2);
if (!(obj instanceof Marked)) {
AtomicReferenceArray atomicReferenceArray = this.values;
mark = ConcurrentWeakMapKt.mark(obj);
if (ChannelSegment$$ExternalSyntheticBackportWithForwarding0.m(atomicReferenceArray, i2, obj, mark)) {
break;
}
} else {
obj = ((Marked) obj).ref;
break;
}
}
if (obj2 != null && obj != null) {
Object putImpl = core.putImpl(obj2, obj, hashedWeakRef);
symbol = ConcurrentWeakMapKt.REHASH;
if (putImpl != symbol) {
}
}
}
return core;
}
}
public final void cleanWeakRef(HashedWeakRef<?> weakRef) {
int index = index(weakRef.hash);
while (true) {
HashedWeakRef<?> hashedWeakRef = (HashedWeakRef) this.keys.get(index);
if (hashedWeakRef == null) {
return;
}
if (hashedWeakRef == weakRef) {
removeCleanedAt(index);
return;
} else {
if (index == 0) {
index = this.allocated;
}
index--;
}
}
}
public final <E> Iterator<E> keyValueIterator(Function2<? super K, ? super V, ? extends E> factory) {
return new KeyValueIterator(factory);
}
/* compiled from: ConcurrentWeakMap.kt */
@Metadata(d1 = {"\u00000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010)\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\b\n\u0002\b\u0004\n\u0002\u0010\u0002\n\u0000\n\u0002\u0010\u000b\n\u0002\b\u0003\n\u0002\u0010\u0001\n\u0000\b\u0082\u0004\u0018\u0000*\u0004\b\u0002\u0010\u00012\b\u0012\u0004\u0012\u0002H\u00010\u0002B\u001f\u0012\u0018\u0010\u0003\u001a\u0014\u0012\u0004\u0012\u00028\u0000\u0012\u0004\u0012\u00028\u0001\u0012\u0004\u0012\u00028\u00020\u0004¢\u0006\u0002\u0010\u0005J\b\u0010\u000b\u001a\u00020\fH\u0002J\t\u0010\r\u001a\u00020\u000eH\u0096\u0002J\u000e\u0010\u000f\u001a\u00028\u0002H\u0096\u0002¢\u0006\u0002\u0010\u0010J\b\u0010\u0011\u001a\u00020\u0012H\u0016R \u0010\u0003\u001a\u0014\u0012\u0004\u0012\u00028\u0000\u0012\u0004\u0012\u00028\u0001\u0012\u0004\u0012\u00028\u00020\u0004X\u0082\u0004¢\u0006\u0002\n\u0000R\u000e\u0010\u0006\u001a\u00020\u0007X\u0082\u000e¢\u0006\u0002\n\u0000R\u0010\u0010\b\u001a\u00028\u0000X\u0082.¢\u0006\u0004\n\u0002\u0010\tR\u0010\u0010\n\u001a\u00028\u0001X\u0082.¢\u0006\u0004\n\u0002\u0010\\u0006\u0013"}, d2 = {"Lkotlinx/coroutines/debug/internal/ConcurrentWeakMap$Core$KeyValueIterator;", "E", "", "factory", "Lkotlin/Function2;", "(Lkotlinx/coroutines/debug/internal/ConcurrentWeakMap$Core;Lkotlin/jvm/functions/Function2;)V", "index", "", "key", "Ljava/lang/Object;", "value", "findNext", "", "hasNext", "", "next", "()Ljava/lang/Object;", "remove", "", "kotlinx-coroutines-core"}, k = 1, mv = {1, 8, 0}, xi = 48)
private final class KeyValueIterator<E> implements Iterator<E>, KMutableIterator {
private final Function2<K, V, E> factory;
private int index = -1;
private K key;
private V value;
/* JADX WARN: Multi-variable type inference failed */
public KeyValueIterator(Function2<? super K, ? super V, ? extends E> function2) {
this.factory = function2;
findNext();
}
private final void findNext() {
K k;
while (true) {
int i = this.index + 1;
this.index = i;
if (i >= ((Core) Core.this).allocated) {
return;
}
HashedWeakRef hashedWeakRef = (HashedWeakRef) ((Core) Core.this).keys.get(this.index);
if (hashedWeakRef != null && (k = (K) hashedWeakRef.get()) != null) {
this.key = k;
Object obj = (V) ((Core) Core.this).values.get(this.index);
if (obj instanceof Marked) {
obj = (V) ((Marked) obj).ref;
}
if (obj != null) {
this.value = (V) obj;
return;
}
}
}
}
@Override // java.util.Iterator
public boolean hasNext() {
return this.index < ((Core) Core.this).allocated;
}
@Override // java.util.Iterator
public E next() {
if (this.index >= ((Core) Core.this).allocated) {
throw new NoSuchElementException();
}
Function2<K, V, E> function2 = this.factory;
K k = this.key;
if (k == false) {
Intrinsics.throwUninitializedPropertyAccessException("key");
k = (K) Unit.INSTANCE;
}
V v = this.value;
if (v == false) {
Intrinsics.throwUninitializedPropertyAccessException("value");
v = (V) Unit.INSTANCE;
}
E e = (E) function2.invoke(k, v);
findNext();
return e;
}
@Override // java.util.Iterator
public Void remove() {
ConcurrentWeakMapKt.noImpl();
throw new KotlinNothingValueException();
}
}
}
/* JADX INFO: Access modifiers changed from: private */
/* compiled from: ConcurrentWeakMap.kt */
@Metadata(d1 = {"\u0000\u0010\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010'\n\u0002\b\u000b\b\u0002\u0018\u0000*\u0004\b\u0002\u0010\u0001*\u0004\b\u0003\u0010\u00022\u000e\u0012\u0004\u0012\u0002H\u0001\u0012\u0004\u0012\u0002H\u00020\u0003B\u0015\u0012\u0006\u0010\u0004\u001a\u00028\u0002\u0012\u0006\u0010\u0005\u001a\u00028\u0003¢\u0006\u0002\u0010\u0006J\u0015\u0010\u000b\u001a\u00028\u00032\u0006\u0010\f\u001a\u00028\u0003H\u0016¢\u0006\u0002\u0010\rR\u0016\u0010\u0004\u001a\u00028\u0002X\u0096\u0004¢\u0006\n\n\u0002\u0010\t\u001a\u0004\b\u0007\u0010\bR\u0016\u0010\u0005\u001a\u00028\u0003X\u0096\u0004¢\u0006\n\n\u0002\u0010\t\u001a\u0004\b\n\u0010\\u0006\u000e"}, d2 = {"Lkotlinx/coroutines/debug/internal/ConcurrentWeakMap$Entry;", "K", "V", "", "key", "value", "(Ljava/lang/Object;Ljava/lang/Object;)V", "getKey", "()Ljava/lang/Object;", "Ljava/lang/Object;", "getValue", "setValue", "newValue", "(Ljava/lang/Object;)Ljava/lang/Object;", "kotlinx-coroutines-core"}, k = 1, mv = {1, 8, 0}, xi = 48)
static final class Entry<K, V> implements Map.Entry<K, V>, KMutableMap.Entry {
private final K key;
private final V value;
@Override // java.util.Map.Entry
public K getKey() {
return this.key;
}
@Override // java.util.Map.Entry
public V getValue() {
return this.value;
}
public Entry(K k, V v) {
this.key = k;
this.value = v;
}
@Override // java.util.Map.Entry
public V setValue(V newValue) {
ConcurrentWeakMapKt.noImpl();
throw new KotlinNothingValueException();
}
}
/* compiled from: ConcurrentWeakMap.kt */
@Metadata(d1 = {"\u0000*\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\b\n\u0002\b\u0003\n\u0002\u0010\u000b\n\u0002\b\u0003\n\u0002\u0010)\n\u0000\b\u0082\u0004\u0018\u0000*\u0004\b\u0002\u0010\u00012\b\u0012\u0004\u0012\u0002H\u00010\u0002B\u001f\u0012\u0018\u0010\u0003\u001a\u0014\u0012\u0004\u0012\u00028\u0000\u0012\u0004\u0012\u00028\u0001\u0012\u0004\u0012\u00028\u00020\u0004¢\u0006\u0002\u0010\u0005J\u0015\u0010\n\u001a\u00020\u000b2\u0006\u0010\f\u001a\u00028\u0002H\u0016¢\u0006\u0002\u0010\rJ\u000f\u0010\u000e\u001a\b\u0012\u0004\u0012\u00028\u00020\u000fH\u0096\u0002R \u0010\u0003\u001a\u0014\u0012\u0004\u0012\u00028\u0000\u0012\u0004\u0012\u00028\u0001\u0012\u0004\u0012\u00028\u00020\u0004X\u0082\u0004¢\u0006\u0002\n\u0000R\u0014\u0010\u0006\u001a\u00020\u00078VX\u0096\u0004¢\u0006\u0006\u001a\u0004\b\b\u0010\\u0006\u0010"}, d2 = {"Lkotlinx/coroutines/debug/internal/ConcurrentWeakMap$KeyValueSet;", "E", "Lkotlin/collections/AbstractMutableSet;", "factory", "Lkotlin/Function2;", "(Lkotlinx/coroutines/debug/internal/ConcurrentWeakMap;Lkotlin/jvm/functions/Function2;)V", "size", "", "getSize", "()I", "add", "", "element", "(Ljava/lang/Object;)Z", "iterator", "", "kotlinx-coroutines-core"}, k = 1, mv = {1, 8, 0}, xi = 48)
private final class KeyValueSet<E> extends AbstractMutableSet<E> {
private final Function2<K, V, E> factory;
/* JADX WARN: Multi-variable type inference failed */
public KeyValueSet(Function2<? super K, ? super V, ? extends E> function2) {
this.factory = function2;
}
@Override // kotlin.collections.AbstractMutableSet
public int getSize() {
return ConcurrentWeakMap.this.size();
}
@Override // kotlin.collections.AbstractMutableSet, java.util.AbstractCollection, java.util.Collection, java.util.Set
public boolean add(E element) {
ConcurrentWeakMapKt.noImpl();
throw new KotlinNothingValueException();
}
@Override // java.util.AbstractCollection, java.util.Collection, java.lang.Iterable, java.util.Set
public Iterator<E> iterator() {
return ((Core) ConcurrentWeakMap.core$FU.get(ConcurrentWeakMap.this)).keyValueIterator(this.factory);
}
}
}

View File

@ -0,0 +1,26 @@
package kotlinx.coroutines.debug.internal;
import kotlin.Metadata;
import kotlin.jvm.internal.Intrinsics;
import kotlinx.coroutines.internal.Symbol;
/* compiled from: ConcurrentWeakMap.kt */
@Metadata(d1 = {"\u0000\"\n\u0000\n\u0002\u0010\b\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0001\n\u0000\n\u0002\u0010\u0000\n\u0000\u001a\b\u0010\b\u001a\u00020\tH\u0002\u001a\u000e\u0010\n\u001a\u00020\u0003*\u0004\u0018\u00010\u000bH\u0002\"\u000e\u0010\u0000\u001a\u00020\u0001X\u0082T¢\u0006\u0002\n\u0000\"\u000e\u0010\u0002\u001a\u00020\u0003X\u0082\u0004¢\u0006\u0002\n\u0000\"\u000e\u0010\u0004\u001a\u00020\u0003X\u0082\u0004¢\u0006\u0002\n\u0000\"\u000e\u0010\u0005\u001a\u00020\u0001X\u0082T¢\u0006\u0002\n\u0000\"\u000e\u0010\u0006\u001a\u00020\u0007X\u0082\u0004¢\u0006\u0002\n\u0000¨\u0006\f"}, d2 = {"MAGIC", "", "MARKED_NULL", "Lkotlinx/coroutines/debug/internal/Marked;", "MARKED_TRUE", "MIN_CAPACITY", "REHASH", "Lkotlinx/coroutines/internal/Symbol;", "noImpl", "", "mark", "", "kotlinx-coroutines-core"}, k = 2, mv = {1, 8, 0}, xi = 48)
/* loaded from: classes.dex */
public final class ConcurrentWeakMapKt {
private static final int MAGIC = -1640531527;
private static final int MIN_CAPACITY = 16;
private static final Symbol REHASH = new Symbol("REHASH");
private static final Marked MARKED_NULL = new Marked(null);
private static final Marked MARKED_TRUE = new Marked(true);
/* JADX INFO: Access modifiers changed from: private */
public static final Marked mark(Object obj) {
return obj == null ? MARKED_NULL : Intrinsics.areEqual(obj, (Object) true) ? MARKED_TRUE : new Marked(obj);
}
/* JADX INFO: Access modifiers changed from: private */
public static final Void noImpl() {
throw new UnsupportedOperationException("not implemented");
}
}

View File

@ -0,0 +1,63 @@
package kotlinx.coroutines.debug.internal;
import java.util.List;
import kotlin.Metadata;
import kotlin.coroutines.CoroutineContext;
import kotlin.coroutines.jvm.internal.CoroutineStackFrame;
/* compiled from: DebugCoroutineInfo.kt */
@Metadata(d1 = {"\u0000D\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0010 \n\u0002\u0018\u0002\n\u0002\b\u0006\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0010\t\n\u0002\b\u0003\n\u0002\u0010\u000e\n\u0002\b\u0003\b\u0001\u0018\u00002\u00020\u0001B\u0015\u0012\u0006\u0010\u0002\u001a\u00020\u0003\u0012\u0006\u0010\u0004\u001a\u00020\u0005¢\u0006\u0002\u0010\u0006R\u0011\u0010\u0004\u001a\u00020\u0005¢\u0006\b\n\u0000\u001a\u0004\b\u0007\u0010\bR\u0013\u0010\t\u001a\u0004\u0018\u00010\\u0006\b\n\u0000\u001a\u0004\b\u000b\u0010\fR\u0017\u0010\r\u001a\b\u0012\u0004\u0012\u00020\u000f0\u000e¢\u0006\b\n\u0000\u001a\u0004\b\u0010\u0010\u0011R\u0013\u0010\u0012\u001a\u0004\u0018\u00010\\u0006\b\n\u0000\u001a\u0004\b\u0013\u0010\fR\u0019\u0010\u0014\u001a\b\u0012\u0004\u0012\u00020\u000f0\u000e8G¢\u0006\b\n\u0000\u001a\u0004\b\u0014\u0010\u0011R\u0013\u0010\u0015\u001a\u0004\u0018\u00010\u0016¢\u0006\b\n\u0000\u001a\u0004\b\u0017\u0010\u0018R\u0011\u0010\u0019\u001a\u00020\u001a¢\u0006\b\n\u0000\u001a\u0004\b\u001b\u0010\u001cR\u0011\u0010\u001d\u001a\u00020\u001e¢\u0006\b\n\u0000\u001a\u0004\b\u001f\u0010 ¨\u0006!"}, d2 = {"Lkotlinx/coroutines/debug/internal/DebugCoroutineInfo;", "", "source", "Lkotlinx/coroutines/debug/internal/DebugCoroutineInfoImpl;", "context", "Lkotlin/coroutines/CoroutineContext;", "(Lkotlinx/coroutines/debug/internal/DebugCoroutineInfoImpl;Lkotlin/coroutines/CoroutineContext;)V", "getContext", "()Lkotlin/coroutines/CoroutineContext;", "creationStackBottom", "Lkotlin/coroutines/jvm/internal/CoroutineStackFrame;", "getCreationStackBottom", "()Lkotlin/coroutines/jvm/internal/CoroutineStackFrame;", "creationStackTrace", "", "Ljava/lang/StackTraceElement;", "getCreationStackTrace", "()Ljava/util/List;", "lastObservedFrame", "getLastObservedFrame", "lastObservedStackTrace", "lastObservedThread", "Ljava/lang/Thread;", "getLastObservedThread", "()Ljava/lang/Thread;", "sequenceNumber", "", "getSequenceNumber", "()J", "state", "", "getState", "()Ljava/lang/String;", "kotlinx-coroutines-core"}, k = 1, mv = {1, 8, 0}, xi = 48)
/* loaded from: classes.dex */
public final class DebugCoroutineInfo {
private final CoroutineContext context;
private final CoroutineStackFrame creationStackBottom;
private final List<StackTraceElement> creationStackTrace;
private final CoroutineStackFrame lastObservedFrame;
private final List<StackTraceElement> lastObservedStackTrace;
private final Thread lastObservedThread;
private final long sequenceNumber;
private final String state;
public final CoroutineContext getContext() {
return this.context;
}
public final CoroutineStackFrame getCreationStackBottom() {
return this.creationStackBottom;
}
public final List<StackTraceElement> getCreationStackTrace() {
return this.creationStackTrace;
}
public final CoroutineStackFrame getLastObservedFrame() {
return this.lastObservedFrame;
}
public final Thread getLastObservedThread() {
return this.lastObservedThread;
}
public final long getSequenceNumber() {
return this.sequenceNumber;
}
public final String getState() {
return this.state;
}
public final List<StackTraceElement> lastObservedStackTrace() {
return this.lastObservedStackTrace;
}
public DebugCoroutineInfo(DebugCoroutineInfoImpl debugCoroutineInfoImpl, CoroutineContext coroutineContext) {
this.context = coroutineContext;
this.creationStackBottom = debugCoroutineInfoImpl.getCreationStackBottom();
this.sequenceNumber = debugCoroutineInfoImpl.sequenceNumber;
this.creationStackTrace = debugCoroutineInfoImpl.getCreationStackTrace();
this.state = debugCoroutineInfoImpl.get_state();
this.lastObservedThread = debugCoroutineInfoImpl.lastObservedThread;
this.lastObservedFrame = debugCoroutineInfoImpl.getLastObservedFrame$kotlinx_coroutines_core();
this.lastObservedStackTrace = debugCoroutineInfoImpl.lastObservedStackTrace();
}
}

View File

@ -0,0 +1,63 @@
package kotlinx.coroutines.debug.internal;
import kotlin.Metadata;
import kotlin.ResultKt;
import kotlin.Unit;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.intrinsics.IntrinsicsKt;
import kotlin.coroutines.jvm.internal.DebugMetadata;
import kotlin.coroutines.jvm.internal.RestrictedSuspendLambda;
import kotlin.jvm.functions.Function2;
import kotlin.sequences.SequenceScope;
/* compiled from: DebugCoroutineInfoImpl.kt */
@Metadata(d1 = {"\u0000\u000e\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0010\u0002\n\u0000\u0010\u0003\u001a\u00020\u0002*\b\u0012\u0004\u0012\u00020\u00010\u0000H\u008a@"}, d2 = {"Lkotlin/sequences/SequenceScope;", "Ljava/lang/StackTraceElement;", "", "<anonymous>"}, k = 3, mv = {1, 8, 0})
@DebugMetadata(c = "kotlinx.coroutines.debug.internal.DebugCoroutineInfoImpl$creationStackTrace$1", f = "DebugCoroutineInfoImpl.kt", i = {}, l = {158}, m = "invokeSuspend", n = {}, s = {})
/* loaded from: classes.dex */
final class DebugCoroutineInfoImpl$creationStackTrace$1 extends RestrictedSuspendLambda implements Function2<SequenceScope<? super StackTraceElement>, Continuation<? super Unit>, Object> {
final /* synthetic */ StackTraceFrame $bottom;
private /* synthetic */ Object L$0;
int label;
final /* synthetic */ DebugCoroutineInfoImpl this$0;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
DebugCoroutineInfoImpl$creationStackTrace$1(DebugCoroutineInfoImpl debugCoroutineInfoImpl, StackTraceFrame stackTraceFrame, Continuation<? super DebugCoroutineInfoImpl$creationStackTrace$1> continuation) {
super(2, continuation);
this.this$0 = debugCoroutineInfoImpl;
this.$bottom = stackTraceFrame;
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Continuation<Unit> create(Object obj, Continuation<?> continuation) {
DebugCoroutineInfoImpl$creationStackTrace$1 debugCoroutineInfoImpl$creationStackTrace$1 = new DebugCoroutineInfoImpl$creationStackTrace$1(this.this$0, this.$bottom, continuation);
debugCoroutineInfoImpl$creationStackTrace$1.L$0 = obj;
return debugCoroutineInfoImpl$creationStackTrace$1;
}
@Override // kotlin.jvm.functions.Function2
public final Object invoke(SequenceScope<? super StackTraceElement> sequenceScope, Continuation<? super Unit> continuation) {
return ((DebugCoroutineInfoImpl$creationStackTrace$1) create(sequenceScope, continuation)).invokeSuspend(Unit.INSTANCE);
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Object invokeSuspend(Object obj) {
Object yieldFrames;
Object coroutine_suspended = IntrinsicsKt.getCOROUTINE_SUSPENDED();
int i = this.label;
if (i == 0) {
ResultKt.throwOnFailure(obj);
SequenceScope sequenceScope = (SequenceScope) this.L$0;
this.label = 1;
yieldFrames = this.this$0.yieldFrames(sequenceScope, this.$bottom.getCallerFrame(), this);
if (yieldFrames == coroutine_suspended) {
return coroutine_suspended;
}
} else {
if (i != 1) {
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
}
ResultKt.throwOnFailure(obj);
}
return Unit.INSTANCE;
}
}

View File

@ -0,0 +1,35 @@
package kotlinx.coroutines.debug.internal;
import androidx.constraintlayout.core.motion.utils.TypedValues;
import kotlin.Metadata;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.jvm.internal.ContinuationImpl;
import kotlin.coroutines.jvm.internal.DebugMetadata;
/* compiled from: DebugCoroutineInfoImpl.kt */
@Metadata(k = 3, mv = {1, 8, 0}, xi = 48)
@DebugMetadata(c = "kotlinx.coroutines.debug.internal.DebugCoroutineInfoImpl", f = "DebugCoroutineInfoImpl.kt", i = {0, 0, 0}, l = {163}, m = "yieldFrames", n = {"this", "$this$yieldFrames", TypedValues.AttributesType.S_FRAME}, s = {"L$0", "L$1", "L$2"})
/* loaded from: classes.dex */
final class DebugCoroutineInfoImpl$yieldFrames$1 extends ContinuationImpl {
Object L$0;
Object L$1;
Object L$2;
int label;
/* synthetic */ Object result;
final /* synthetic */ DebugCoroutineInfoImpl this$0;
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
DebugCoroutineInfoImpl$yieldFrames$1(DebugCoroutineInfoImpl debugCoroutineInfoImpl, Continuation<? super DebugCoroutineInfoImpl$yieldFrames$1> continuation) {
super(continuation);
this.this$0 = debugCoroutineInfoImpl;
}
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
public final Object invokeSuspend(Object obj) {
Object yieldFrames;
this.result = obj;
this.label |= Integer.MIN_VALUE;
yieldFrames = this.this$0.yieldFrames(null, null, this);
return yieldFrames;
}
}

View File

@ -0,0 +1,190 @@
package kotlinx.coroutines.debug.internal;
import androidx.constraintlayout.core.motion.utils.TypedValues;
import java.lang.ref.WeakReference;
import java.util.ArrayList;
import java.util.List;
import kotlin.Metadata;
import kotlin.collections.CollectionsKt;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.CoroutineContext;
import kotlin.coroutines.jvm.internal.CoroutineStackFrame;
import kotlin.jvm.internal.Intrinsics;
import kotlin.sequences.SequencesKt;
/* compiled from: DebugCoroutineInfoImpl.kt */
@Metadata(d1 = {"\u0000j\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\t\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u000e\n\u0002\b\u0005\n\u0002\u0010 \n\u0002\u0018\u0002\n\u0002\b\t\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0010\b\n\u0002\b\u0003\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u000b\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\b\u0000\u0018\u00002\u00020\u0001B!\u0012\b\u0010\u0002\u001a\u0004\u0018\u00010\u0003\u0012\b\u0010\u0004\u001a\u0004\u0018\u00010\u0005\u0012\u0006\u0010\u0006\u001a\u00020\u0007¢\u0006\u0002\u0010\bJ\u000e\u0010\u0013\u001a\b\u0012\u0004\u0012\u00020\u00150\u0014H\u0002J\f\u0010%\u001a\b\u0012\u0004\u0012\u00020\u00150\u0014J\b\u0010&\u001a\u00020\u000eH\u0016J)\u0010'\u001a\u00020(2\u0006\u0010 \u001a\u00020\u000e2\n\u0010)\u001a\u0006\u0012\u0002\b\u00030*2\u0006\u0010+\u001a\u00020,H\u0000¢\u0006\u0002\b-J%\u0010.\u001a\u00020(*\b\u0012\u0004\u0012\u00020\u00150/2\b\u0010)\u001a\u0004\u0018\u00010\fH\u0082Pø\u0001\u0000¢\u0006\u0002\u00100R\u0016\u0010\t\u001a\n\u0012\u0006\u0012\u0004\u0018\u00010\u00030\nX\u0082\u0004¢\u0006\u0002\n\u0000R\u0016\u0010\u000b\u001a\n\u0012\u0004\u0012\u00020\f\u0018\u00010\nX\u0082\u000e¢\u0006\u0002\n\u0000R\u000e\u0010\r\u001a\u00020\u000eX\u0082\u000e¢\u0006\u0002\n\u0000R\u0013\u0010\u0002\u001a\u0004\u0018\u00010\u00038F¢\u0006\u0006\u001a\u0004\b\u000f\u0010\u0010R\u0013\u0010\u0004\u001a\u0004\u0018\u00010\u0005¢\u0006\b\n\u0000\u001a\u0004\b\u0011\u0010\u0012R\u0017\u0010\u0013\u001a\b\u0012\u0004\u0012\u00020\u00150\u00148F¢\u0006\u0006\u001a\u0004\b\u0016\u0010\u0017R(\u0010\u0019\u001a\u0004\u0018\u00010\f2\b\u0010\u0018\u001a\u0004\u0018\u00010\f8@@@X\u0080\u000e¢\u0006\f\u001a\u0004\b\u001a\u0010\u001b\"\u0004\b\u001c\u0010\u001dR\u0014\u0010\u001e\u001a\u0004\u0018\u00010\u001f8\u0000@\u0000X\u0081\u000e¢\u0006\u0002\n\u0000R\u0010\u0010\u0006\u001a\u00020\u00078\u0000X\u0081\u0004¢\u0006\u0002\n\u0000R\u0011\u0010 \u001a\u00020\u000e8F¢\u0006\u0006\u001a\u0004\b!\u0010\"R\u000e\u0010#\u001a\u00020$X\u0082\u000e¢\u0006\u0002\n\u0000\u0082\u0002\u0004\n\u0002\b\u0019¨\u00061"}, d2 = {"Lkotlinx/coroutines/debug/internal/DebugCoroutineInfoImpl;", "", "context", "Lkotlin/coroutines/CoroutineContext;", "creationStackBottom", "Lkotlinx/coroutines/debug/internal/StackTraceFrame;", "sequenceNumber", "", "(Lkotlin/coroutines/CoroutineContext;Lkotlinx/coroutines/debug/internal/StackTraceFrame;J)V", "_context", "Ljava/lang/ref/WeakReference;", "_lastObservedFrame", "Lkotlin/coroutines/jvm/internal/CoroutineStackFrame;", "_state", "", "getContext", "()Lkotlin/coroutines/CoroutineContext;", "getCreationStackBottom", "()Lkotlinx/coroutines/debug/internal/StackTraceFrame;", "creationStackTrace", "", "Ljava/lang/StackTraceElement;", "getCreationStackTrace", "()Ljava/util/List;", "value", "lastObservedFrame", "getLastObservedFrame$kotlinx_coroutines_core", "()Lkotlin/coroutines/jvm/internal/CoroutineStackFrame;", "setLastObservedFrame$kotlinx_coroutines_core", "(Lkotlin/coroutines/jvm/internal/CoroutineStackFrame;)V", "lastObservedThread", "Ljava/lang/Thread;", "state", "getState", "()Ljava/lang/String;", "unmatchedResume", "", "lastObservedStackTrace", "toString", "updateState", "", TypedValues.AttributesType.S_FRAME, "Lkotlin/coroutines/Continuation;", "shouldBeMatched", "", "updateState$kotlinx_coroutines_core", "yieldFrames", "Lkotlin/sequences/SequenceScope;", "(Lkotlin/sequences/SequenceScope;Lkotlin/coroutines/jvm/internal/CoroutineStackFrame;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;", "kotlinx-coroutines-core"}, k = 1, mv = {1, 8, 0}, xi = 48)
/* loaded from: classes.dex */
public final class DebugCoroutineInfoImpl {
private final WeakReference<CoroutineContext> _context;
private volatile WeakReference<CoroutineStackFrame> _lastObservedFrame;
private volatile String _state = DebugCoroutineInfoImplKt.CREATED;
private final StackTraceFrame creationStackBottom;
public volatile Thread lastObservedThread;
public final long sequenceNumber;
private int unmatchedResume;
public final StackTraceFrame getCreationStackBottom() {
return this.creationStackBottom;
}
/* renamed from: getState, reason: from getter */
public final String get_state() {
return this._state;
}
public DebugCoroutineInfoImpl(CoroutineContext coroutineContext, StackTraceFrame stackTraceFrame, long j) {
this.creationStackBottom = stackTraceFrame;
this.sequenceNumber = j;
this._context = new WeakReference<>(coroutineContext);
}
public final CoroutineContext getContext() {
return this._context.get();
}
public final List<StackTraceElement> getCreationStackTrace() {
return creationStackTrace();
}
public final synchronized void updateState$kotlinx_coroutines_core(String state, Continuation<?> frame, boolean shouldBeMatched) {
if (Intrinsics.areEqual(this._state, DebugCoroutineInfoImplKt.RUNNING) && Intrinsics.areEqual(state, DebugCoroutineInfoImplKt.RUNNING) && shouldBeMatched) {
this.unmatchedResume++;
} else if (this.unmatchedResume > 0 && Intrinsics.areEqual(state, DebugCoroutineInfoImplKt.SUSPENDED)) {
this.unmatchedResume--;
return;
}
if (Intrinsics.areEqual(this._state, state) && Intrinsics.areEqual(state, DebugCoroutineInfoImplKt.SUSPENDED) && getLastObservedFrame$kotlinx_coroutines_core() != null) {
return;
}
this._state = state;
setLastObservedFrame$kotlinx_coroutines_core(frame instanceof CoroutineStackFrame ? (CoroutineStackFrame) frame : null);
this.lastObservedThread = Intrinsics.areEqual(state, DebugCoroutineInfoImplKt.RUNNING) ? Thread.currentThread() : null;
}
public final CoroutineStackFrame getLastObservedFrame$kotlinx_coroutines_core() {
WeakReference<CoroutineStackFrame> weakReference = this._lastObservedFrame;
if (weakReference != null) {
return weakReference.get();
}
return null;
}
public final void setLastObservedFrame$kotlinx_coroutines_core(CoroutineStackFrame coroutineStackFrame) {
this._lastObservedFrame = coroutineStackFrame != null ? new WeakReference<>(coroutineStackFrame) : null;
}
public final List<StackTraceElement> lastObservedStackTrace() {
CoroutineStackFrame lastObservedFrame$kotlinx_coroutines_core = getLastObservedFrame$kotlinx_coroutines_core();
if (lastObservedFrame$kotlinx_coroutines_core == null) {
return CollectionsKt.emptyList();
}
ArrayList arrayList = new ArrayList();
while (lastObservedFrame$kotlinx_coroutines_core != null) {
StackTraceElement stackTraceElement = lastObservedFrame$kotlinx_coroutines_core.getStackTraceElement();
if (stackTraceElement != null) {
arrayList.add(stackTraceElement);
}
lastObservedFrame$kotlinx_coroutines_core = lastObservedFrame$kotlinx_coroutines_core.getCallerFrame();
}
return arrayList;
}
private final List<StackTraceElement> creationStackTrace() {
StackTraceFrame stackTraceFrame = this.creationStackBottom;
if (stackTraceFrame == null) {
return CollectionsKt.emptyList();
}
return SequencesKt.toList(SequencesKt.sequence(new DebugCoroutineInfoImpl$creationStackTrace$1(this, stackTraceFrame, null)));
}
/* JADX INFO: Access modifiers changed from: private */
/* JADX WARN: Removed duplicated region for block: B:13:0x0069 */
/* JADX WARN: Removed duplicated region for block: B:17:0x0044 */
/* JADX WARN: Removed duplicated region for block: B:19:0x0047 */
/* JADX WARN: Removed duplicated region for block: B:27:0x003e */
/* JADX WARN: Removed duplicated region for block: B:8:0x0024 */
/* JADX WARN: Unsupported multi-entry loop pattern (BACK_EDGE: B:20:0x004b -> B:11:0x0062). Please report as a decompilation issue!!! */
/* JADX WARN: Unsupported multi-entry loop pattern (BACK_EDGE: B:24:0x005c -> B:10:0x005f). Please report as a decompilation issue!!! */
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public final java.lang.Object yieldFrames(kotlin.sequences.SequenceScope<? super java.lang.StackTraceElement> r6, kotlin.coroutines.jvm.internal.CoroutineStackFrame r7, kotlin.coroutines.Continuation<? super kotlin.Unit> r8) {
/*
r5 = this;
boolean r0 = r8 instanceof kotlinx.coroutines.debug.internal.DebugCoroutineInfoImpl$yieldFrames$1
if (r0 == 0) goto L14
r0 = r8
kotlinx.coroutines.debug.internal.DebugCoroutineInfoImpl$yieldFrames$1 r0 = (kotlinx.coroutines.debug.internal.DebugCoroutineInfoImpl$yieldFrames$1) r0
int r1 = r0.label
r2 = -2147483648(0xffffffff80000000, float:-0.0)
r1 = r1 & r2
if (r1 == 0) goto L14
int r8 = r0.label
int r8 = r8 - r2
r0.label = r8
goto L19
L14:
kotlinx.coroutines.debug.internal.DebugCoroutineInfoImpl$yieldFrames$1 r0 = new kotlinx.coroutines.debug.internal.DebugCoroutineInfoImpl$yieldFrames$1
r0.<init>(r5, r8)
L19:
java.lang.Object r8 = r0.result
java.lang.Object r1 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED()
int r2 = r0.label
r3 = 1
if (r2 == 0) goto L3e
if (r2 != r3) goto L36
java.lang.Object r6 = r0.L$2
kotlin.coroutines.jvm.internal.CoroutineStackFrame r6 = (kotlin.coroutines.jvm.internal.CoroutineStackFrame) r6
java.lang.Object r7 = r0.L$1
kotlin.sequences.SequenceScope r7 = (kotlin.sequences.SequenceScope) r7
java.lang.Object r2 = r0.L$0
kotlinx.coroutines.debug.internal.DebugCoroutineInfoImpl r2 = (kotlinx.coroutines.debug.internal.DebugCoroutineInfoImpl) r2
kotlin.ResultKt.throwOnFailure(r8)
goto L5f
L36:
java.lang.IllegalStateException r6 = new java.lang.IllegalStateException
java.lang.String r7 = "call to 'resume' before 'invoke' with coroutine"
r6.<init>(r7)
throw r6
L3e:
kotlin.ResultKt.throwOnFailure(r8)
r2 = r5
L42:
if (r7 != 0) goto L47
kotlin.Unit r6 = kotlin.Unit.INSTANCE
return r6
L47:
java.lang.StackTraceElement r8 = r7.getStackTraceElement()
if (r8 == 0) goto L62
r0.L$0 = r2
r0.L$1 = r6
r0.L$2 = r7
r0.label = r3
java.lang.Object r8 = r6.yield(r8, r0)
if (r8 != r1) goto L5c
return r1
L5c:
r4 = r7
r7 = r6
r6 = r4
L5f:
r4 = r7
r7 = r6
r6 = r4
L62:
kotlin.coroutines.jvm.internal.CoroutineStackFrame r7 = r7.getCallerFrame()
if (r7 == 0) goto L69
goto L42
L69:
kotlin.Unit r6 = kotlin.Unit.INSTANCE
return r6
*/
throw new UnsupportedOperationException("Method not decompiled: kotlinx.coroutines.debug.internal.DebugCoroutineInfoImpl.yieldFrames(kotlin.sequences.SequenceScope, kotlin.coroutines.jvm.internal.CoroutineStackFrame, kotlin.coroutines.Continuation):java.lang.Object");
}
public String toString() {
return "DebugCoroutineInfo(state=" + get_state() + ",context=" + getContext() + ')';
}
}

View File

@ -0,0 +1,12 @@
package kotlinx.coroutines.debug.internal;
import kotlin.Metadata;
/* compiled from: DebugCoroutineInfoImpl.kt */
@Metadata(d1 = {"\u0000\n\n\u0000\n\u0002\u0010\u000e\n\u0002\b\u0003\"\u000e\u0010\u0000\u001a\u00020\u0001X\u0080T¢\u0006\u0002\n\u0000\"\u000e\u0010\u0002\u001a\u00020\u0001X\u0080T¢\u0006\u0002\n\u0000\"\u000e\u0010\u0003\u001a\u00020\u0001X\u0080T¢\u0006\u0002\n\u0000¨\u0006\u0004"}, d2 = {DebugCoroutineInfoImplKt.CREATED, "", DebugCoroutineInfoImplKt.RUNNING, DebugCoroutineInfoImplKt.SUSPENDED, "kotlinx-coroutines-core"}, k = 2, mv = {1, 8, 0}, xi = 48)
/* loaded from: classes.dex */
public final class DebugCoroutineInfoImplKt {
public static final String CREATED = "CREATED";
public static final String RUNNING = "RUNNING";
public static final String SUSPENDED = "SUSPENDED";
}

View File

@ -0,0 +1,24 @@
package kotlinx.coroutines.debug.internal;
import java.util.concurrent.atomic.AtomicIntegerFieldUpdater;
import kotlin.Metadata;
import kotlin.jvm.Volatile;
import kotlin.jvm.internal.DefaultConstructorMarker;
/* JADX INFO: Access modifiers changed from: private */
/* compiled from: DebugProbesImpl.kt */
@Metadata(k = 3, mv = {1, 8, 0}, xi = 48)
/* loaded from: classes.dex */
public final class DebugProbesImpl$Installations$kotlinx$VolatileWrapper {
private static final AtomicIntegerFieldUpdater installations$FU = AtomicIntegerFieldUpdater.newUpdater(DebugProbesImpl$Installations$kotlinx$VolatileWrapper.class, "installations");
@Volatile
private volatile int installations;
private DebugProbesImpl$Installations$kotlinx$VolatileWrapper() {
}
public /* synthetic */ DebugProbesImpl$Installations$kotlinx$VolatileWrapper(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
}

View File

@ -0,0 +1,24 @@
package kotlinx.coroutines.debug.internal;
import java.util.concurrent.atomic.AtomicLongFieldUpdater;
import kotlin.Metadata;
import kotlin.jvm.Volatile;
import kotlin.jvm.internal.DefaultConstructorMarker;
/* JADX INFO: Access modifiers changed from: private */
/* compiled from: DebugProbesImpl.kt */
@Metadata(k = 3, mv = {1, 8, 0}, xi = 48)
/* loaded from: classes.dex */
public final class DebugProbesImpl$SequenceNumber$kotlinx$VolatileWrapper {
private static final AtomicLongFieldUpdater sequenceNumber$FU = AtomicLongFieldUpdater.newUpdater(DebugProbesImpl$SequenceNumber$kotlinx$VolatileWrapper.class, "sequenceNumber");
@Volatile
private volatile long sequenceNumber;
private DebugProbesImpl$SequenceNumber$kotlinx$VolatileWrapper() {
}
public /* synthetic */ DebugProbesImpl$SequenceNumber$kotlinx$VolatileWrapper(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
}

View File

@ -0,0 +1,17 @@
package kotlinx.coroutines.debug.internal;
import java.util.Comparator;
import kotlin.Metadata;
import kotlin.comparisons.ComparisonsKt;
import kotlinx.coroutines.debug.internal.DebugProbesImpl;
/* compiled from: Comparisons.kt */
@Metadata(d1 = {"\u0000\n\n\u0000\n\u0002\u0010\b\n\u0002\b\u0007\u0010\u0000\u001a\u00020\u0001\"\u0004\b\u0000\u0010\u00022\u000e\u0010\u0003\u001a\n \u0004*\u0004\u0018\u0001H\u0002H\u00022\u000e\u0010\u0005\u001a\n \u0004*\u0004\u0018\u0001H\u0002H\u0002H\\u0006\u0004\b\u0006\u0010\u0007¨\u0006\b"}, d2 = {"<anonymous>", "", "T", "a", "kotlin.jvm.PlatformType", "b", "compare", "(Ljava/lang/Object;Ljava/lang/Object;)I", "kotlin/comparisons/ComparisonsKt__ComparisonsKt$compareBy$2"}, k = 3, mv = {1, 8, 0}, xi = 48)
/* loaded from: classes.dex */
public final class DebugProbesImpl$dumpCoroutinesInfoImpl$$inlined$sortedBy$1<T> implements Comparator {
/* JADX WARN: Multi-variable type inference failed */
@Override // java.util.Comparator
public final int compare(T t, T t2) {
return ComparisonsKt.compareValues(Long.valueOf(((DebugProbesImpl.CoroutineOwner) t).info.sequenceNumber), Long.valueOf(((DebugProbesImpl.CoroutineOwner) t2).info.sequenceNumber));
}
}

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,38 @@
package kotlinx.coroutines.debug.internal;
import kotlin.Metadata;
import kotlin.jvm.internal.Intrinsics;
import kotlin.text.Typography;
/* compiled from: DebugProbesImpl.kt */
@Metadata(d1 = {"\u0000\b\n\u0000\n\u0002\u0010\u000e\n\u0000\u001a\f\u0010\u0000\u001a\u00020\u0001*\u00020\u0001H\u0002¨\u0006\u0002"}, d2 = {"repr", "", "kotlinx-coroutines-core"}, k = 2, mv = {1, 8, 0}, xi = 48)
/* loaded from: classes.dex */
public final class DebugProbesImplKt {
/* JADX INFO: Access modifiers changed from: private */
public static final String repr(String str) {
StringBuilder sb = new StringBuilder("\"");
int length = str.length();
for (int i = 0; i < length; i++) {
char charAt = str.charAt(i);
if (charAt == '\"') {
sb.append("\\\"");
} else if (charAt == '\\') {
sb.append("\\\\");
} else if (charAt == '\b') {
sb.append("\\b");
} else if (charAt == '\n') {
sb.append("\\n");
} else if (charAt == '\r') {
sb.append("\\r");
} else if (charAt == '\t') {
sb.append("\\t");
} else {
sb.append(charAt);
}
}
sb.append(Typography.quote);
String sb2 = sb.toString();
Intrinsics.checkNotNullExpressionValue(sb2, "StringBuilder().apply(builderAction).toString()");
return sb2;
}
}

View File

@ -0,0 +1,22 @@
package kotlinx.coroutines.debug.internal;
import androidx.constraintlayout.core.motion.utils.TypedValues;
import kotlin.Metadata;
import kotlin.coroutines.Continuation;
/* compiled from: DebugProbes.kt */
@Metadata(d1 = {"\u0000\u0012\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0010\u0002\n\u0002\b\u0003\u001a\"\u0010\u0000\u001a\b\u0012\u0004\u0012\u0002H\u00020\u0001\"\u0004\b\u0000\u0010\u00022\f\u0010\u0003\u001a\b\u0012\u0004\u0012\u0002H\u00020\u0001H\u0000\u001a\u0014\u0010\u0004\u001a\u00020\u00052\n\u0010\u0006\u001a\u0006\u0012\u0002\b\u00030\u0001H\u0000\u001a\u0014\u0010\u0007\u001a\u00020\u00052\n\u0010\u0006\u001a\u0006\u0012\u0002\b\u00030\u0001H\u0000¨\u0006\b"}, d2 = {"probeCoroutineCreated", "Lkotlin/coroutines/Continuation;", "T", "completion", "probeCoroutineResumed", "", TypedValues.AttributesType.S_FRAME, "probeCoroutineSuspended", "kotlinx-coroutines-core"}, k = 2, mv = {1, 8, 0}, xi = 48)
/* loaded from: classes.dex */
public final class DebugProbesKt {
public static final void probeCoroutineResumed(Continuation<?> continuation) {
DebugProbesImpl.INSTANCE.probeCoroutineResumed$kotlinx_coroutines_core(continuation);
}
public static final void probeCoroutineSuspended(Continuation<?> continuation) {
DebugProbesImpl.INSTANCE.probeCoroutineSuspended$kotlinx_coroutines_core(continuation);
}
public static final <T> Continuation<T> probeCoroutineCreated(Continuation<? super T> continuation) {
return DebugProbesImpl.INSTANCE.probeCoroutineCreated$kotlinx_coroutines_core(continuation);
}
}

View File

@ -0,0 +1,73 @@
package kotlinx.coroutines.debug.internal;
import java.io.Serializable;
import java.lang.Thread;
import java.util.List;
import kotlin.Metadata;
import kotlin.coroutines.ContinuationInterceptor;
import kotlin.coroutines.CoroutineContext;
import kotlinx.coroutines.CoroutineId;
import kotlinx.coroutines.CoroutineName;
/* compiled from: DebuggerInfo.kt */
@Metadata(d1 = {"\u00004\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\t\n\u0002\b\u0004\n\u0002\u0010\u000e\n\u0002\b\u0003\n\u0002\u0010 \n\u0002\u0018\u0002\n\u0002\b\u000e\b\u0001\u0018\u00002\u00020\u0001B\u0015\u0012\u0006\u0010\u0002\u001a\u00020\u0003\u0012\u0006\u0010\u0004\u001a\u00020\u0005¢\u0006\u0002\u0010\u0006R\u0015\u0010\u0007\u001a\u0004\u0018\u00010\\u0006\n\n\u0002\u0010\u000b\u001a\u0004\b\t\u0010\nR\u0013\u0010\f\u001a\u0004\u0018\u00010\\u0006\b\n\u0000\u001a\u0004\b\u000e\u0010\u000fR\u0017\u0010\u0010\u001a\b\u0012\u0004\u0012\u00020\u00120\u0011¢\u0006\b\n\u0000\u001a\u0004\b\u0013\u0010\u0014R\u0013\u0010\u0015\u001a\u0004\u0018\u00010\\u0006\b\n\u0000\u001a\u0004\b\u0016\u0010\u000fR\u0013\u0010\u0017\u001a\u0004\u0018\u00010\\u0006\b\n\u0000\u001a\u0004\b\u0018\u0010\u000fR\u0013\u0010\u0019\u001a\u0004\u0018\u00010\\u0006\b\n\u0000\u001a\u0004\b\u001a\u0010\u000fR\u0011\u0010\u001b\u001a\u00020\\u0006\b\n\u0000\u001a\u0004\b\u001c\u0010\u001dR\u0011\u0010\u001e\u001a\u00020\\u0006\b\n\u0000\u001a\u0004\b\u001f\u0010\u000f¨\u0006 "}, d2 = {"Lkotlinx/coroutines/debug/internal/DebuggerInfo;", "Ljava/io/Serializable;", "source", "Lkotlinx/coroutines/debug/internal/DebugCoroutineInfoImpl;", "context", "Lkotlin/coroutines/CoroutineContext;", "(Lkotlinx/coroutines/debug/internal/DebugCoroutineInfoImpl;Lkotlin/coroutines/CoroutineContext;)V", "coroutineId", "", "getCoroutineId", "()Ljava/lang/Long;", "Ljava/lang/Long;", "dispatcher", "", "getDispatcher", "()Ljava/lang/String;", "lastObservedStackTrace", "", "Ljava/lang/StackTraceElement;", "getLastObservedStackTrace", "()Ljava/util/List;", "lastObservedThreadName", "getLastObservedThreadName", "lastObservedThreadState", "getLastObservedThreadState", "name", "getName", "sequenceNumber", "getSequenceNumber", "()J", "state", "getState", "kotlinx-coroutines-core"}, k = 1, mv = {1, 8, 0}, xi = 48)
/* loaded from: classes.dex */
public final class DebuggerInfo implements Serializable {
private final Long coroutineId;
private final String dispatcher;
private final List<StackTraceElement> lastObservedStackTrace;
private final String lastObservedThreadName;
private final String lastObservedThreadState;
private final String name;
private final long sequenceNumber;
private final String state;
public final Long getCoroutineId() {
return this.coroutineId;
}
public final String getDispatcher() {
return this.dispatcher;
}
public final List<StackTraceElement> getLastObservedStackTrace() {
return this.lastObservedStackTrace;
}
public final String getLastObservedThreadName() {
return this.lastObservedThreadName;
}
public final String getLastObservedThreadState() {
return this.lastObservedThreadState;
}
public final String getName() {
return this.name;
}
public final long getSequenceNumber() {
return this.sequenceNumber;
}
public final String getState() {
return this.state;
}
public DebuggerInfo(DebugCoroutineInfoImpl debugCoroutineInfoImpl, CoroutineContext coroutineContext) {
Thread.State state;
CoroutineId coroutineId = (CoroutineId) coroutineContext.get(CoroutineId.INSTANCE);
this.coroutineId = coroutineId != null ? Long.valueOf(coroutineId.getId()) : null;
ContinuationInterceptor continuationInterceptor = (ContinuationInterceptor) coroutineContext.get(ContinuationInterceptor.INSTANCE);
this.dispatcher = continuationInterceptor != null ? continuationInterceptor.toString() : null;
CoroutineName coroutineName = (CoroutineName) coroutineContext.get(CoroutineName.INSTANCE);
this.name = coroutineName != null ? coroutineName.getName() : null;
this.state = debugCoroutineInfoImpl.get_state();
Thread thread = debugCoroutineInfoImpl.lastObservedThread;
this.lastObservedThreadState = (thread == null || (state = thread.getState()) == null) ? null : state.toString();
Thread thread2 = debugCoroutineInfoImpl.lastObservedThread;
this.lastObservedThreadName = thread2 != null ? thread2.getName() : null;
this.lastObservedStackTrace = debugCoroutineInfoImpl.lastObservedStackTrace();
this.sequenceNumber = debugCoroutineInfoImpl.sequenceNumber;
}
}

View File

@ -0,0 +1,17 @@
package kotlinx.coroutines.debug.internal;
import java.lang.ref.ReferenceQueue;
import java.lang.ref.WeakReference;
import kotlin.Metadata;
/* compiled from: ConcurrentWeakMap.kt */
@Metadata(d1 = {"\u0000\u001c\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\b\n\u0000\b\u0000\u0018\u0000*\u0004\b\u0000\u0010\u00012\b\u0012\u0004\u0012\u0002H\u00010\u0002B\u001d\u0012\u0006\u0010\u0003\u001a\u00028\u0000\u0012\u000e\u0010\u0004\u001a\n\u0012\u0004\u0012\u00028\u0000\u0018\u00010\u0005¢\u0006\u0002\u0010\u0006R\u0010\u0010\u0007\u001a\u00020\b8\u0006X\u0087\u0004¢\u0006\u0002\n\u0000¨\u0006\t"}, d2 = {"Lkotlinx/coroutines/debug/internal/HashedWeakRef;", "T", "Ljava/lang/ref/WeakReference;", "ref", "queue", "Ljava/lang/ref/ReferenceQueue;", "(Ljava/lang/Object;Ljava/lang/ref/ReferenceQueue;)V", "hash", "", "kotlinx-coroutines-core"}, k = 1, mv = {1, 8, 0}, xi = 48)
/* loaded from: classes.dex */
public final class HashedWeakRef<T> extends WeakReference<T> {
public final int hash;
public HashedWeakRef(T t, ReferenceQueue<T> referenceQueue) {
super(t, referenceQueue);
this.hash = t != null ? t.hashCode() : 0;
}
}

View File

@ -0,0 +1,14 @@
package kotlinx.coroutines.debug.internal;
import kotlin.Metadata;
/* compiled from: ConcurrentWeakMap.kt */
@Metadata(d1 = {"\u0000\f\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0003\b\u0002\u0018\u00002\u00020\u0001B\u000f\u0012\b\u0010\u0002\u001a\u0004\u0018\u00010\u0001¢\u0006\u0002\u0010\u0003R\u0012\u0010\u0002\u001a\u0004\u0018\u00010\u00018\u0006X\u0087\u0004¢\u0006\u0002\n\u0000¨\u0006\u0004"}, d2 = {"Lkotlinx/coroutines/debug/internal/Marked;", "", "ref", "(Ljava/lang/Object;)V", "kotlinx-coroutines-core"}, k = 1, mv = {1, 8, 0}, xi = 48)
/* loaded from: classes.dex */
final class Marked {
public final Object ref;
public Marked(Object obj) {
this.ref = obj;
}
}

View File

@ -0,0 +1,27 @@
package kotlinx.coroutines.debug.internal;
import kotlin.Metadata;
import kotlin.coroutines.jvm.internal.CoroutineStackFrame;
/* compiled from: StackTraceFrame.kt */
@Metadata(d1 = {"\u0000\u0014\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0005\b\u0000\u0018\u00002\u00020\u0001B\u0017\u0012\b\u0010\u0002\u001a\u0004\u0018\u00010\u0001\u0012\u0006\u0010\u0003\u001a\u00020\u0004¢\u0006\u0002\u0010\u0005J\b\u0010\b\u001a\u00020\u0004H\u0016R\u0016\u0010\u0002\u001a\u0004\u0018\u00010\u0001X\u0096\u0004¢\u0006\b\n\u0000\u001a\u0004\b\u0006\u0010\u0007R\u000e\u0010\u0003\u001a\u00020\u0004X\u0082\u0004¢\u0006\u0002\n\u0000¨\u0006\t"}, d2 = {"Lkotlinx/coroutines/debug/internal/StackTraceFrame;", "Lkotlin/coroutines/jvm/internal/CoroutineStackFrame;", "callerFrame", "stackTraceElement", "Ljava/lang/StackTraceElement;", "(Lkotlin/coroutines/jvm/internal/CoroutineStackFrame;Ljava/lang/StackTraceElement;)V", "getCallerFrame", "()Lkotlin/coroutines/jvm/internal/CoroutineStackFrame;", "getStackTraceElement", "kotlinx-coroutines-core"}, k = 1, mv = {1, 8, 0}, xi = 48)
/* loaded from: classes.dex */
public final class StackTraceFrame implements CoroutineStackFrame {
private final CoroutineStackFrame callerFrame;
private final StackTraceElement stackTraceElement;
@Override // kotlin.coroutines.jvm.internal.CoroutineStackFrame
public CoroutineStackFrame getCallerFrame() {
return this.callerFrame;
}
@Override // kotlin.coroutines.jvm.internal.CoroutineStackFrame
public StackTraceElement getStackTraceElement() {
return this.stackTraceElement;
}
public StackTraceFrame(CoroutineStackFrame coroutineStackFrame, StackTraceElement stackTraceElement) {
this.callerFrame = coroutineStackFrame;
this.stackTraceElement = stackTraceElement;
}
}