ADD week 5
This commit is contained in:
@ -0,0 +1,37 @@
|
||||
package kotlinx.coroutines.channels;
|
||||
|
||||
import java.util.concurrent.CancellationException;
|
||||
import kotlin.Metadata;
|
||||
import kotlin.coroutines.CoroutineContext;
|
||||
import kotlinx.coroutines.CoroutineExceptionHandlerKt;
|
||||
import kotlinx.coroutines.DebugStringsKt;
|
||||
import kotlinx.coroutines.ExceptionsKt;
|
||||
import kotlinx.coroutines.Job;
|
||||
|
||||
/* compiled from: Actor.kt */
|
||||
@Metadata(d1 = {"\u00002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u000b\n\u0002\b\u0003\n\u0002\u0010\u0003\n\u0000\n\u0002\u0010\u0002\n\u0002\b\u0002\b\u0012\u0018\u0000*\u0004\b\u0000\u0010\u00012\b\u0012\u0004\u0012\u0002H\u00010\u00022\b\u0012\u0004\u0012\u0002H\u00010\u0003B#\u0012\u0006\u0010\u0004\u001a\u00020\u0005\u0012\f\u0010\u0006\u001a\b\u0012\u0004\u0012\u00028\u00000\u0007\u0012\u0006\u0010\b\u001a\u00020\t¢\u0006\u0002\u0010\nJ\u0010\u0010\u000b\u001a\u00020\t2\u0006\u0010\f\u001a\u00020\rH\u0014J\u0012\u0010\u000e\u001a\u00020\u000f2\b\u0010\u0010\u001a\u0004\u0018\u00010\rH\u0014¨\u0006\u0011"}, d2 = {"Lkotlinx/coroutines/channels/ActorCoroutine;", "E", "Lkotlinx/coroutines/channels/ChannelCoroutine;", "Lkotlinx/coroutines/channels/ActorScope;", "parentContext", "Lkotlin/coroutines/CoroutineContext;", "channel", "Lkotlinx/coroutines/channels/Channel;", "active", "", "(Lkotlin/coroutines/CoroutineContext;Lkotlinx/coroutines/channels/Channel;Z)V", "handleJobException", "exception", "", "onCancelling", "", "cause", "kotlinx-coroutines-core"}, k = 1, mv = {1, 8, 0}, xi = 48)
|
||||
/* loaded from: classes.dex */
|
||||
class ActorCoroutine<E> extends ChannelCoroutine<E> implements ActorScope<E> {
|
||||
public ActorCoroutine(CoroutineContext coroutineContext, Channel<E> channel, boolean z) {
|
||||
super(coroutineContext, channel, false, z);
|
||||
initParentJob((Job) coroutineContext.get(Job.INSTANCE));
|
||||
}
|
||||
|
||||
@Override // kotlinx.coroutines.JobSupport
|
||||
protected void onCancelling(Throwable cause) {
|
||||
Channel<E> channel = get_channel();
|
||||
if (cause != null) {
|
||||
r1 = cause instanceof CancellationException ? (CancellationException) cause : null;
|
||||
if (r1 == null) {
|
||||
r1 = ExceptionsKt.CancellationException(DebugStringsKt.getClassSimpleName(this) + " was cancelled", cause);
|
||||
}
|
||||
}
|
||||
channel.cancel(r1);
|
||||
}
|
||||
|
||||
@Override // kotlinx.coroutines.JobSupport
|
||||
protected boolean handleJobException(Throwable exception) {
|
||||
CoroutineExceptionHandlerKt.handleCoroutineException(get$context(), exception);
|
||||
return true;
|
||||
}
|
||||
}
|
49
02-Easy5/E5/sources/kotlinx/coroutines/channels/ActorKt.java
Normal file
49
02-Easy5/E5/sources/kotlinx/coroutines/channels/ActorKt.java
Normal file
@ -0,0 +1,49 @@
|
||||
package kotlinx.coroutines.channels;
|
||||
|
||||
import kotlin.Metadata;
|
||||
import kotlin.Unit;
|
||||
import kotlin.coroutines.Continuation;
|
||||
import kotlin.coroutines.CoroutineContext;
|
||||
import kotlin.coroutines.EmptyCoroutineContext;
|
||||
import kotlin.jvm.functions.Function1;
|
||||
import kotlin.jvm.functions.Function2;
|
||||
import kotlinx.coroutines.CoroutineContextKt;
|
||||
import kotlinx.coroutines.CoroutineScope;
|
||||
import kotlinx.coroutines.CoroutineStart;
|
||||
|
||||
/* compiled from: Actor.kt */
|
||||
@Metadata(d1 = {"\u0000R\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\b\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0010\u0003\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\u001a\u009c\u0001\u0010\u0000\u001a\b\u0012\u0004\u0012\u0002H\u00020\u0001\"\u0004\b\u0000\u0010\u0002*\u00020\u00032\b\b\u0002\u0010\u0004\u001a\u00020\u00052\b\b\u0002\u0010\u0006\u001a\u00020\u00072\b\b\u0002\u0010\b\u001a\u00020\t2-\b\u0002\u0010\n\u001a'\u0012\u0015\u0012\u0013\u0018\u00010\f¢\u0006\f\b\r\u0012\b\b\u000e\u0012\u0004\b\b(\u000f\u0012\u0004\u0012\u00020\u0010\u0018\u00010\u000bj\u0004\u0018\u0001`\u00112-\u0010\u0012\u001a)\b\u0001\u0012\n\u0012\b\u0012\u0004\u0012\u0002H\u00020\u0014\u0012\n\u0012\b\u0012\u0004\u0012\u00020\u00100\u0015\u0012\u0006\u0012\u0004\u0018\u00010\u00160\u0013¢\u0006\u0002\b\u0017H\u0007ø\u0001\u0000¢\u0006\u0002\u0010\u0018\u0082\u0002\u0004\n\u0002\b\u0019¨\u0006\u0019"}, d2 = {"actor", "Lkotlinx/coroutines/channels/SendChannel;", "E", "Lkotlinx/coroutines/CoroutineScope;", "context", "Lkotlin/coroutines/CoroutineContext;", "capacity", "", "start", "Lkotlinx/coroutines/CoroutineStart;", "onCompletion", "Lkotlin/Function1;", "", "Lkotlin/ParameterName;", "name", "cause", "", "Lkotlinx/coroutines/CompletionHandler;", "block", "Lkotlin/Function2;", "Lkotlinx/coroutines/channels/ActorScope;", "Lkotlin/coroutines/Continuation;", "", "Lkotlin/ExtensionFunctionType;", "(Lkotlinx/coroutines/CoroutineScope;Lkotlin/coroutines/CoroutineContext;ILkotlinx/coroutines/CoroutineStart;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/channels/SendChannel;", "kotlinx-coroutines-core"}, k = 2, mv = {1, 8, 0}, xi = 48)
|
||||
/* loaded from: classes.dex */
|
||||
public final class ActorKt {
|
||||
public static /* synthetic */ SendChannel actor$default(CoroutineScope coroutineScope, CoroutineContext coroutineContext, int i, CoroutineStart coroutineStart, Function1 function1, Function2 function2, int i2, Object obj) {
|
||||
if ((i2 & 1) != 0) {
|
||||
coroutineContext = EmptyCoroutineContext.INSTANCE;
|
||||
}
|
||||
CoroutineContext coroutineContext2 = coroutineContext;
|
||||
int i3 = (i2 & 2) != 0 ? 0 : i;
|
||||
if ((i2 & 4) != 0) {
|
||||
coroutineStart = CoroutineStart.DEFAULT;
|
||||
}
|
||||
CoroutineStart coroutineStart2 = coroutineStart;
|
||||
if ((i2 & 8) != 0) {
|
||||
function1 = null;
|
||||
}
|
||||
return actor(coroutineScope, coroutineContext2, i3, coroutineStart2, function1, function2);
|
||||
}
|
||||
|
||||
public static final <E> SendChannel<E> actor(CoroutineScope coroutineScope, CoroutineContext coroutineContext, int i, CoroutineStart coroutineStart, Function1<? super Throwable, Unit> function1, Function2<? super ActorScope<E>, ? super Continuation<? super Unit>, ? extends Object> function2) {
|
||||
LazyActorCoroutine actorCoroutine;
|
||||
CoroutineContext newCoroutineContext = CoroutineContextKt.newCoroutineContext(coroutineScope, coroutineContext);
|
||||
Channel Channel$default = ChannelKt.Channel$default(i, null, null, 6, null);
|
||||
if (coroutineStart.isLazy()) {
|
||||
actorCoroutine = new LazyActorCoroutine(newCoroutineContext, Channel$default, function2);
|
||||
} else {
|
||||
actorCoroutine = new ActorCoroutine(newCoroutineContext, Channel$default, true);
|
||||
}
|
||||
if (function1 != null) {
|
||||
actorCoroutine.invokeOnCompletion(function1);
|
||||
}
|
||||
actorCoroutine.start(coroutineStart, actorCoroutine, function2);
|
||||
return actorCoroutine;
|
||||
}
|
||||
}
|
@ -0,0 +1,35 @@
|
||||
package kotlinx.coroutines.channels;
|
||||
|
||||
import kotlin.Deprecated;
|
||||
import kotlin.DeprecationLevel;
|
||||
import kotlin.Metadata;
|
||||
import kotlin.ReplaceWith;
|
||||
import kotlin.coroutines.Continuation;
|
||||
import kotlinx.coroutines.CoroutineScope;
|
||||
import kotlinx.coroutines.channels.ReceiveChannel;
|
||||
import kotlinx.coroutines.selects.SelectClause1;
|
||||
|
||||
/* compiled from: Actor.kt */
|
||||
@Metadata(d1 = {"\u0000\u0018\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0003\bg\u0018\u0000*\u0004\b\u0000\u0010\u00012\u00020\u00022\b\u0012\u0004\u0012\u0002H\u00010\u0003R\u0018\u0010\u0004\u001a\b\u0012\u0004\u0012\u00028\u00000\u0005X¦\u0004¢\u0006\u0006\u001a\u0004\b\u0006\u0010\u0007¨\u0006\b"}, d2 = {"Lkotlinx/coroutines/channels/ActorScope;", "E", "Lkotlinx/coroutines/CoroutineScope;", "Lkotlinx/coroutines/channels/ReceiveChannel;", "channel", "Lkotlinx/coroutines/channels/Channel;", "getChannel", "()Lkotlinx/coroutines/channels/Channel;", "kotlinx-coroutines-core"}, k = 1, mv = {1, 8, 0}, xi = 48)
|
||||
/* loaded from: classes.dex */
|
||||
public interface ActorScope<E> extends CoroutineScope, ReceiveChannel<E> {
|
||||
Channel<E> getChannel();
|
||||
|
||||
/* compiled from: Actor.kt */
|
||||
@Metadata(k = 3, mv = {1, 8, 0}, xi = 48)
|
||||
public static final class DefaultImpls {
|
||||
public static <E> SelectClause1<E> getOnReceiveOrNull(ActorScope<E> actorScope) {
|
||||
return ReceiveChannel.DefaultImpls.getOnReceiveOrNull(actorScope);
|
||||
}
|
||||
|
||||
@Deprecated(level = DeprecationLevel.ERROR, message = "Deprecated in the favour of 'tryReceive'. Please note that the provided replacement does not rethrow channel's close cause as 'poll' did, for the precise replacement please refer to the 'poll' documentation", replaceWith = @ReplaceWith(expression = "tryReceive().getOrNull()", imports = {}))
|
||||
public static <E> E poll(ActorScope<E> actorScope) {
|
||||
return (E) ReceiveChannel.DefaultImpls.poll(actorScope);
|
||||
}
|
||||
|
||||
@Deprecated(level = DeprecationLevel.ERROR, message = "Deprecated in favor of 'receiveCatching'. Please note that the provided replacement does not rethrow channel's close cause as 'receiveOrNull' did, for the detailed replacement please refer to the 'receiveOrNull' documentation", replaceWith = @ReplaceWith(expression = "receiveCatching().getOrNull()", imports = {}))
|
||||
public static <E> Object receiveOrNull(ActorScope<E> actorScope, Continuation<? super E> continuation) {
|
||||
return ReceiveChannel.DefaultImpls.receiveOrNull(actorScope, continuation);
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,50 @@
|
||||
package kotlinx.coroutines.channels;
|
||||
|
||||
import java.util.concurrent.CancellationException;
|
||||
import kotlin.Deprecated;
|
||||
import kotlin.DeprecationLevel;
|
||||
import kotlin.Metadata;
|
||||
import kotlin.ReplaceWith;
|
||||
import kotlinx.coroutines.channels.SendChannel;
|
||||
|
||||
/* compiled from: BroadcastChannel.kt */
|
||||
@Deprecated(level = DeprecationLevel.WARNING, message = "BroadcastChannel is deprecated in the favour of SharedFlow and is no longer supported")
|
||||
@Metadata(d1 = {"\u0000*\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u000b\n\u0000\n\u0002\u0010\u0003\n\u0002\u0010\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\bg\u0018\u0000*\u0004\b\u0000\u0010\u00012\b\u0012\u0004\u0012\u0002H\u00010\u0002J\u0014\u0010\u0003\u001a\u00020\u00042\n\b\u0002\u0010\u0005\u001a\u0004\u0018\u00010\u0006H'J\u001a\u0010\u0003\u001a\u00020\u00072\u0010\b\u0002\u0010\u0005\u001a\n\u0018\u00010\bj\u0004\u0018\u0001`\tH&J\u000e\u0010\n\u001a\b\u0012\u0004\u0012\u00028\u00000\u000bH&¨\u0006\f"}, d2 = {"Lkotlinx/coroutines/channels/BroadcastChannel;", "E", "Lkotlinx/coroutines/channels/SendChannel;", "cancel", "", "cause", "", "", "Ljava/util/concurrent/CancellationException;", "Lkotlinx/coroutines/CancellationException;", "openSubscription", "Lkotlinx/coroutines/channels/ReceiveChannel;", "kotlinx-coroutines-core"}, k = 1, mv = {1, 8, 0}, xi = 48)
|
||||
/* loaded from: classes.dex */
|
||||
public interface BroadcastChannel<E> extends SendChannel<E> {
|
||||
void cancel(CancellationException cause);
|
||||
|
||||
@Deprecated(level = DeprecationLevel.HIDDEN, message = "Binary compatibility only")
|
||||
/* synthetic */ boolean cancel(Throwable cause);
|
||||
|
||||
ReceiveChannel<E> openSubscription();
|
||||
|
||||
/* compiled from: BroadcastChannel.kt */
|
||||
@Metadata(k = 3, mv = {1, 8, 0}, xi = 48)
|
||||
public static final class DefaultImpls {
|
||||
@Deprecated(level = DeprecationLevel.ERROR, message = "Deprecated in the favour of 'trySend' method", replaceWith = @ReplaceWith(expression = "trySend(element).isSuccess", imports = {}))
|
||||
public static <E> boolean offer(BroadcastChannel<E> broadcastChannel, E e) {
|
||||
return SendChannel.DefaultImpls.offer(broadcastChannel, e);
|
||||
}
|
||||
|
||||
public static /* synthetic */ void cancel$default(BroadcastChannel broadcastChannel, CancellationException cancellationException, int i, Object obj) {
|
||||
if (obj != null) {
|
||||
throw new UnsupportedOperationException("Super calls with default arguments not supported in this target, function: cancel");
|
||||
}
|
||||
if ((i & 1) != 0) {
|
||||
cancellationException = null;
|
||||
}
|
||||
broadcastChannel.cancel(cancellationException);
|
||||
}
|
||||
|
||||
public static /* synthetic */ boolean cancel$default(BroadcastChannel broadcastChannel, Throwable th, int i, Object obj) {
|
||||
if (obj != null) {
|
||||
throw new UnsupportedOperationException("Super calls with default arguments not supported in this target, function: cancel");
|
||||
}
|
||||
if ((i & 1) != 0) {
|
||||
th = null;
|
||||
}
|
||||
return broadcastChannel.cancel(th);
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,102 @@
|
||||
package kotlinx.coroutines.channels;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.concurrent.locks.ReentrantLock;
|
||||
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.SuspendLambda;
|
||||
import kotlin.jvm.functions.Function2;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
import kotlinx.coroutines.CoroutineScope;
|
||||
import kotlinx.coroutines.DebugKt;
|
||||
import kotlinx.coroutines.selects.SelectImplementation;
|
||||
import kotlinx.coroutines.selects.SelectInstance;
|
||||
import kotlinx.coroutines.selects.TrySelectDetailedResult;
|
||||
|
||||
/* compiled from: BroadcastChannel.kt */
|
||||
@Metadata(d1 = {"\u0000\f\n\u0000\n\u0002\u0018\u0002\n\u0002\u0010\u0002\n\u0000\u0010\u0003\u001a\u00020\u0002\"\u0004\b\u0000\u0010\u0000*\u00020\u0001H\u008a@"}, d2 = {"E", "Lkotlinx/coroutines/CoroutineScope;", "", "<anonymous>"}, k = 3, mv = {1, 8, 0})
|
||||
@DebugMetadata(c = "kotlinx.coroutines.channels.BroadcastChannelImpl$registerSelectForSend$2", f = "BroadcastChannel.kt", i = {}, l = {291}, m = "invokeSuspend", n = {}, s = {})
|
||||
/* loaded from: classes.dex */
|
||||
final class BroadcastChannelImpl$registerSelectForSend$2 extends SuspendLambda implements Function2<CoroutineScope, Continuation<? super Unit>, Object> {
|
||||
final /* synthetic */ Object $element;
|
||||
final /* synthetic */ SelectInstance<?> $select;
|
||||
int label;
|
||||
final /* synthetic */ BroadcastChannelImpl<E> this$0;
|
||||
|
||||
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
||||
BroadcastChannelImpl$registerSelectForSend$2(BroadcastChannelImpl<E> broadcastChannelImpl, Object obj, SelectInstance<?> selectInstance, Continuation<? super BroadcastChannelImpl$registerSelectForSend$2> continuation) {
|
||||
super(2, continuation);
|
||||
this.this$0 = broadcastChannelImpl;
|
||||
this.$element = obj;
|
||||
this.$select = selectInstance;
|
||||
}
|
||||
|
||||
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
||||
public final Continuation<Unit> create(Object obj, Continuation<?> continuation) {
|
||||
return new BroadcastChannelImpl$registerSelectForSend$2(this.this$0, this.$element, this.$select, continuation);
|
||||
}
|
||||
|
||||
@Override // kotlin.jvm.functions.Function2
|
||||
public final Object invoke(CoroutineScope coroutineScope, Continuation<? super Unit> continuation) {
|
||||
return ((BroadcastChannelImpl$registerSelectForSend$2) create(coroutineScope, continuation)).invokeSuspend(Unit.INSTANCE);
|
||||
}
|
||||
|
||||
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
||||
public final Object invokeSuspend(Object obj) {
|
||||
HashMap hashMap;
|
||||
HashMap hashMap2;
|
||||
HashMap hashMap3;
|
||||
Object coroutine_suspended = IntrinsicsKt.getCOROUTINE_SUSPENDED();
|
||||
int i = this.label;
|
||||
boolean z = true;
|
||||
try {
|
||||
if (i == 0) {
|
||||
ResultKt.throwOnFailure(obj);
|
||||
this.label = 1;
|
||||
if (this.this$0.send(this.$element, this) == coroutine_suspended) {
|
||||
return coroutine_suspended;
|
||||
}
|
||||
} else {
|
||||
if (i != 1) {
|
||||
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
|
||||
}
|
||||
ResultKt.throwOnFailure(obj);
|
||||
}
|
||||
} catch (Throwable th) {
|
||||
if (!this.this$0.isClosedForSend() || (!(th instanceof ClosedSendChannelException) && this.this$0.getSendException() != th)) {
|
||||
throw th;
|
||||
}
|
||||
z = false;
|
||||
}
|
||||
ReentrantLock reentrantLock = ((BroadcastChannelImpl) this.this$0).lock;
|
||||
BroadcastChannelImpl<E> broadcastChannelImpl = this.this$0;
|
||||
SelectInstance<?> selectInstance = this.$select;
|
||||
ReentrantLock reentrantLock2 = reentrantLock;
|
||||
reentrantLock2.lock();
|
||||
try {
|
||||
if (DebugKt.getASSERTIONS_ENABLED()) {
|
||||
hashMap3 = ((BroadcastChannelImpl) broadcastChannelImpl).onSendInternalResult;
|
||||
if (hashMap3.get(selectInstance) != null) {
|
||||
throw new AssertionError();
|
||||
}
|
||||
}
|
||||
hashMap = ((BroadcastChannelImpl) broadcastChannelImpl).onSendInternalResult;
|
||||
hashMap.put(selectInstance, z ? Unit.INSTANCE : BufferedChannelKt.getCHANNEL_CLOSED());
|
||||
Intrinsics.checkNotNull(selectInstance, "null cannot be cast to non-null type kotlinx.coroutines.selects.SelectImplementation<*>");
|
||||
if (((SelectImplementation) selectInstance).trySelectDetailed(broadcastChannelImpl, Unit.INSTANCE) != TrySelectDetailedResult.REREGISTER) {
|
||||
hashMap2 = ((BroadcastChannelImpl) broadcastChannelImpl).onSendInternalResult;
|
||||
hashMap2.remove(selectInstance);
|
||||
}
|
||||
Unit unit = Unit.INSTANCE;
|
||||
reentrantLock2.unlock();
|
||||
return Unit.INSTANCE;
|
||||
} catch (Throwable th2) {
|
||||
reentrantLock2.unlock();
|
||||
throw th2;
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,32 @@
|
||||
package kotlinx.coroutines.channels;
|
||||
|
||||
import kotlin.Metadata;
|
||||
import kotlin.coroutines.Continuation;
|
||||
import kotlin.coroutines.jvm.internal.ContinuationImpl;
|
||||
import kotlin.coroutines.jvm.internal.DebugMetadata;
|
||||
|
||||
/* compiled from: BroadcastChannel.kt */
|
||||
@Metadata(k = 3, mv = {1, 8, 0}, xi = 48)
|
||||
@DebugMetadata(c = "kotlinx.coroutines.channels.BroadcastChannelImpl", f = "BroadcastChannel.kt", i = {0, 0}, l = {230}, m = "send", n = {"this", "element"}, s = {"L$0", "L$1"})
|
||||
/* loaded from: classes.dex */
|
||||
final class BroadcastChannelImpl$send$1 extends ContinuationImpl {
|
||||
Object L$0;
|
||||
Object L$1;
|
||||
Object L$2;
|
||||
int label;
|
||||
/* synthetic */ Object result;
|
||||
final /* synthetic */ BroadcastChannelImpl<E> this$0;
|
||||
|
||||
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
||||
BroadcastChannelImpl$send$1(BroadcastChannelImpl<E> broadcastChannelImpl, Continuation<? super BroadcastChannelImpl$send$1> continuation) {
|
||||
super(continuation);
|
||||
this.this$0 = broadcastChannelImpl;
|
||||
}
|
||||
|
||||
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
||||
public final Object invokeSuspend(Object obj) {
|
||||
this.result = obj;
|
||||
this.label |= Integer.MIN_VALUE;
|
||||
return this.this$0.send(null, this);
|
||||
}
|
||||
}
|
@ -0,0 +1,416 @@
|
||||
package kotlinx.coroutines.channels;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.locks.ReentrantLock;
|
||||
import kotlin.Metadata;
|
||||
import kotlin.Unit;
|
||||
import kotlin.collections.CollectionsKt;
|
||||
import kotlinx.coroutines.BuildersKt__Builders_commonKt;
|
||||
import kotlinx.coroutines.CoroutineScopeKt;
|
||||
import kotlinx.coroutines.CoroutineStart;
|
||||
import kotlinx.coroutines.internal.Symbol;
|
||||
import kotlinx.coroutines.selects.SelectInstance;
|
||||
|
||||
/* compiled from: BroadcastChannel.kt */
|
||||
@Metadata(d1 = {"\u0000j\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\b\n\u0002\b\u0004\n\u0002\u0010\u000b\n\u0002\b\u0002\n\u0002\u0010\u0000\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010 \n\u0002\b\n\n\u0002\u0010\u0003\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0002\n\u0002\b\u0007\n\u0002\u0010\u000e\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0005\b\u0000\u0018\u0000*\u0004\b\u0000\u0010\u00012\b\u0012\u0004\u0012\u0002H\u00010\u00022\b\u0012\u0004\u0012\u0002H\u00010\u0003:\u000245B\r\u0012\u0006\u0010\u0004\u001a\u00020\u0005¢\u0006\u0002\u0010\u0006J\u0017\u0010\u001f\u001a\u00020\n2\b\u0010 \u001a\u0004\u0018\u00010!H\u0010¢\u0006\u0002\b\"J\u0012\u0010#\u001a\u00020\n2\b\u0010 \u001a\u0004\u0018\u00010!H\u0016J\u000e\u0010$\u001a\b\u0012\u0004\u0012\u00028\u00000%H\u0016J\u001e\u0010&\u001a\u00020'2\n\u0010(\u001a\u0006\u0012\u0002\b\u00030\u00132\b\u0010)\u001a\u0004\u0018\u00010\rH\u0014J\u0016\u0010*\u001a\u00020'2\f\u0010+\u001a\b\u0012\u0004\u0012\u00028\u00000%H\u0002J\u0019\u0010,\u001a\u00020'2\u0006\u0010)\u001a\u00028\u0000H\u0096@ø\u0001\u0000¢\u0006\u0002\u0010-J\b\u0010.\u001a\u00020/H\u0016J&\u00100\u001a\b\u0012\u0004\u0012\u00020'012\u0006\u0010)\u001a\u00028\u0000H\u0016ø\u0001\u0001ø\u0001\u0002ø\u0001\u0000¢\u0006\u0004\b2\u00103R\u0011\u0010\u0004\u001a\u00020\u0005¢\u0006\b\n\u0000\u001a\u0004\b\u0007\u0010\bR\u0014\u0010\t\u001a\u00020\n8VX\u0096\u0004¢\u0006\u0006\u001a\u0004\b\t\u0010\u000bR\u0010\u0010\f\u001a\u0004\u0018\u00010\rX\u0082\u000e¢\u0006\u0002\n\u0000R\u0012\u0010\u000e\u001a\u00060\u000fj\u0002`\u0010X\u0082\u0004¢\u0006\u0002\n\u0000R6\u0010\u0011\u001a*\u0012\b\u0012\u0006\u0012\u0002\b\u00030\u0013\u0012\u0006\u0012\u0004\u0018\u00010\r0\u0012j\u0014\u0012\b\u0012\u0006\u0012\u0002\b\u00030\u0013\u0012\u0006\u0012\u0004\u0018\u00010\r`\u0014X\u0082\u0004¢\u0006\u0002\n\u0000R\u001a\u0010\u0015\u001a\u000e\u0012\n\u0012\b\u0012\u0004\u0012\u00028\u00000\u00020\u0016X\u0082\u000e¢\u0006\u0002\n\u0000R\u0017\u0010\u0017\u001a\u00028\u00008F¢\u0006\f\u0012\u0004\b\u0018\u0010\u0019\u001a\u0004\b\u001a\u0010\u001bR\u0019\u0010\u001c\u001a\u0004\u0018\u00018\u00008F¢\u0006\f\u0012\u0004\b\u001d\u0010\u0019\u001a\u0004\b\u001e\u0010\u001b\u0082\u0002\u000f\n\u0002\b\u0019\n\u0002\b!\n\u0005\b¡\u001e0\u0001¨\u00066"}, d2 = {"Lkotlinx/coroutines/channels/BroadcastChannelImpl;", "E", "Lkotlinx/coroutines/channels/BufferedChannel;", "Lkotlinx/coroutines/channels/BroadcastChannel;", "capacity", "", "(I)V", "getCapacity", "()I", "isClosedForSend", "", "()Z", "lastConflatedElement", "", "lock", "Ljava/util/concurrent/locks/ReentrantLock;", "Lkotlinx/coroutines/internal/ReentrantLock;", "onSendInternalResult", "Ljava/util/HashMap;", "Lkotlinx/coroutines/selects/SelectInstance;", "Lkotlin/collections/HashMap;", "subscribers", "", "value", "getValue$annotations", "()V", "getValue", "()Ljava/lang/Object;", "valueOrNull", "getValueOrNull$annotations", "getValueOrNull", "cancelImpl", "cause", "", "cancelImpl$kotlinx_coroutines_core", "close", "openSubscription", "Lkotlinx/coroutines/channels/ReceiveChannel;", "registerSelectForSend", "", "select", "element", "removeSubscriber", "s", "send", "(Ljava/lang/Object;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;", "toString", "", "trySend", "Lkotlinx/coroutines/channels/ChannelResult;", "trySend-JP2dKIU", "(Ljava/lang/Object;)Ljava/lang/Object;", "SubscriberBuffered", "SubscriberConflated", "kotlinx-coroutines-core"}, k = 1, mv = {1, 8, 0}, xi = 48)
|
||||
/* loaded from: classes.dex */
|
||||
public final class BroadcastChannelImpl<E> extends BufferedChannel<E> implements BroadcastChannel<E> {
|
||||
private final int capacity;
|
||||
private Object lastConflatedElement;
|
||||
private final ReentrantLock lock;
|
||||
private final HashMap<SelectInstance<?>, Object> onSendInternalResult;
|
||||
private List<? extends BufferedChannel<E>> subscribers;
|
||||
|
||||
public static /* synthetic */ void getValue$annotations() {
|
||||
}
|
||||
|
||||
public static /* synthetic */ void getValueOrNull$annotations() {
|
||||
}
|
||||
|
||||
public final int getCapacity() {
|
||||
return this.capacity;
|
||||
}
|
||||
|
||||
public BroadcastChannelImpl(int i) {
|
||||
super(0, null);
|
||||
Symbol symbol;
|
||||
this.capacity = i;
|
||||
if (i < 1 && i != -1) {
|
||||
throw new IllegalArgumentException(("BroadcastChannel capacity must be positive or Channel.CONFLATED, but " + i + " was specified").toString());
|
||||
}
|
||||
this.lock = new ReentrantLock();
|
||||
this.subscribers = CollectionsKt.emptyList();
|
||||
symbol = BroadcastChannelKt.NO_ELEMENT;
|
||||
this.lastConflatedElement = symbol;
|
||||
this.onSendInternalResult = new HashMap<>();
|
||||
}
|
||||
|
||||
/* JADX WARN: Multi-variable type inference failed */
|
||||
/* JADX WARN: Removed duplicated region for block: B:20:0x0068 */
|
||||
/* JADX WARN: Removed duplicated region for block: B:24:0x0096 */
|
||||
/* JADX WARN: Removed duplicated region for block: B:28:0x003c */
|
||||
/* JADX WARN: Removed duplicated region for block: B:8:0x0024 */
|
||||
/* JADX WARN: Unsupported multi-entry loop pattern (BACK_EDGE: B:23:0x007d -> B:10:0x0080). Please report as a decompilation issue!!! */
|
||||
@Override // kotlinx.coroutines.channels.BufferedChannel, kotlinx.coroutines.channels.SendChannel
|
||||
/*
|
||||
Code decompiled incorrectly, please refer to instructions dump.
|
||||
To view partially-correct add '--show-bad-code' argument
|
||||
*/
|
||||
public java.lang.Object send(E r7, kotlin.coroutines.Continuation<? super kotlin.Unit> r8) {
|
||||
/*
|
||||
r6 = this;
|
||||
boolean r0 = r8 instanceof kotlinx.coroutines.channels.BroadcastChannelImpl$send$1
|
||||
if (r0 == 0) goto L14
|
||||
r0 = r8
|
||||
kotlinx.coroutines.channels.BroadcastChannelImpl$send$1 r0 = (kotlinx.coroutines.channels.BroadcastChannelImpl$send$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.channels.BroadcastChannelImpl$send$1 r0 = new kotlinx.coroutines.channels.BroadcastChannelImpl$send$1
|
||||
r0.<init>(r6, 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 L3c
|
||||
if (r2 != r3) goto L34
|
||||
java.lang.Object r7 = r0.L$2
|
||||
java.util.Iterator r7 = (java.util.Iterator) r7
|
||||
java.lang.Object r2 = r0.L$1
|
||||
java.lang.Object r4 = r0.L$0
|
||||
kotlinx.coroutines.channels.BroadcastChannelImpl r4 = (kotlinx.coroutines.channels.BroadcastChannelImpl) r4
|
||||
kotlin.ResultKt.throwOnFailure(r8)
|
||||
goto L80
|
||||
L34:
|
||||
java.lang.IllegalStateException r7 = new java.lang.IllegalStateException
|
||||
java.lang.String r8 = "call to 'resume' before 'invoke' with coroutine"
|
||||
r7.<init>(r8)
|
||||
throw r7
|
||||
L3c:
|
||||
kotlin.ResultKt.throwOnFailure(r8)
|
||||
java.util.concurrent.locks.ReentrantLock r8 = r6.lock
|
||||
java.util.concurrent.locks.Lock r8 = (java.util.concurrent.locks.Lock) r8
|
||||
r8.lock()
|
||||
boolean r2 = r6.isClosedForSend() // Catch: java.lang.Throwable -> L9e
|
||||
if (r2 != 0) goto L99
|
||||
int r2 = r6.capacity // Catch: java.lang.Throwable -> L9e
|
||||
r4 = -1
|
||||
if (r2 != r4) goto L53
|
||||
r6.lastConflatedElement = r7 // Catch: java.lang.Throwable -> L9e
|
||||
L53:
|
||||
java.util.List<? extends kotlinx.coroutines.channels.BufferedChannel<E>> r2 = r6.subscribers // Catch: java.lang.Throwable -> L9e
|
||||
r8.unlock()
|
||||
java.lang.Iterable r2 = (java.lang.Iterable) r2
|
||||
java.util.Iterator r8 = r2.iterator()
|
||||
r4 = r6
|
||||
r5 = r8
|
||||
r8 = r7
|
||||
r7 = r5
|
||||
L62:
|
||||
boolean r2 = r7.hasNext()
|
||||
if (r2 == 0) goto L96
|
||||
java.lang.Object r2 = r7.next()
|
||||
kotlinx.coroutines.channels.BufferedChannel r2 = (kotlinx.coroutines.channels.BufferedChannel) r2
|
||||
r0.L$0 = r4
|
||||
r0.L$1 = r8
|
||||
r0.L$2 = r7
|
||||
r0.label = r3
|
||||
java.lang.Object r2 = r2.sendBroadcast$kotlinx_coroutines_core(r8, r0)
|
||||
if (r2 != r1) goto L7d
|
||||
return r1
|
||||
L7d:
|
||||
r5 = r2
|
||||
r2 = r8
|
||||
r8 = r5
|
||||
L80:
|
||||
java.lang.Boolean r8 = (java.lang.Boolean) r8
|
||||
boolean r8 = r8.booleanValue()
|
||||
if (r8 != 0) goto L94
|
||||
boolean r8 = r4.isClosedForSend()
|
||||
if (r8 != 0) goto L8f
|
||||
goto L94
|
||||
L8f:
|
||||
java.lang.Throwable r7 = r4.getSendException()
|
||||
throw r7
|
||||
L94:
|
||||
r8 = r2
|
||||
goto L62
|
||||
L96:
|
||||
kotlin.Unit r7 = kotlin.Unit.INSTANCE
|
||||
return r7
|
||||
L99:
|
||||
java.lang.Throwable r7 = r6.getSendException() // Catch: java.lang.Throwable -> L9e
|
||||
throw r7 // Catch: java.lang.Throwable -> L9e
|
||||
L9e:
|
||||
r7 = move-exception
|
||||
r8.unlock()
|
||||
throw r7
|
||||
*/
|
||||
throw new UnsupportedOperationException("Method not decompiled: kotlinx.coroutines.channels.BroadcastChannelImpl.send(java.lang.Object, kotlin.coroutines.Continuation):java.lang.Object");
|
||||
}
|
||||
|
||||
/* compiled from: BroadcastChannel.kt */
|
||||
@Metadata(d1 = {"\u0000\u0018\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\u000b\n\u0000\n\u0002\u0010\u0003\n\u0000\b\u0082\u0004\u0018\u00002\b\u0012\u0004\u0012\u00028\u00000\u0001B\u0005¢\u0006\u0002\u0010\u0002J\u0012\u0010\u0003\u001a\u00020\u00042\b\u0010\u0005\u001a\u0004\u0018\u00010\u0006H\u0016¨\u0006\u0007"}, d2 = {"Lkotlinx/coroutines/channels/BroadcastChannelImpl$SubscriberBuffered;", "Lkotlinx/coroutines/channels/BufferedChannel;", "(Lkotlinx/coroutines/channels/BroadcastChannelImpl;)V", "cancelImpl", "", "cause", "", "kotlinx-coroutines-core"}, k = 1, mv = {1, 8, 0}, xi = 48)
|
||||
private final class SubscriberBuffered extends BufferedChannel<E> {
|
||||
/* JADX WARN: Multi-variable type inference failed */
|
||||
public SubscriberBuffered() {
|
||||
super(BroadcastChannelImpl.this.getCapacity(), null, 2, 0 == true ? 1 : 0);
|
||||
}
|
||||
|
||||
@Override // kotlinx.coroutines.channels.BufferedChannel
|
||||
/* renamed from: cancelImpl, reason: merged with bridge method [inline-methods] */
|
||||
public boolean cancelImpl$kotlinx_coroutines_core(Throwable cause) {
|
||||
ReentrantLock reentrantLock = ((BroadcastChannelImpl) BroadcastChannelImpl.this).lock;
|
||||
BroadcastChannelImpl<E> broadcastChannelImpl = BroadcastChannelImpl.this;
|
||||
ReentrantLock reentrantLock2 = reentrantLock;
|
||||
reentrantLock2.lock();
|
||||
try {
|
||||
broadcastChannelImpl.removeSubscriber(this);
|
||||
return super.cancelImpl$kotlinx_coroutines_core(cause);
|
||||
} finally {
|
||||
reentrantLock2.unlock();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* compiled from: BroadcastChannel.kt */
|
||||
@Metadata(d1 = {"\u0000\u0018\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\u000b\n\u0000\n\u0002\u0010\u0003\n\u0000\b\u0082\u0004\u0018\u00002\b\u0012\u0004\u0012\u00028\u00000\u0001B\u0005¢\u0006\u0002\u0010\u0002J\u0012\u0010\u0003\u001a\u00020\u00042\b\u0010\u0005\u001a\u0004\u0018\u00010\u0006H\u0016¨\u0006\u0007"}, d2 = {"Lkotlinx/coroutines/channels/BroadcastChannelImpl$SubscriberConflated;", "Lkotlinx/coroutines/channels/ConflatedBufferedChannel;", "(Lkotlinx/coroutines/channels/BroadcastChannelImpl;)V", "cancelImpl", "", "cause", "", "kotlinx-coroutines-core"}, k = 1, mv = {1, 8, 0}, xi = 48)
|
||||
private final class SubscriberConflated extends ConflatedBufferedChannel<E> {
|
||||
public SubscriberConflated() {
|
||||
super(1, BufferOverflow.DROP_OLDEST, null, 4, null);
|
||||
}
|
||||
|
||||
@Override // kotlinx.coroutines.channels.BufferedChannel
|
||||
/* renamed from: cancelImpl, reason: merged with bridge method [inline-methods] */
|
||||
public boolean cancelImpl$kotlinx_coroutines_core(Throwable cause) {
|
||||
BroadcastChannelImpl.this.removeSubscriber(this);
|
||||
return super.cancelImpl$kotlinx_coroutines_core(cause);
|
||||
}
|
||||
}
|
||||
|
||||
@Override // kotlinx.coroutines.channels.BufferedChannel
|
||||
public String toString() {
|
||||
Symbol symbol;
|
||||
String str;
|
||||
StringBuilder sb = new StringBuilder();
|
||||
Object obj = this.lastConflatedElement;
|
||||
symbol = BroadcastChannelKt.NO_ELEMENT;
|
||||
if (obj != symbol) {
|
||||
str = "CONFLATED_ELEMENT=" + this.lastConflatedElement + "; ";
|
||||
} else {
|
||||
str = "";
|
||||
}
|
||||
sb.append(str);
|
||||
sb.append("BROADCAST=<");
|
||||
sb.append(super.toString());
|
||||
sb.append(">; SUBSCRIBERS=");
|
||||
sb.append(CollectionsKt.joinToString$default(this.subscribers, ";", "<", ">", 0, null, null, 56, null));
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
@Override // kotlinx.coroutines.channels.BroadcastChannel
|
||||
public ReceiveChannel<E> openSubscription() {
|
||||
Symbol symbol;
|
||||
Symbol symbol2;
|
||||
ReentrantLock reentrantLock = this.lock;
|
||||
reentrantLock.lock();
|
||||
try {
|
||||
BufferedChannel subscriberConflated = this.capacity == -1 ? new SubscriberConflated() : new SubscriberBuffered();
|
||||
if (isClosedForSend()) {
|
||||
Object obj = this.lastConflatedElement;
|
||||
symbol2 = BroadcastChannelKt.NO_ELEMENT;
|
||||
if (obj == symbol2) {
|
||||
subscriberConflated.close(getCloseCause());
|
||||
return subscriberConflated;
|
||||
}
|
||||
}
|
||||
Object obj2 = this.lastConflatedElement;
|
||||
symbol = BroadcastChannelKt.NO_ELEMENT;
|
||||
if (obj2 != symbol) {
|
||||
subscriberConflated.mo1852trySendJP2dKIU(getValue());
|
||||
}
|
||||
this.subscribers = CollectionsKt.plus((Collection<? extends BufferedChannel>) this.subscribers, subscriberConflated);
|
||||
reentrantLock.unlock();
|
||||
return subscriberConflated;
|
||||
} finally {
|
||||
reentrantLock.unlock();
|
||||
}
|
||||
}
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: private */
|
||||
public final void removeSubscriber(ReceiveChannel<? extends E> s) {
|
||||
ReentrantLock reentrantLock = this.lock;
|
||||
reentrantLock.lock();
|
||||
try {
|
||||
List<? extends BufferedChannel<E>> list = this.subscribers;
|
||||
ArrayList arrayList = new ArrayList();
|
||||
Iterator<T> it = list.iterator();
|
||||
while (it.hasNext()) {
|
||||
BufferedChannel bufferedChannel = (Object) it.next();
|
||||
if (bufferedChannel != s) {
|
||||
arrayList.add(bufferedChannel);
|
||||
}
|
||||
}
|
||||
this.subscribers = arrayList;
|
||||
Unit unit = Unit.INSTANCE;
|
||||
} finally {
|
||||
reentrantLock.unlock();
|
||||
}
|
||||
}
|
||||
|
||||
@Override // kotlinx.coroutines.channels.BufferedChannel, kotlinx.coroutines.channels.SendChannel
|
||||
/* renamed from: trySend-JP2dKIU, reason: not valid java name */
|
||||
public Object mo1852trySendJP2dKIU(E element) {
|
||||
ReentrantLock reentrantLock = this.lock;
|
||||
reentrantLock.lock();
|
||||
try {
|
||||
if (isClosedForSend()) {
|
||||
return super.mo1852trySendJP2dKIU(element);
|
||||
}
|
||||
List<? extends BufferedChannel<E>> list = this.subscribers;
|
||||
if (!(list instanceof Collection) || !list.isEmpty()) {
|
||||
Iterator<T> it = list.iterator();
|
||||
while (it.hasNext()) {
|
||||
if (((BufferedChannel) it.next()).shouldSendSuspend$kotlinx_coroutines_core()) {
|
||||
return ChannelResult.INSTANCE.m1876failurePtdJZtk();
|
||||
}
|
||||
}
|
||||
}
|
||||
if (this.capacity == -1) {
|
||||
this.lastConflatedElement = element;
|
||||
}
|
||||
Iterator<T> it2 = this.subscribers.iterator();
|
||||
while (it2.hasNext()) {
|
||||
((BufferedChannel) it2.next()).mo1852trySendJP2dKIU(element);
|
||||
}
|
||||
return ChannelResult.INSTANCE.m1877successJP2dKIU(Unit.INSTANCE);
|
||||
} finally {
|
||||
reentrantLock.unlock();
|
||||
}
|
||||
}
|
||||
|
||||
@Override // kotlinx.coroutines.channels.BufferedChannel
|
||||
protected void registerSelectForSend(SelectInstance<?> select, Object element) {
|
||||
ReentrantLock reentrantLock = this.lock;
|
||||
reentrantLock.lock();
|
||||
try {
|
||||
Object remove = this.onSendInternalResult.remove(select);
|
||||
if (remove != null) {
|
||||
select.selectInRegistrationPhase(remove);
|
||||
return;
|
||||
}
|
||||
Unit unit = Unit.INSTANCE;
|
||||
reentrantLock.unlock();
|
||||
BuildersKt__Builders_commonKt.launch$default(CoroutineScopeKt.CoroutineScope(select.getContext()), null, CoroutineStart.UNDISPATCHED, new BroadcastChannelImpl$registerSelectForSend$2(this, element, select, null), 1, null);
|
||||
} finally {
|
||||
reentrantLock.unlock();
|
||||
}
|
||||
}
|
||||
|
||||
@Override // kotlinx.coroutines.channels.BufferedChannel, kotlinx.coroutines.channels.SendChannel
|
||||
public boolean close(Throwable cause) {
|
||||
ReentrantLock reentrantLock = this.lock;
|
||||
reentrantLock.lock();
|
||||
try {
|
||||
Iterator<T> it = this.subscribers.iterator();
|
||||
while (it.hasNext()) {
|
||||
((BufferedChannel) it.next()).close(cause);
|
||||
}
|
||||
List<? extends BufferedChannel<E>> list = this.subscribers;
|
||||
ArrayList arrayList = new ArrayList();
|
||||
Iterator<T> it2 = list.iterator();
|
||||
while (it2.hasNext()) {
|
||||
BufferedChannel bufferedChannel = (Object) it2.next();
|
||||
if (bufferedChannel.hasElements$kotlinx_coroutines_core()) {
|
||||
arrayList.add(bufferedChannel);
|
||||
}
|
||||
}
|
||||
this.subscribers = arrayList;
|
||||
return super.close(cause);
|
||||
} finally {
|
||||
reentrantLock.unlock();
|
||||
}
|
||||
}
|
||||
|
||||
@Override // kotlinx.coroutines.channels.BufferedChannel
|
||||
public boolean cancelImpl$kotlinx_coroutines_core(Throwable cause) {
|
||||
Symbol symbol;
|
||||
ReentrantLock reentrantLock = this.lock;
|
||||
reentrantLock.lock();
|
||||
try {
|
||||
Iterator<T> it = this.subscribers.iterator();
|
||||
while (it.hasNext()) {
|
||||
((BufferedChannel) it.next()).cancelImpl$kotlinx_coroutines_core(cause);
|
||||
}
|
||||
symbol = BroadcastChannelKt.NO_ELEMENT;
|
||||
this.lastConflatedElement = symbol;
|
||||
return super.cancelImpl$kotlinx_coroutines_core(cause);
|
||||
} finally {
|
||||
reentrantLock.unlock();
|
||||
}
|
||||
}
|
||||
|
||||
@Override // kotlinx.coroutines.channels.BufferedChannel, kotlinx.coroutines.channels.SendChannel
|
||||
public boolean isClosedForSend() {
|
||||
ReentrantLock reentrantLock = this.lock;
|
||||
reentrantLock.lock();
|
||||
try {
|
||||
return super.isClosedForSend();
|
||||
} finally {
|
||||
reentrantLock.unlock();
|
||||
}
|
||||
}
|
||||
|
||||
public final E getValue() {
|
||||
Symbol symbol;
|
||||
ReentrantLock reentrantLock = this.lock;
|
||||
reentrantLock.lock();
|
||||
try {
|
||||
if (isClosedForSend()) {
|
||||
Throwable closeCause = getCloseCause();
|
||||
if (closeCause == null) {
|
||||
throw new IllegalStateException("This broadcast channel is closed");
|
||||
}
|
||||
throw closeCause;
|
||||
}
|
||||
Object obj = this.lastConflatedElement;
|
||||
symbol = BroadcastChannelKt.NO_ELEMENT;
|
||||
if (obj != symbol) {
|
||||
return (E) this.lastConflatedElement;
|
||||
}
|
||||
throw new IllegalStateException("No value".toString());
|
||||
} finally {
|
||||
reentrantLock.unlock();
|
||||
}
|
||||
}
|
||||
|
||||
public final E getValueOrNull() {
|
||||
Symbol symbol;
|
||||
ReentrantLock reentrantLock = this.lock;
|
||||
reentrantLock.lock();
|
||||
try {
|
||||
E e = null;
|
||||
if (!isClosedForReceive()) {
|
||||
Object obj = this.lastConflatedElement;
|
||||
symbol = BroadcastChannelKt.NO_ELEMENT;
|
||||
if (obj != symbol) {
|
||||
e = (E) this.lastConflatedElement;
|
||||
}
|
||||
}
|
||||
return e;
|
||||
} finally {
|
||||
reentrantLock.unlock();
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,30 @@
|
||||
package kotlinx.coroutines.channels;
|
||||
|
||||
import kotlin.Deprecated;
|
||||
import kotlin.DeprecationLevel;
|
||||
import kotlin.Metadata;
|
||||
import kotlinx.coroutines.internal.Symbol;
|
||||
|
||||
/* compiled from: BroadcastChannel.kt */
|
||||
@Metadata(d1 = {"\u0000\u0016\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\b\n\u0000\u001a\u001c\u0010\u0002\u001a\b\u0012\u0004\u0012\u0002H\u00040\u0003\"\u0004\b\u0000\u0010\u00042\u0006\u0010\u0005\u001a\u00020\u0006H\u0007\"\u000e\u0010\u0000\u001a\u00020\u0001X\u0082\u0004¢\u0006\u0002\n\u0000¨\u0006\u0007"}, d2 = {"NO_ELEMENT", "Lkotlinx/coroutines/internal/Symbol;", "BroadcastChannel", "Lkotlinx/coroutines/channels/BroadcastChannel;", "E", "capacity", "", "kotlinx-coroutines-core"}, k = 2, mv = {1, 8, 0}, xi = 48)
|
||||
/* loaded from: classes.dex */
|
||||
public final class BroadcastChannelKt {
|
||||
private static final Symbol NO_ELEMENT = new Symbol("NO_ELEMENT");
|
||||
|
||||
@Deprecated(level = DeprecationLevel.WARNING, message = "BroadcastChannel is deprecated in the favour of SharedFlow and StateFlow, and is no longer supported")
|
||||
public static final <E> BroadcastChannel<E> BroadcastChannel(int i) {
|
||||
if (i == -2) {
|
||||
return new BroadcastChannelImpl(Channel.INSTANCE.getCHANNEL_DEFAULT_CAPACITY$kotlinx_coroutines_core());
|
||||
}
|
||||
if (i == -1) {
|
||||
return new ConflatedBroadcastChannel();
|
||||
}
|
||||
if (i == 0) {
|
||||
throw new IllegalArgumentException("Unsupported 0 capacity for BroadcastChannel");
|
||||
}
|
||||
if (i == Integer.MAX_VALUE) {
|
||||
throw new IllegalArgumentException("Unsupported UNLIMITED capacity for BroadcastChannel");
|
||||
}
|
||||
return new BroadcastChannelImpl(i);
|
||||
}
|
||||
}
|
@ -0,0 +1,130 @@
|
||||
package kotlinx.coroutines.channels;
|
||||
|
||||
import java.util.concurrent.CancellationException;
|
||||
import kotlin.Deprecated;
|
||||
import kotlin.DeprecationLevel;
|
||||
import kotlin.Metadata;
|
||||
import kotlin.ReplaceWith;
|
||||
import kotlin.Unit;
|
||||
import kotlin.coroutines.Continuation;
|
||||
import kotlin.coroutines.CoroutineContext;
|
||||
import kotlin.jvm.functions.Function1;
|
||||
import kotlinx.coroutines.AbstractCoroutine;
|
||||
import kotlinx.coroutines.CoroutineExceptionHandlerKt;
|
||||
import kotlinx.coroutines.Job;
|
||||
import kotlinx.coroutines.JobCancellationException;
|
||||
import kotlinx.coroutines.JobSupport;
|
||||
import kotlinx.coroutines.channels.SendChannel;
|
||||
import kotlinx.coroutines.selects.SelectClause2;
|
||||
|
||||
/* compiled from: Broadcast.kt */
|
||||
@Metadata(d1 = {"\u0000d\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0010\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\u000b\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0002\b\u0006\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0010\u0003\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\n\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0003\b\u0012\u0018\u0000*\u0004\b\u0000\u0010\u00012\b\u0012\u0004\u0012\u00020\u00030\u00022\b\u0012\u0004\u0012\u0002H\u00010\u00042\b\u0012\u0004\u0012\u0002H\u00010\u0005B#\u0012\u0006\u0010\u0006\u001a\u00020\u0007\u0012\f\u0010\b\u001a\b\u0012\u0004\u0012\u00028\u00000\u0005\u0012\u0006\u0010\t\u001a\u00020\n¢\u0006\u0002\u0010\u000bJ\u0012\u0010\u0019\u001a\u00020\n2\b\u0010\u001a\u001a\u0004\u0018\u00010\u001bH\u0007J\u0016\u0010\u0019\u001a\u00020\u00032\u000e\u0010\u001a\u001a\n\u0018\u00010\u001cj\u0004\u0018\u0001`\u001dJ\u0010\u0010\u001e\u001a\u00020\u00032\u0006\u0010\u001a\u001a\u00020\u001bH\u0016J\u0012\u0010\u001f\u001a\u00020\n2\b\u0010\u001a\u001a\u0004\u0018\u00010\u001bH\u0016J.\u0010 \u001a\u00020\u00032#\u0010!\u001a\u001f\u0012\u0015\u0012\u0013\u0018\u00010\u001b¢\u0006\f\b#\u0012\b\b$\u0012\u0004\b\b(\u001a\u0012\u0004\u0012\u00020\u00030\"H\u0096\u0001J\u0016\u0010%\u001a\u00020\n2\u0006\u0010&\u001a\u00028\u0000H\u0097\u0001¢\u0006\u0002\u0010'J\u0018\u0010(\u001a\u00020\u00032\u0006\u0010\u001a\u001a\u00020\u001b2\u0006\u0010)\u001a\u00020\nH\u0014J\u0015\u0010*\u001a\u00020\u00032\u0006\u0010+\u001a\u00020\u0003H\u0014¢\u0006\u0002\u0010,J\u000f\u0010-\u001a\b\u0012\u0004\u0012\u00028\u00000.H\u0096\u0001J\u0019\u0010/\u001a\u00020\u00032\u0006\u0010&\u001a\u00028\u0000H\u0096Aø\u0001\u0000¢\u0006\u0002\u00100J'\u00101\u001a\b\u0012\u0004\u0012\u00020\u0003022\u0006\u0010&\u001a\u00028\u0000H\u0096\u0001ø\u0001\u0001ø\u0001\u0002ø\u0001\u0000¢\u0006\u0004\b3\u00104R\u001a\u0010\b\u001a\b\u0012\u0004\u0012\u00028\u00000\u0005X\u0084\u0004¢\u0006\b\n\u0000\u001a\u0004\b\f\u0010\rR\u001a\u0010\u000e\u001a\b\u0012\u0004\u0012\u00028\u00000\u000f8VX\u0096\u0004¢\u0006\u0006\u001a\u0004\b\u0010\u0010\u0011R\u0014\u0010\u0012\u001a\u00020\n8VX\u0096\u0004¢\u0006\u0006\u001a\u0004\b\u0012\u0010\u0013R\u0014\u0010\u0014\u001a\u00020\n8\u0016X\u0097\u0005¢\u0006\u0006\u001a\u0004\b\u0014\u0010\u0013R$\u0010\u0015\u001a\u0014\u0012\u0004\u0012\u00028\u0000\u0012\n\u0012\b\u0012\u0004\u0012\u00028\u00000\u000f0\u0016X\u0096\u0005¢\u0006\u0006\u001a\u0004\b\u0017\u0010\u0018\u0082\u0002\u000f\n\u0002\b\u0019\n\u0002\b!\n\u0005\b¡\u001e0\u0001¨\u00065"}, d2 = {"Lkotlinx/coroutines/channels/BroadcastCoroutine;", "E", "Lkotlinx/coroutines/AbstractCoroutine;", "", "Lkotlinx/coroutines/channels/ProducerScope;", "Lkotlinx/coroutines/channels/BroadcastChannel;", "parentContext", "Lkotlin/coroutines/CoroutineContext;", "_channel", "active", "", "(Lkotlin/coroutines/CoroutineContext;Lkotlinx/coroutines/channels/BroadcastChannel;Z)V", "get_channel", "()Lkotlinx/coroutines/channels/BroadcastChannel;", "channel", "Lkotlinx/coroutines/channels/SendChannel;", "getChannel", "()Lkotlinx/coroutines/channels/SendChannel;", "isActive", "()Z", "isClosedForSend", "onSend", "Lkotlinx/coroutines/selects/SelectClause2;", "getOnSend", "()Lkotlinx/coroutines/selects/SelectClause2;", "cancel", "cause", "", "Ljava/util/concurrent/CancellationException;", "Lkotlinx/coroutines/CancellationException;", "cancelInternal", "close", "invokeOnClose", "handler", "Lkotlin/Function1;", "Lkotlin/ParameterName;", "name", "offer", "element", "(Ljava/lang/Object;)Z", "onCancelled", "handled", "onCompleted", "value", "(Lkotlin/Unit;)V", "openSubscription", "Lkotlinx/coroutines/channels/ReceiveChannel;", "send", "(Ljava/lang/Object;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;", "trySend", "Lkotlinx/coroutines/channels/ChannelResult;", "trySend-JP2dKIU", "(Ljava/lang/Object;)Ljava/lang/Object;", "kotlinx-coroutines-core"}, k = 1, mv = {1, 8, 0}, xi = 48)
|
||||
/* loaded from: classes.dex */
|
||||
class BroadcastCoroutine<E> extends AbstractCoroutine<Unit> implements ProducerScope<E>, BroadcastChannel<E> {
|
||||
private final BroadcastChannel<E> _channel;
|
||||
|
||||
@Override // kotlinx.coroutines.channels.SendChannel
|
||||
public SelectClause2<E, SendChannel<E>> getOnSend() {
|
||||
return this._channel.getOnSend();
|
||||
}
|
||||
|
||||
protected final BroadcastChannel<E> get_channel() {
|
||||
return this._channel;
|
||||
}
|
||||
|
||||
@Override // kotlinx.coroutines.channels.SendChannel
|
||||
public void invokeOnClose(Function1<? super Throwable, Unit> handler) {
|
||||
this._channel.invokeOnClose(handler);
|
||||
}
|
||||
|
||||
@Override // kotlinx.coroutines.channels.SendChannel
|
||||
public boolean isClosedForSend() {
|
||||
return this._channel.isClosedForSend();
|
||||
}
|
||||
|
||||
@Override // kotlinx.coroutines.channels.SendChannel
|
||||
@Deprecated(level = DeprecationLevel.ERROR, message = "Deprecated in the favour of 'trySend' method", replaceWith = @ReplaceWith(expression = "trySend(element).isSuccess", imports = {}))
|
||||
public boolean offer(E element) {
|
||||
return this._channel.offer(element);
|
||||
}
|
||||
|
||||
@Override // kotlinx.coroutines.channels.BroadcastChannel
|
||||
public ReceiveChannel<E> openSubscription() {
|
||||
return this._channel.openSubscription();
|
||||
}
|
||||
|
||||
@Override // kotlinx.coroutines.channels.SendChannel
|
||||
public Object send(E e, Continuation<? super Unit> continuation) {
|
||||
return this._channel.send(e, continuation);
|
||||
}
|
||||
|
||||
@Override // kotlinx.coroutines.channels.SendChannel
|
||||
/* renamed from: trySend-JP2dKIU */
|
||||
public Object mo1852trySendJP2dKIU(E element) {
|
||||
return this._channel.mo1852trySendJP2dKIU(element);
|
||||
}
|
||||
|
||||
public BroadcastCoroutine(CoroutineContext coroutineContext, BroadcastChannel<E> broadcastChannel, boolean z) {
|
||||
super(coroutineContext, false, z);
|
||||
this._channel = broadcastChannel;
|
||||
initParentJob((Job) coroutineContext.get(Job.INSTANCE));
|
||||
}
|
||||
|
||||
@Override // kotlinx.coroutines.AbstractCoroutine, kotlinx.coroutines.JobSupport, kotlinx.coroutines.Job
|
||||
public boolean isActive() {
|
||||
return super.isActive();
|
||||
}
|
||||
|
||||
@Override // kotlinx.coroutines.channels.ProducerScope
|
||||
public SendChannel<E> getChannel() {
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override // kotlinx.coroutines.JobSupport
|
||||
public void cancelInternal(Throwable cause) {
|
||||
CancellationException cancellationException$default = JobSupport.toCancellationException$default(this, cause, null, 1, null);
|
||||
this._channel.cancel(cancellationException$default);
|
||||
cancelCoroutine(cancellationException$default);
|
||||
}
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: protected */
|
||||
@Override // kotlinx.coroutines.AbstractCoroutine
|
||||
public void onCompleted(Unit value) {
|
||||
SendChannel.DefaultImpls.close$default(this._channel, null, 1, null);
|
||||
}
|
||||
|
||||
@Override // kotlinx.coroutines.AbstractCoroutine
|
||||
protected void onCancelled(Throwable cause, boolean handled) {
|
||||
if (this._channel.close(cause) || handled) {
|
||||
return;
|
||||
}
|
||||
CoroutineExceptionHandlerKt.handleCoroutineException(get$context(), cause);
|
||||
}
|
||||
|
||||
@Override // kotlinx.coroutines.channels.SendChannel
|
||||
public boolean close(Throwable cause) {
|
||||
boolean close = this._channel.close(cause);
|
||||
start();
|
||||
return close;
|
||||
}
|
||||
|
||||
@Override // kotlinx.coroutines.JobSupport, kotlinx.coroutines.Job
|
||||
@Deprecated(level = DeprecationLevel.HIDDEN, message = "Since 1.2.0, binary compatibility with versions <= 1.1.x")
|
||||
public final /* synthetic */ boolean cancel(Throwable cause) {
|
||||
if (cause == null) {
|
||||
BroadcastCoroutine<E> broadcastCoroutine = this;
|
||||
cause = new JobCancellationException(broadcastCoroutine.cancellationExceptionMessage(), null, broadcastCoroutine);
|
||||
}
|
||||
cancelInternal(cause);
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override // kotlinx.coroutines.JobSupport, kotlinx.coroutines.Job
|
||||
public final void cancel(CancellationException cause) {
|
||||
if (cause == null) {
|
||||
BroadcastCoroutine<E> broadcastCoroutine = this;
|
||||
cause = new JobCancellationException(broadcastCoroutine.cancellationExceptionMessage(), null, broadcastCoroutine);
|
||||
}
|
||||
cancelInternal(cause);
|
||||
}
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
package kotlinx.coroutines.channels;
|
||||
|
||||
import kotlin.Metadata;
|
||||
import kotlin.coroutines.AbstractCoroutineContextElement;
|
||||
import kotlin.coroutines.CoroutineContext;
|
||||
import kotlinx.coroutines.CoroutineExceptionHandler;
|
||||
|
||||
/* compiled from: CoroutineExceptionHandler.kt */
|
||||
@Metadata(d1 = {"\u0000!\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0003\n\u0000*\u0001\u0000\b\n\u0018\u00002\u00020\u00012\u00020\u0002J\u0018\u0010\u0003\u001a\u00020\u00042\u0006\u0010\u0005\u001a\u00020\u00062\u0006\u0010\u0007\u001a\u00020\bH\u0016¨\u0006\t¸\u0006\u0000"}, d2 = {"kotlinx/coroutines/CoroutineExceptionHandlerKt$CoroutineExceptionHandler$1", "Lkotlin/coroutines/AbstractCoroutineContextElement;", "Lkotlinx/coroutines/CoroutineExceptionHandler;", "handleException", "", "context", "Lkotlin/coroutines/CoroutineContext;", "exception", "", "kotlinx-coroutines-core"}, k = 1, mv = {1, 8, 0}, xi = 48)
|
||||
/* loaded from: classes.dex */
|
||||
public final class BroadcastKt$broadcast$$inlined$CoroutineExceptionHandler$1 extends AbstractCoroutineContextElement implements CoroutineExceptionHandler {
|
||||
@Override // kotlinx.coroutines.CoroutineExceptionHandler
|
||||
public void handleException(CoroutineContext context, Throwable exception) {
|
||||
}
|
||||
|
||||
public BroadcastKt$broadcast$$inlined$CoroutineExceptionHandler$1(CoroutineExceptionHandler.Companion companion) {
|
||||
super(companion);
|
||||
}
|
||||
}
|
@ -0,0 +1,125 @@
|
||||
package kotlinx.coroutines.channels;
|
||||
|
||||
import kotlin.Metadata;
|
||||
import kotlin.Unit;
|
||||
import kotlin.coroutines.Continuation;
|
||||
import kotlin.coroutines.jvm.internal.DebugMetadata;
|
||||
import kotlin.coroutines.jvm.internal.SuspendLambda;
|
||||
import kotlin.jvm.functions.Function2;
|
||||
|
||||
/* JADX INFO: Add missing generic type declarations: [E] */
|
||||
/* compiled from: Broadcast.kt */
|
||||
@Metadata(d1 = {"\u0000\f\n\u0000\n\u0002\u0018\u0002\n\u0002\u0010\u0002\n\u0000\u0010\u0003\u001a\u00020\u0002\"\u0004\b\u0000\u0010\u0000*\b\u0012\u0004\u0012\u00028\u00000\u0001H\u008a@"}, d2 = {"E", "Lkotlinx/coroutines/channels/ProducerScope;", "", "<anonymous>"}, k = 3, mv = {1, 8, 0})
|
||||
@DebugMetadata(c = "kotlinx.coroutines.channels.BroadcastKt$broadcast$2", f = "Broadcast.kt", i = {0, 1}, l = {56, 57}, m = "invokeSuspend", n = {"$this$broadcast", "$this$broadcast"}, s = {"L$0", "L$0"})
|
||||
/* loaded from: classes.dex */
|
||||
final class BroadcastKt$broadcast$2<E> extends SuspendLambda implements Function2<ProducerScope<? super E>, Continuation<? super Unit>, Object> {
|
||||
final /* synthetic */ ReceiveChannel<E> $channel;
|
||||
private /* synthetic */ Object L$0;
|
||||
Object L$1;
|
||||
int label;
|
||||
|
||||
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
||||
/* JADX WARN: Multi-variable type inference failed */
|
||||
BroadcastKt$broadcast$2(ReceiveChannel<? extends E> receiveChannel, Continuation<? super BroadcastKt$broadcast$2> continuation) {
|
||||
super(2, continuation);
|
||||
this.$channel = receiveChannel;
|
||||
}
|
||||
|
||||
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
||||
public final Continuation<Unit> create(Object obj, Continuation<?> continuation) {
|
||||
BroadcastKt$broadcast$2 broadcastKt$broadcast$2 = new BroadcastKt$broadcast$2(this.$channel, continuation);
|
||||
broadcastKt$broadcast$2.L$0 = obj;
|
||||
return broadcastKt$broadcast$2;
|
||||
}
|
||||
|
||||
@Override // kotlin.jvm.functions.Function2
|
||||
public final Object invoke(ProducerScope<? super E> producerScope, Continuation<? super Unit> continuation) {
|
||||
return ((BroadcastKt$broadcast$2) create(producerScope, continuation)).invokeSuspend(Unit.INSTANCE);
|
||||
}
|
||||
|
||||
/* JADX WARN: Removed duplicated region for block: B:11:0x004e */
|
||||
/* JADX WARN: Removed duplicated region for block: B:14:0x005a */
|
||||
/* JADX WARN: Removed duplicated region for block: B:18:0x0071 */
|
||||
/* JADX WARN: Removed duplicated region for block: B:9:0x004d A[RETURN] */
|
||||
/* JADX WARN: Unsupported multi-entry loop pattern (BACK_EDGE: B:17:0x006e -> B:7:0x003e). Please report as a decompilation issue!!! */
|
||||
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
||||
/*
|
||||
Code decompiled incorrectly, please refer to instructions dump.
|
||||
To view partially-correct add '--show-bad-code' argument
|
||||
*/
|
||||
public final java.lang.Object invokeSuspend(java.lang.Object r9) {
|
||||
/*
|
||||
r8 = this;
|
||||
java.lang.Object r0 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED()
|
||||
int r1 = r8.label
|
||||
r2 = 2
|
||||
r3 = 1
|
||||
if (r1 == 0) goto L30
|
||||
if (r1 == r3) goto L23
|
||||
if (r1 != r2) goto L1b
|
||||
java.lang.Object r1 = r8.L$1
|
||||
kotlinx.coroutines.channels.ChannelIterator r1 = (kotlinx.coroutines.channels.ChannelIterator) r1
|
||||
java.lang.Object r4 = r8.L$0
|
||||
kotlinx.coroutines.channels.ProducerScope r4 = (kotlinx.coroutines.channels.ProducerScope) r4
|
||||
kotlin.ResultKt.throwOnFailure(r9)
|
||||
r9 = r4
|
||||
goto L3d
|
||||
L1b:
|
||||
java.lang.IllegalStateException r9 = new java.lang.IllegalStateException
|
||||
java.lang.String r0 = "call to 'resume' before 'invoke' with coroutine"
|
||||
r9.<init>(r0)
|
||||
throw r9
|
||||
L23:
|
||||
java.lang.Object r1 = r8.L$1
|
||||
kotlinx.coroutines.channels.ChannelIterator r1 = (kotlinx.coroutines.channels.ChannelIterator) r1
|
||||
java.lang.Object r4 = r8.L$0
|
||||
kotlinx.coroutines.channels.ProducerScope r4 = (kotlinx.coroutines.channels.ProducerScope) r4
|
||||
kotlin.ResultKt.throwOnFailure(r9)
|
||||
r5 = r8
|
||||
goto L52
|
||||
L30:
|
||||
kotlin.ResultKt.throwOnFailure(r9)
|
||||
java.lang.Object r9 = r8.L$0
|
||||
kotlinx.coroutines.channels.ProducerScope r9 = (kotlinx.coroutines.channels.ProducerScope) r9
|
||||
kotlinx.coroutines.channels.ReceiveChannel<E> r1 = r8.$channel
|
||||
kotlinx.coroutines.channels.ChannelIterator r1 = r1.iterator()
|
||||
L3d:
|
||||
r4 = r8
|
||||
L3e:
|
||||
r5 = r4
|
||||
kotlin.coroutines.Continuation r5 = (kotlin.coroutines.Continuation) r5
|
||||
r4.L$0 = r9
|
||||
r4.L$1 = r1
|
||||
r4.label = r3
|
||||
java.lang.Object r5 = r1.hasNext(r5)
|
||||
if (r5 != r0) goto L4e
|
||||
return r0
|
||||
L4e:
|
||||
r7 = r4
|
||||
r4 = r9
|
||||
r9 = r5
|
||||
r5 = r7
|
||||
L52:
|
||||
java.lang.Boolean r9 = (java.lang.Boolean) r9
|
||||
boolean r9 = r9.booleanValue()
|
||||
if (r9 == 0) goto L71
|
||||
java.lang.Object r9 = r1.next()
|
||||
r6 = r5
|
||||
kotlin.coroutines.Continuation r6 = (kotlin.coroutines.Continuation) r6
|
||||
r5.L$0 = r4
|
||||
r5.L$1 = r1
|
||||
r5.label = r2
|
||||
java.lang.Object r9 = r4.send(r9, r6)
|
||||
if (r9 != r0) goto L6e
|
||||
return r0
|
||||
L6e:
|
||||
r9 = r4
|
||||
r4 = r5
|
||||
goto L3e
|
||||
L71:
|
||||
kotlin.Unit r9 = kotlin.Unit.INSTANCE
|
||||
return r9
|
||||
*/
|
||||
throw new UnsupportedOperationException("Method not decompiled: kotlinx.coroutines.channels.BroadcastKt$broadcast$2.invokeSuspend(java.lang.Object):java.lang.Object");
|
||||
}
|
||||
}
|
@ -0,0 +1,88 @@
|
||||
package kotlinx.coroutines.channels;
|
||||
|
||||
import kotlin.Deprecated;
|
||||
import kotlin.DeprecationLevel;
|
||||
import kotlin.Metadata;
|
||||
import kotlin.Unit;
|
||||
import kotlin.coroutines.Continuation;
|
||||
import kotlin.coroutines.CoroutineContext;
|
||||
import kotlin.coroutines.EmptyCoroutineContext;
|
||||
import kotlin.jvm.functions.Function1;
|
||||
import kotlin.jvm.functions.Function2;
|
||||
import kotlinx.coroutines.CoroutineContextKt;
|
||||
import kotlinx.coroutines.CoroutineExceptionHandler;
|
||||
import kotlinx.coroutines.CoroutineScope;
|
||||
import kotlinx.coroutines.CoroutineScopeKt;
|
||||
import kotlinx.coroutines.CoroutineStart;
|
||||
import kotlinx.coroutines.Dispatchers;
|
||||
import kotlinx.coroutines.GlobalScope;
|
||||
|
||||
/* compiled from: Broadcast.kt */
|
||||
@Metadata(d1 = {"\u0000V\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\b\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0010\u0003\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\u001a\u009e\u0001\u0010\u0000\u001a\b\u0012\u0004\u0012\u0002H\u00020\u0001\"\u0004\b\u0000\u0010\u0002*\u00020\u00032\b\b\u0002\u0010\u0004\u001a\u00020\u00052\b\b\u0002\u0010\u0006\u001a\u00020\u00072\b\b\u0002\u0010\b\u001a\u00020\t2-\b\u0002\u0010\n\u001a'\u0012\u0015\u0012\u0013\u0018\u00010\f¢\u0006\f\b\r\u0012\b\b\u000e\u0012\u0004\b\b(\u000f\u0012\u0004\u0012\u00020\u0010\u0018\u00010\u000bj\u0004\u0018\u0001`\u00112/\b\u0001\u0010\u0012\u001a)\b\u0001\u0012\n\u0012\b\u0012\u0004\u0012\u0002H\u00020\u0014\u0012\n\u0012\b\u0012\u0004\u0012\u00020\u00100\u0015\u0012\u0006\u0012\u0004\u0018\u00010\u00160\u0013¢\u0006\u0002\b\u0017H\u0007ø\u0001\u0000¢\u0006\u0002\u0010\u0018\u001a2\u0010\u0000\u001a\b\u0012\u0004\u0012\u0002H\u00020\u0001\"\u0004\b\u0000\u0010\u0002*\b\u0012\u0004\u0012\u0002H\u00020\u00192\b\b\u0002\u0010\u0006\u001a\u00020\u00072\b\b\u0002\u0010\b\u001a\u00020\tH\u0007\u0082\u0002\u0004\n\u0002\b\u0019¨\u0006\u001a"}, d2 = {"broadcast", "Lkotlinx/coroutines/channels/BroadcastChannel;", "E", "Lkotlinx/coroutines/CoroutineScope;", "context", "Lkotlin/coroutines/CoroutineContext;", "capacity", "", "start", "Lkotlinx/coroutines/CoroutineStart;", "onCompletion", "Lkotlin/Function1;", "", "Lkotlin/ParameterName;", "name", "cause", "", "Lkotlinx/coroutines/CompletionHandler;", "block", "Lkotlin/Function2;", "Lkotlinx/coroutines/channels/ProducerScope;", "Lkotlin/coroutines/Continuation;", "", "Lkotlin/ExtensionFunctionType;", "(Lkotlinx/coroutines/CoroutineScope;Lkotlin/coroutines/CoroutineContext;ILkotlinx/coroutines/CoroutineStart;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/channels/BroadcastChannel;", "Lkotlinx/coroutines/channels/ReceiveChannel;", "kotlinx-coroutines-core"}, k = 2, mv = {1, 8, 0}, xi = 48)
|
||||
/* loaded from: classes.dex */
|
||||
public final class BroadcastKt {
|
||||
public static /* synthetic */ BroadcastChannel broadcast$default(ReceiveChannel receiveChannel, int i, CoroutineStart coroutineStart, int i2, Object obj) {
|
||||
if ((i2 & 1) != 0) {
|
||||
i = 1;
|
||||
}
|
||||
if ((i2 & 2) != 0) {
|
||||
coroutineStart = CoroutineStart.LAZY;
|
||||
}
|
||||
return broadcast(receiveChannel, i, coroutineStart);
|
||||
}
|
||||
|
||||
@Deprecated(level = DeprecationLevel.WARNING, message = "BroadcastChannel is deprecated in the favour of SharedFlow and is no longer supported")
|
||||
public static final <E> BroadcastChannel<E> broadcast(final ReceiveChannel<? extends E> receiveChannel, int i, CoroutineStart coroutineStart) {
|
||||
return broadcast$default(CoroutineScopeKt.plus(CoroutineScopeKt.plus(GlobalScope.INSTANCE, Dispatchers.getUnconfined()), new BroadcastKt$broadcast$$inlined$CoroutineExceptionHandler$1(CoroutineExceptionHandler.INSTANCE)), null, i, coroutineStart, new Function1<Throwable, Unit>() { // from class: kotlinx.coroutines.channels.BroadcastKt$broadcast$1
|
||||
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
||||
/* JADX WARN: Multi-variable type inference failed */
|
||||
{
|
||||
super(1);
|
||||
}
|
||||
|
||||
@Override // kotlin.jvm.functions.Function1
|
||||
public /* bridge */ /* synthetic */ Unit invoke(Throwable th) {
|
||||
invoke2(th);
|
||||
return Unit.INSTANCE;
|
||||
}
|
||||
|
||||
/* renamed from: invoke, reason: avoid collision after fix types in other method */
|
||||
public final void invoke2(Throwable th) {
|
||||
ChannelsKt.cancelConsumed(receiveChannel, th);
|
||||
}
|
||||
}, new BroadcastKt$broadcast$2(receiveChannel, null), 1, null);
|
||||
}
|
||||
|
||||
public static /* synthetic */ BroadcastChannel broadcast$default(CoroutineScope coroutineScope, CoroutineContext coroutineContext, int i, CoroutineStart coroutineStart, Function1 function1, Function2 function2, int i2, Object obj) {
|
||||
if ((i2 & 1) != 0) {
|
||||
coroutineContext = EmptyCoroutineContext.INSTANCE;
|
||||
}
|
||||
CoroutineContext coroutineContext2 = coroutineContext;
|
||||
int i3 = (i2 & 2) != 0 ? 1 : i;
|
||||
if ((i2 & 4) != 0) {
|
||||
coroutineStart = CoroutineStart.LAZY;
|
||||
}
|
||||
CoroutineStart coroutineStart2 = coroutineStart;
|
||||
if ((i2 & 8) != 0) {
|
||||
function1 = null;
|
||||
}
|
||||
return broadcast(coroutineScope, coroutineContext2, i3, coroutineStart2, function1, function2);
|
||||
}
|
||||
|
||||
@Deprecated(level = DeprecationLevel.WARNING, message = "BroadcastChannel is deprecated in the favour of SharedFlow and is no longer supported")
|
||||
public static final <E> BroadcastChannel<E> broadcast(CoroutineScope coroutineScope, CoroutineContext coroutineContext, int i, CoroutineStart coroutineStart, Function1<? super Throwable, Unit> function1, Function2<? super ProducerScope<? super E>, ? super Continuation<? super Unit>, ? extends Object> function2) {
|
||||
LazyBroadcastCoroutine broadcastCoroutine;
|
||||
CoroutineContext newCoroutineContext = CoroutineContextKt.newCoroutineContext(coroutineScope, coroutineContext);
|
||||
BroadcastChannel BroadcastChannel = BroadcastChannelKt.BroadcastChannel(i);
|
||||
if (coroutineStart.isLazy()) {
|
||||
broadcastCoroutine = new LazyBroadcastCoroutine(newCoroutineContext, BroadcastChannel, function2);
|
||||
} else {
|
||||
broadcastCoroutine = new BroadcastCoroutine(newCoroutineContext, BroadcastChannel, true);
|
||||
}
|
||||
if (function1 != null) {
|
||||
broadcastCoroutine.invokeOnCompletion(function1);
|
||||
}
|
||||
broadcastCoroutine.start(coroutineStart, broadcastCoroutine, function2);
|
||||
return broadcastCoroutine;
|
||||
}
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
package kotlinx.coroutines.channels;
|
||||
|
||||
import kotlin.Metadata;
|
||||
|
||||
/* compiled from: BufferOverflow.kt */
|
||||
@Metadata(d1 = {"\u0000\f\n\u0002\u0018\u0002\n\u0002\u0010\u0010\n\u0002\b\u0005\b\u0086\u0001\u0018\u00002\b\u0012\u0004\u0012\u00020\u00000\u0001B\u0007\b\u0002¢\u0006\u0002\u0010\u0002j\u0002\b\u0003j\u0002\b\u0004j\u0002\b\u0005¨\u0006\u0006"}, d2 = {"Lkotlinx/coroutines/channels/BufferOverflow;", "", "(Ljava/lang/String;I)V", "SUSPEND", "DROP_OLDEST", "DROP_LATEST", "kotlinx-coroutines-core"}, k = 1, mv = {1, 8, 0}, xi = 48)
|
||||
/* loaded from: classes.dex */
|
||||
public enum BufferOverflow {
|
||||
SUSPEND,
|
||||
DROP_OLDEST,
|
||||
DROP_LATEST
|
||||
}
|
@ -0,0 +1,29 @@
|
||||
package kotlinx.coroutines.channels;
|
||||
|
||||
import kotlin.Metadata;
|
||||
import kotlin.Unit;
|
||||
import kotlin.jvm.functions.Function3;
|
||||
import kotlin.jvm.internal.FunctionReferenceImpl;
|
||||
import kotlinx.coroutines.selects.SelectInstance;
|
||||
|
||||
/* compiled from: BufferedChannel.kt */
|
||||
@Metadata(k = 3, mv = {1, 8, 0}, xi = 48)
|
||||
/* loaded from: classes.dex */
|
||||
/* synthetic */ class BufferedChannel$onReceive$1 extends FunctionReferenceImpl implements Function3<BufferedChannel<?>, SelectInstance<?>, Object, Unit> {
|
||||
public static final BufferedChannel$onReceive$1 INSTANCE = new BufferedChannel$onReceive$1();
|
||||
|
||||
BufferedChannel$onReceive$1() {
|
||||
super(3, BufferedChannel.class, "registerSelectForReceive", "registerSelectForReceive(Lkotlinx/coroutines/selects/SelectInstance;Ljava/lang/Object;)V", 0);
|
||||
}
|
||||
|
||||
@Override // kotlin.jvm.functions.Function3
|
||||
public /* bridge */ /* synthetic */ Unit invoke(BufferedChannel<?> bufferedChannel, SelectInstance<?> selectInstance, Object obj) {
|
||||
invoke2(bufferedChannel, selectInstance, obj);
|
||||
return Unit.INSTANCE;
|
||||
}
|
||||
|
||||
/* renamed from: invoke, reason: avoid collision after fix types in other method */
|
||||
public final void invoke2(BufferedChannel<?> bufferedChannel, SelectInstance<?> selectInstance, Object obj) {
|
||||
bufferedChannel.registerSelectForReceive(selectInstance, obj);
|
||||
}
|
||||
}
|
@ -0,0 +1,23 @@
|
||||
package kotlinx.coroutines.channels;
|
||||
|
||||
import kotlin.Metadata;
|
||||
import kotlin.jvm.functions.Function3;
|
||||
import kotlin.jvm.internal.FunctionReferenceImpl;
|
||||
|
||||
/* compiled from: BufferedChannel.kt */
|
||||
@Metadata(k = 3, mv = {1, 8, 0}, xi = 48)
|
||||
/* loaded from: classes.dex */
|
||||
/* synthetic */ class BufferedChannel$onReceive$2 extends FunctionReferenceImpl implements Function3<BufferedChannel<?>, Object, Object, Object> {
|
||||
public static final BufferedChannel$onReceive$2 INSTANCE = new BufferedChannel$onReceive$2();
|
||||
|
||||
BufferedChannel$onReceive$2() {
|
||||
super(3, BufferedChannel.class, "processResultSelectReceive", "processResultSelectReceive(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;", 0);
|
||||
}
|
||||
|
||||
@Override // kotlin.jvm.functions.Function3
|
||||
public final Object invoke(BufferedChannel<?> bufferedChannel, Object obj, Object obj2) {
|
||||
Object processResultSelectReceive;
|
||||
processResultSelectReceive = bufferedChannel.processResultSelectReceive(obj, obj2);
|
||||
return processResultSelectReceive;
|
||||
}
|
||||
}
|
@ -0,0 +1,29 @@
|
||||
package kotlinx.coroutines.channels;
|
||||
|
||||
import kotlin.Metadata;
|
||||
import kotlin.Unit;
|
||||
import kotlin.jvm.functions.Function3;
|
||||
import kotlin.jvm.internal.FunctionReferenceImpl;
|
||||
import kotlinx.coroutines.selects.SelectInstance;
|
||||
|
||||
/* compiled from: BufferedChannel.kt */
|
||||
@Metadata(k = 3, mv = {1, 8, 0}, xi = 48)
|
||||
/* loaded from: classes.dex */
|
||||
/* synthetic */ class BufferedChannel$onReceiveCatching$1 extends FunctionReferenceImpl implements Function3<BufferedChannel<?>, SelectInstance<?>, Object, Unit> {
|
||||
public static final BufferedChannel$onReceiveCatching$1 INSTANCE = new BufferedChannel$onReceiveCatching$1();
|
||||
|
||||
BufferedChannel$onReceiveCatching$1() {
|
||||
super(3, BufferedChannel.class, "registerSelectForReceive", "registerSelectForReceive(Lkotlinx/coroutines/selects/SelectInstance;Ljava/lang/Object;)V", 0);
|
||||
}
|
||||
|
||||
@Override // kotlin.jvm.functions.Function3
|
||||
public /* bridge */ /* synthetic */ Unit invoke(BufferedChannel<?> bufferedChannel, SelectInstance<?> selectInstance, Object obj) {
|
||||
invoke2(bufferedChannel, selectInstance, obj);
|
||||
return Unit.INSTANCE;
|
||||
}
|
||||
|
||||
/* renamed from: invoke, reason: avoid collision after fix types in other method */
|
||||
public final void invoke2(BufferedChannel<?> bufferedChannel, SelectInstance<?> selectInstance, Object obj) {
|
||||
bufferedChannel.registerSelectForReceive(selectInstance, obj);
|
||||
}
|
||||
}
|
@ -0,0 +1,23 @@
|
||||
package kotlinx.coroutines.channels;
|
||||
|
||||
import kotlin.Metadata;
|
||||
import kotlin.jvm.functions.Function3;
|
||||
import kotlin.jvm.internal.FunctionReferenceImpl;
|
||||
|
||||
/* compiled from: BufferedChannel.kt */
|
||||
@Metadata(k = 3, mv = {1, 8, 0}, xi = 48)
|
||||
/* loaded from: classes.dex */
|
||||
/* synthetic */ class BufferedChannel$onReceiveCatching$2 extends FunctionReferenceImpl implements Function3<BufferedChannel<?>, Object, Object, Object> {
|
||||
public static final BufferedChannel$onReceiveCatching$2 INSTANCE = new BufferedChannel$onReceiveCatching$2();
|
||||
|
||||
BufferedChannel$onReceiveCatching$2() {
|
||||
super(3, BufferedChannel.class, "processResultSelectReceiveCatching", "processResultSelectReceiveCatching(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;", 0);
|
||||
}
|
||||
|
||||
@Override // kotlin.jvm.functions.Function3
|
||||
public final Object invoke(BufferedChannel<?> bufferedChannel, Object obj, Object obj2) {
|
||||
Object processResultSelectReceiveCatching;
|
||||
processResultSelectReceiveCatching = bufferedChannel.processResultSelectReceiveCatching(obj, obj2);
|
||||
return processResultSelectReceiveCatching;
|
||||
}
|
||||
}
|
@ -0,0 +1,29 @@
|
||||
package kotlinx.coroutines.channels;
|
||||
|
||||
import kotlin.Metadata;
|
||||
import kotlin.Unit;
|
||||
import kotlin.jvm.functions.Function3;
|
||||
import kotlin.jvm.internal.FunctionReferenceImpl;
|
||||
import kotlinx.coroutines.selects.SelectInstance;
|
||||
|
||||
/* compiled from: BufferedChannel.kt */
|
||||
@Metadata(k = 3, mv = {1, 8, 0}, xi = 48)
|
||||
/* loaded from: classes.dex */
|
||||
/* synthetic */ class BufferedChannel$onReceiveOrNull$1 extends FunctionReferenceImpl implements Function3<BufferedChannel<?>, SelectInstance<?>, Object, Unit> {
|
||||
public static final BufferedChannel$onReceiveOrNull$1 INSTANCE = new BufferedChannel$onReceiveOrNull$1();
|
||||
|
||||
BufferedChannel$onReceiveOrNull$1() {
|
||||
super(3, BufferedChannel.class, "registerSelectForReceive", "registerSelectForReceive(Lkotlinx/coroutines/selects/SelectInstance;Ljava/lang/Object;)V", 0);
|
||||
}
|
||||
|
||||
@Override // kotlin.jvm.functions.Function3
|
||||
public /* bridge */ /* synthetic */ Unit invoke(BufferedChannel<?> bufferedChannel, SelectInstance<?> selectInstance, Object obj) {
|
||||
invoke2(bufferedChannel, selectInstance, obj);
|
||||
return Unit.INSTANCE;
|
||||
}
|
||||
|
||||
/* renamed from: invoke, reason: avoid collision after fix types in other method */
|
||||
public final void invoke2(BufferedChannel<?> bufferedChannel, SelectInstance<?> selectInstance, Object obj) {
|
||||
bufferedChannel.registerSelectForReceive(selectInstance, obj);
|
||||
}
|
||||
}
|
@ -0,0 +1,23 @@
|
||||
package kotlinx.coroutines.channels;
|
||||
|
||||
import kotlin.Metadata;
|
||||
import kotlin.jvm.functions.Function3;
|
||||
import kotlin.jvm.internal.FunctionReferenceImpl;
|
||||
|
||||
/* compiled from: BufferedChannel.kt */
|
||||
@Metadata(k = 3, mv = {1, 8, 0}, xi = 48)
|
||||
/* loaded from: classes.dex */
|
||||
/* synthetic */ class BufferedChannel$onReceiveOrNull$2 extends FunctionReferenceImpl implements Function3<BufferedChannel<?>, Object, Object, Object> {
|
||||
public static final BufferedChannel$onReceiveOrNull$2 INSTANCE = new BufferedChannel$onReceiveOrNull$2();
|
||||
|
||||
BufferedChannel$onReceiveOrNull$2() {
|
||||
super(3, BufferedChannel.class, "processResultSelectReceiveOrNull", "processResultSelectReceiveOrNull(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;", 0);
|
||||
}
|
||||
|
||||
@Override // kotlin.jvm.functions.Function3
|
||||
public final Object invoke(BufferedChannel<?> bufferedChannel, Object obj, Object obj2) {
|
||||
Object processResultSelectReceiveOrNull;
|
||||
processResultSelectReceiveOrNull = bufferedChannel.processResultSelectReceiveOrNull(obj, obj2);
|
||||
return processResultSelectReceiveOrNull;
|
||||
}
|
||||
}
|
@ -0,0 +1,29 @@
|
||||
package kotlinx.coroutines.channels;
|
||||
|
||||
import kotlin.Metadata;
|
||||
import kotlin.Unit;
|
||||
import kotlin.jvm.functions.Function3;
|
||||
import kotlin.jvm.internal.FunctionReferenceImpl;
|
||||
import kotlinx.coroutines.selects.SelectInstance;
|
||||
|
||||
/* compiled from: BufferedChannel.kt */
|
||||
@Metadata(k = 3, mv = {1, 8, 0}, xi = 48)
|
||||
/* loaded from: classes.dex */
|
||||
/* synthetic */ class BufferedChannel$onSend$1 extends FunctionReferenceImpl implements Function3<BufferedChannel<?>, SelectInstance<?>, Object, Unit> {
|
||||
public static final BufferedChannel$onSend$1 INSTANCE = new BufferedChannel$onSend$1();
|
||||
|
||||
BufferedChannel$onSend$1() {
|
||||
super(3, BufferedChannel.class, "registerSelectForSend", "registerSelectForSend(Lkotlinx/coroutines/selects/SelectInstance;Ljava/lang/Object;)V", 0);
|
||||
}
|
||||
|
||||
@Override // kotlin.jvm.functions.Function3
|
||||
public /* bridge */ /* synthetic */ Unit invoke(BufferedChannel<?> bufferedChannel, SelectInstance<?> selectInstance, Object obj) {
|
||||
invoke2(bufferedChannel, selectInstance, obj);
|
||||
return Unit.INSTANCE;
|
||||
}
|
||||
|
||||
/* renamed from: invoke, reason: avoid collision after fix types in other method */
|
||||
public final void invoke2(BufferedChannel<?> bufferedChannel, SelectInstance<?> selectInstance, Object obj) {
|
||||
bufferedChannel.registerSelectForSend(selectInstance, obj);
|
||||
}
|
||||
}
|
@ -0,0 +1,23 @@
|
||||
package kotlinx.coroutines.channels;
|
||||
|
||||
import kotlin.Metadata;
|
||||
import kotlin.jvm.functions.Function3;
|
||||
import kotlin.jvm.internal.FunctionReferenceImpl;
|
||||
|
||||
/* compiled from: BufferedChannel.kt */
|
||||
@Metadata(k = 3, mv = {1, 8, 0}, xi = 48)
|
||||
/* loaded from: classes.dex */
|
||||
/* synthetic */ class BufferedChannel$onSend$2 extends FunctionReferenceImpl implements Function3<BufferedChannel<?>, Object, Object, Object> {
|
||||
public static final BufferedChannel$onSend$2 INSTANCE = new BufferedChannel$onSend$2();
|
||||
|
||||
BufferedChannel$onSend$2() {
|
||||
super(3, BufferedChannel.class, "processResultSelectSend", "processResultSelectSend(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;", 0);
|
||||
}
|
||||
|
||||
@Override // kotlin.jvm.functions.Function3
|
||||
public final Object invoke(BufferedChannel<?> bufferedChannel, Object obj, Object obj2) {
|
||||
Object processResultSelectSend;
|
||||
processResultSelectSend = bufferedChannel.processResultSelectSend(obj, obj2);
|
||||
return processResultSelectSend;
|
||||
}
|
||||
}
|
@ -0,0 +1,31 @@
|
||||
package kotlinx.coroutines.channels;
|
||||
|
||||
import kotlin.Metadata;
|
||||
import kotlin.coroutines.Continuation;
|
||||
import kotlin.coroutines.intrinsics.IntrinsicsKt;
|
||||
import kotlin.coroutines.jvm.internal.ContinuationImpl;
|
||||
import kotlin.coroutines.jvm.internal.DebugMetadata;
|
||||
|
||||
/* compiled from: BufferedChannel.kt */
|
||||
@Metadata(k = 3, mv = {1, 8, 0}, xi = 48)
|
||||
@DebugMetadata(c = "kotlinx.coroutines.channels.BufferedChannel", f = "BufferedChannel.kt", i = {}, l = {739}, m = "receiveCatching-JP2dKIU$suspendImpl", n = {}, s = {})
|
||||
/* loaded from: classes.dex */
|
||||
final class BufferedChannel$receiveCatching$1<E> extends ContinuationImpl {
|
||||
int label;
|
||||
/* synthetic */ Object result;
|
||||
final /* synthetic */ BufferedChannel<E> this$0;
|
||||
|
||||
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
||||
BufferedChannel$receiveCatching$1(BufferedChannel<E> bufferedChannel, Continuation<? super BufferedChannel$receiveCatching$1> continuation) {
|
||||
super(continuation);
|
||||
this.this$0 = bufferedChannel;
|
||||
}
|
||||
|
||||
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
||||
public final Object invokeSuspend(Object obj) {
|
||||
this.result = obj;
|
||||
this.label |= Integer.MIN_VALUE;
|
||||
Object m1854receiveCatchingJP2dKIU$suspendImpl = BufferedChannel.m1854receiveCatchingJP2dKIU$suspendImpl(this.this$0, this);
|
||||
return m1854receiveCatchingJP2dKIU$suspendImpl == IntrinsicsKt.getCOROUTINE_SUSPENDED() ? m1854receiveCatchingJP2dKIU$suspendImpl : ChannelResult.m1862boximpl(m1854receiveCatchingJP2dKIU$suspendImpl);
|
||||
}
|
||||
}
|
@ -0,0 +1,36 @@
|
||||
package kotlinx.coroutines.channels;
|
||||
|
||||
import kotlin.Metadata;
|
||||
import kotlin.coroutines.Continuation;
|
||||
import kotlin.coroutines.intrinsics.IntrinsicsKt;
|
||||
import kotlin.coroutines.jvm.internal.ContinuationImpl;
|
||||
import kotlin.coroutines.jvm.internal.DebugMetadata;
|
||||
|
||||
/* compiled from: BufferedChannel.kt */
|
||||
@Metadata(k = 3, mv = {1, 8, 0}, xi = 48)
|
||||
@DebugMetadata(c = "kotlinx.coroutines.channels.BufferedChannel", f = "BufferedChannel.kt", i = {0, 0, 0, 0}, l = {3056}, m = "receiveCatchingOnNoWaiterSuspend-GKJJFZk", n = {"this", "segment", "index", "r"}, s = {"L$0", "L$1", "I$0", "J$0"})
|
||||
/* loaded from: classes.dex */
|
||||
final class BufferedChannel$receiveCatchingOnNoWaiterSuspend$1 extends ContinuationImpl {
|
||||
int I$0;
|
||||
long J$0;
|
||||
Object L$0;
|
||||
Object L$1;
|
||||
int label;
|
||||
/* synthetic */ Object result;
|
||||
final /* synthetic */ BufferedChannel<E> this$0;
|
||||
|
||||
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
||||
BufferedChannel$receiveCatchingOnNoWaiterSuspend$1(BufferedChannel<E> bufferedChannel, Continuation<? super BufferedChannel$receiveCatchingOnNoWaiterSuspend$1> continuation) {
|
||||
super(continuation);
|
||||
this.this$0 = bufferedChannel;
|
||||
}
|
||||
|
||||
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
||||
public final Object invokeSuspend(Object obj) {
|
||||
Object m1855receiveCatchingOnNoWaiterSuspendGKJJFZk;
|
||||
this.result = obj;
|
||||
this.label |= Integer.MIN_VALUE;
|
||||
m1855receiveCatchingOnNoWaiterSuspendGKJJFZk = this.this$0.m1855receiveCatchingOnNoWaiterSuspendGKJJFZk(null, 0, 0L, this);
|
||||
return m1855receiveCatchingOnNoWaiterSuspendGKJJFZk == IntrinsicsKt.getCOROUTINE_SUSPENDED() ? m1855receiveCatchingOnNoWaiterSuspendGKJJFZk : ChannelResult.m1862boximpl(m1855receiveCatchingOnNoWaiterSuspendGKJJFZk);
|
||||
}
|
||||
}
|
3330
02-Easy5/E5/sources/kotlinx/coroutines/channels/BufferedChannel.java
Normal file
3330
02-Easy5/E5/sources/kotlinx/coroutines/channels/BufferedChannel.java
Normal file
File diff suppressed because one or more lines are too long
@ -0,0 +1,28 @@
|
||||
package kotlinx.coroutines.channels;
|
||||
|
||||
import kotlin.Metadata;
|
||||
import kotlin.jvm.functions.Function2;
|
||||
import kotlin.jvm.internal.FunctionReferenceImpl;
|
||||
|
||||
/* JADX INFO: Add missing generic type declarations: [E] */
|
||||
/* compiled from: BufferedChannel.kt */
|
||||
@Metadata(k = 3, mv = {1, 8, 0}, xi = 48)
|
||||
/* loaded from: classes.dex */
|
||||
/* synthetic */ class BufferedChannelKt$createSegmentFunction$1<E> extends FunctionReferenceImpl implements Function2<Long, ChannelSegment<E>, ChannelSegment<E>> {
|
||||
public static final BufferedChannelKt$createSegmentFunction$1 INSTANCE = new BufferedChannelKt$createSegmentFunction$1();
|
||||
|
||||
BufferedChannelKt$createSegmentFunction$1() {
|
||||
super(2, BufferedChannelKt.class, "createSegment", "createSegment(JLkotlinx/coroutines/channels/ChannelSegment;)Lkotlinx/coroutines/channels/ChannelSegment;", 1);
|
||||
}
|
||||
|
||||
@Override // kotlin.jvm.functions.Function2
|
||||
public /* bridge */ /* synthetic */ Object invoke(Long l, Object obj) {
|
||||
return invoke(l.longValue(), (ChannelSegment) obj);
|
||||
}
|
||||
|
||||
public final ChannelSegment<E> invoke(long j, ChannelSegment<E> channelSegment) {
|
||||
ChannelSegment<E> createSegment;
|
||||
createSegment = BufferedChannelKt.createSegment(j, channelSegment);
|
||||
return createSegment;
|
||||
}
|
||||
}
|
File diff suppressed because one or more lines are too long
70
02-Easy5/E5/sources/kotlinx/coroutines/channels/Channel.java
Normal file
70
02-Easy5/E5/sources/kotlinx/coroutines/channels/Channel.java
Normal file
@ -0,0 +1,70 @@
|
||||
package kotlinx.coroutines.channels;
|
||||
|
||||
import kotlin.Deprecated;
|
||||
import kotlin.DeprecationLevel;
|
||||
import kotlin.Metadata;
|
||||
import kotlin.ReplaceWith;
|
||||
import kotlin.coroutines.Continuation;
|
||||
import kotlinx.coroutines.channels.ReceiveChannel;
|
||||
import kotlinx.coroutines.channels.SendChannel;
|
||||
import kotlinx.coroutines.internal.SystemPropsKt;
|
||||
import kotlinx.coroutines.selects.SelectClause1;
|
||||
|
||||
/* compiled from: Channel.kt */
|
||||
@Metadata(d1 = {"\u0000\u0012\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\bf\u0018\u0000 \u0004*\u0004\b\u0000\u0010\u00012\b\u0012\u0004\u0012\u0002H\u00010\u00022\b\u0012\u0004\u0012\u0002H\u00010\u0003:\u0001\u0004¨\u0006\u0005"}, d2 = {"Lkotlinx/coroutines/channels/Channel;", "E", "Lkotlinx/coroutines/channels/SendChannel;", "Lkotlinx/coroutines/channels/ReceiveChannel;", "Factory", "kotlinx-coroutines-core"}, k = 1, mv = {1, 8, 0}, xi = 48)
|
||||
/* loaded from: classes.dex */
|
||||
public interface Channel<E> extends SendChannel<E>, ReceiveChannel<E> {
|
||||
public static final int BUFFERED = -2;
|
||||
public static final int CONFLATED = -1;
|
||||
public static final String DEFAULT_BUFFER_PROPERTY_NAME = "kotlinx.coroutines.channels.defaultBuffer";
|
||||
|
||||
/* renamed from: Factory, reason: from kotlin metadata */
|
||||
public static final Companion INSTANCE = Companion.$$INSTANCE;
|
||||
public static final int OPTIONAL_CHANNEL = -3;
|
||||
public static final int RENDEZVOUS = 0;
|
||||
public static final int UNLIMITED = Integer.MAX_VALUE;
|
||||
|
||||
/* compiled from: Channel.kt */
|
||||
@Metadata(k = 3, mv = {1, 8, 0}, xi = 48)
|
||||
public static final class DefaultImpls {
|
||||
public static <E> SelectClause1<E> getOnReceiveOrNull(Channel<E> channel) {
|
||||
return ReceiveChannel.DefaultImpls.getOnReceiveOrNull(channel);
|
||||
}
|
||||
|
||||
@Deprecated(level = DeprecationLevel.ERROR, message = "Deprecated in the favour of 'trySend' method", replaceWith = @ReplaceWith(expression = "trySend(element).isSuccess", imports = {}))
|
||||
public static <E> boolean offer(Channel<E> channel, E e) {
|
||||
return SendChannel.DefaultImpls.offer(channel, e);
|
||||
}
|
||||
|
||||
@Deprecated(level = DeprecationLevel.ERROR, message = "Deprecated in the favour of 'tryReceive'. Please note that the provided replacement does not rethrow channel's close cause as 'poll' did, for the precise replacement please refer to the 'poll' documentation", replaceWith = @ReplaceWith(expression = "tryReceive().getOrNull()", imports = {}))
|
||||
public static <E> E poll(Channel<E> channel) {
|
||||
return (E) ReceiveChannel.DefaultImpls.poll(channel);
|
||||
}
|
||||
|
||||
@Deprecated(level = DeprecationLevel.ERROR, message = "Deprecated in favor of 'receiveCatching'. Please note that the provided replacement does not rethrow channel's close cause as 'receiveOrNull' did, for the detailed replacement please refer to the 'receiveOrNull' documentation", replaceWith = @ReplaceWith(expression = "receiveCatching().getOrNull()", imports = {}))
|
||||
public static <E> Object receiveOrNull(Channel<E> channel, Continuation<? super E> continuation) {
|
||||
return ReceiveChannel.DefaultImpls.receiveOrNull(channel, continuation);
|
||||
}
|
||||
}
|
||||
|
||||
/* compiled from: Channel.kt */
|
||||
@Metadata(d1 = {"\u0000\u001c\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0002\n\u0002\u0010\b\n\u0002\b\u0005\n\u0002\u0010\u000e\n\u0002\b\u0004\b\u0086\u0003\u0018\u00002\u00020\u0001B\u0007\b\u0002¢\u0006\u0002\u0010\u0002R\u000e\u0010\u0003\u001a\u00020\u0004X\u0086T¢\u0006\u0002\n\u0000R\u0014\u0010\u0005\u001a\u00020\u0004X\u0080\u0004¢\u0006\b\n\u0000\u001a\u0004\b\u0006\u0010\u0007R\u000e\u0010\b\u001a\u00020\u0004X\u0086T¢\u0006\u0002\n\u0000R\u000e\u0010\t\u001a\u00020\nX\u0086T¢\u0006\u0002\n\u0000R\u000e\u0010\u000b\u001a\u00020\u0004X\u0080T¢\u0006\u0002\n\u0000R\u000e\u0010\f\u001a\u00020\u0004X\u0086T¢\u0006\u0002\n\u0000R\u000e\u0010\r\u001a\u00020\u0004X\u0086T¢\u0006\u0002\n\u0000¨\u0006\u000e"}, d2 = {"Lkotlinx/coroutines/channels/Channel$Factory;", "", "()V", "BUFFERED", "", "CHANNEL_DEFAULT_CAPACITY", "getCHANNEL_DEFAULT_CAPACITY$kotlinx_coroutines_core", "()I", "CONFLATED", "DEFAULT_BUFFER_PROPERTY_NAME", "", "OPTIONAL_CHANNEL", "RENDEZVOUS", "UNLIMITED", "kotlinx-coroutines-core"}, k = 1, mv = {1, 8, 0}, xi = 48)
|
||||
/* renamed from: kotlinx.coroutines.channels.Channel$Factory, reason: from kotlin metadata */
|
||||
public static final class Companion {
|
||||
public static final int BUFFERED = -2;
|
||||
public static final int CONFLATED = -1;
|
||||
public static final String DEFAULT_BUFFER_PROPERTY_NAME = "kotlinx.coroutines.channels.defaultBuffer";
|
||||
public static final int OPTIONAL_CHANNEL = -3;
|
||||
public static final int RENDEZVOUS = 0;
|
||||
public static final int UNLIMITED = Integer.MAX_VALUE;
|
||||
static final /* synthetic */ Companion $$INSTANCE = new Companion();
|
||||
private static final int CHANNEL_DEFAULT_CAPACITY = SystemPropsKt.systemProp("kotlinx.coroutines.channels.defaultBuffer", 64, 1, 2147483646);
|
||||
|
||||
public final int getCHANNEL_DEFAULT_CAPACITY$kotlinx_coroutines_core() {
|
||||
return CHANNEL_DEFAULT_CAPACITY;
|
||||
}
|
||||
|
||||
private Companion() {
|
||||
}
|
||||
}
|
||||
}
|
File diff suppressed because one or more lines are too long
@ -0,0 +1,28 @@
|
||||
package kotlinx.coroutines.channels;
|
||||
|
||||
import kotlin.Metadata;
|
||||
import kotlin.coroutines.Continuation;
|
||||
import kotlin.coroutines.jvm.internal.ContinuationImpl;
|
||||
import kotlin.coroutines.jvm.internal.DebugMetadata;
|
||||
import kotlinx.coroutines.channels.ChannelIterator;
|
||||
|
||||
/* compiled from: Channel.kt */
|
||||
@Metadata(k = 3, mv = {1, 8, 0}, xi = 48)
|
||||
@DebugMetadata(c = "kotlinx.coroutines.channels.ChannelIterator$DefaultImpls", f = "Channel.kt", i = {0}, l = {589}, m = "next", n = {"$this"}, s = {"L$0"})
|
||||
/* loaded from: classes.dex */
|
||||
final class ChannelIterator$next0$1<E> extends ContinuationImpl {
|
||||
Object L$0;
|
||||
int label;
|
||||
/* synthetic */ Object result;
|
||||
|
||||
ChannelIterator$next0$1(Continuation<? super ChannelIterator$next0$1> continuation) {
|
||||
super(continuation);
|
||||
}
|
||||
|
||||
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
||||
public final Object invokeSuspend(Object obj) {
|
||||
this.result = obj;
|
||||
this.label |= Integer.MIN_VALUE;
|
||||
return ChannelIterator.DefaultImpls.next(null, this);
|
||||
}
|
||||
}
|
@ -0,0 +1,86 @@
|
||||
package kotlinx.coroutines.channels;
|
||||
|
||||
import kotlin.Deprecated;
|
||||
import kotlin.DeprecationLevel;
|
||||
import kotlin.Metadata;
|
||||
import kotlin.coroutines.Continuation;
|
||||
|
||||
/* compiled from: Channel.kt */
|
||||
@Metadata(d1 = {"\u0000\u0014\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0000\n\u0000\n\u0002\u0010\u000b\n\u0002\b\u0005\bf\u0018\u0000*\u0006\b\u0000\u0010\u0001 \u00012\u00020\u0002J\u0011\u0010\u0003\u001a\u00020\u0004H¦Bø\u0001\u0000¢\u0006\u0002\u0010\u0005J\u000e\u0010\u0006\u001a\u00028\u0000H¦\u0002¢\u0006\u0002\u0010\u0007J\u0013\u0010\b\u001a\u00028\u0000H\u0097@ø\u0001\u0000¢\u0006\u0004\b\u0006\u0010\u0005\u0082\u0002\u0004\n\u0002\b\u0019¨\u0006\t"}, d2 = {"Lkotlinx/coroutines/channels/ChannelIterator;", "E", "", "hasNext", "", "(Lkotlin/coroutines/Continuation;)Ljava/lang/Object;", "next", "()Ljava/lang/Object;", "next0", "kotlinx-coroutines-core"}, k = 1, mv = {1, 8, 0}, xi = 48)
|
||||
/* loaded from: classes.dex */
|
||||
public interface ChannelIterator<E> {
|
||||
Object hasNext(Continuation<? super Boolean> continuation);
|
||||
|
||||
E next();
|
||||
|
||||
@Deprecated(level = DeprecationLevel.HIDDEN, message = "Since 1.3.0, binary compatibility with versions <= 1.2.x")
|
||||
/* synthetic */ Object next(Continuation continuation);
|
||||
|
||||
/* compiled from: Channel.kt */
|
||||
@Metadata(k = 3, mv = {1, 8, 0}, xi = 48)
|
||||
public static final class DefaultImpls {
|
||||
/* JADX WARN: Removed duplicated region for block: B:12:0x004c */
|
||||
/* JADX WARN: Removed duplicated region for block: B:15:0x0051 */
|
||||
/* JADX WARN: Removed duplicated region for block: B:19:0x0036 */
|
||||
/* JADX WARN: Removed duplicated region for block: B:8:0x0024 */
|
||||
@kotlin.Deprecated(level = kotlin.DeprecationLevel.HIDDEN, message = "Since 1.3.0, binary compatibility with versions <= 1.2.x")
|
||||
/*
|
||||
Code decompiled incorrectly, please refer to instructions dump.
|
||||
To view partially-correct add '--show-bad-code' argument
|
||||
*/
|
||||
public static /* synthetic */ java.lang.Object next(kotlinx.coroutines.channels.ChannelIterator r4, kotlin.coroutines.Continuation r5) {
|
||||
/*
|
||||
boolean r0 = r5 instanceof kotlinx.coroutines.channels.ChannelIterator$next0$1
|
||||
if (r0 == 0) goto L14
|
||||
r0 = r5
|
||||
kotlinx.coroutines.channels.ChannelIterator$next0$1 r0 = (kotlinx.coroutines.channels.ChannelIterator$next0$1) r0
|
||||
int r1 = r0.label
|
||||
r2 = -2147483648(0xffffffff80000000, float:-0.0)
|
||||
r1 = r1 & r2
|
||||
if (r1 == 0) goto L14
|
||||
int r5 = r0.label
|
||||
int r5 = r5 - r2
|
||||
r0.label = r5
|
||||
goto L19
|
||||
L14:
|
||||
kotlinx.coroutines.channels.ChannelIterator$next0$1 r0 = new kotlinx.coroutines.channels.ChannelIterator$next0$1
|
||||
r0.<init>(r5)
|
||||
L19:
|
||||
java.lang.Object r5 = r0.result
|
||||
java.lang.Object r1 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED()
|
||||
int r2 = r0.label
|
||||
r3 = 1
|
||||
if (r2 == 0) goto L36
|
||||
if (r2 != r3) goto L2e
|
||||
java.lang.Object r4 = r0.L$0
|
||||
kotlinx.coroutines.channels.ChannelIterator r4 = (kotlinx.coroutines.channels.ChannelIterator) r4
|
||||
kotlin.ResultKt.throwOnFailure(r5)
|
||||
goto L44
|
||||
L2e:
|
||||
java.lang.IllegalStateException r4 = new java.lang.IllegalStateException
|
||||
java.lang.String r5 = "call to 'resume' before 'invoke' with coroutine"
|
||||
r4.<init>(r5)
|
||||
throw r4
|
||||
L36:
|
||||
kotlin.ResultKt.throwOnFailure(r5)
|
||||
r0.L$0 = r4
|
||||
r0.label = r3
|
||||
java.lang.Object r5 = r4.hasNext(r0)
|
||||
if (r5 != r1) goto L44
|
||||
return r1
|
||||
L44:
|
||||
java.lang.Boolean r5 = (java.lang.Boolean) r5
|
||||
boolean r5 = r5.booleanValue()
|
||||
if (r5 == 0) goto L51
|
||||
java.lang.Object r4 = r4.next()
|
||||
return r4
|
||||
L51:
|
||||
kotlinx.coroutines.channels.ClosedReceiveChannelException r4 = new kotlinx.coroutines.channels.ClosedReceiveChannelException
|
||||
java.lang.String r5 = "Channel was closed"
|
||||
r4.<init>(r5)
|
||||
throw r4
|
||||
*/
|
||||
throw new UnsupportedOperationException("Method not decompiled: kotlinx.coroutines.channels.ChannelIterator.DefaultImpls.next(kotlinx.coroutines.channels.ChannelIterator, kotlin.coroutines.Continuation):java.lang.Object");
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,93 @@
|
||||
package kotlinx.coroutines.channels;
|
||||
|
||||
import kotlin.Deprecated;
|
||||
import kotlin.DeprecationLevel;
|
||||
import kotlin.Metadata;
|
||||
import kotlin.Unit;
|
||||
import kotlin.jvm.functions.Function1;
|
||||
import kotlinx.coroutines.channels.ChannelResult;
|
||||
|
||||
/* compiled from: Channel.kt */
|
||||
@Metadata(d1 = {"\u00004\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\b\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0010\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0003\n\u0002\u0018\u0002\n\u0002\b\f\u001a\u001e\u0010\u0000\u001a\b\u0012\u0004\u0012\u0002H\u00020\u0001\"\u0004\b\u0000\u0010\u00022\b\b\u0002\u0010\u0003\u001a\u00020\u0004H\u0007\u001a>\u0010\u0000\u001a\b\u0012\u0004\u0012\u0002H\u00020\u0001\"\u0004\b\u0000\u0010\u00022\b\b\u0002\u0010\u0003\u001a\u00020\u00042\b\b\u0002\u0010\u0005\u001a\u00020\u00062\u0016\b\u0002\u0010\u0007\u001a\u0010\u0012\u0004\u0012\u0002H\u0002\u0012\u0004\u0012\u00020\t\u0018\u00010\b\u001aX\u0010\n\u001a\u0002H\u000b\"\u0004\b\u0000\u0010\u000b*\b\u0012\u0004\u0012\u0002H\u000b0\f2#\u0010\r\u001a\u001f\u0012\u0015\u0012\u0013\u0018\u00010\u000e¢\u0006\f\b\u000f\u0012\b\b\u0010\u0012\u0004\b\b(\u0011\u0012\u0004\u0012\u0002H\u000b0\bH\u0086\bø\u0001\u0000ø\u0001\u0001\u0082\u0002\n\n\b\b\u0001\u0012\u0002\u0010\u0001 \u0000¢\u0006\u0004\b\u0012\u0010\u0013\u001a^\u0010\u0014\u001a\b\u0012\u0004\u0012\u0002H\u000b0\f\"\u0004\b\u0000\u0010\u000b*\b\u0012\u0004\u0012\u0002H\u000b0\f2#\u0010\u0015\u001a\u001f\u0012\u0015\u0012\u0013\u0018\u00010\u000e¢\u0006\f\b\u000f\u0012\b\b\u0010\u0012\u0004\b\b(\u0011\u0012\u0004\u0012\u00020\t0\bH\u0086\bø\u0001\u0000ø\u0001\u0001\u0082\u0002\n\n\b\b\u0001\u0012\u0002\u0010\u0001 \u0000¢\u0006\u0004\b\u0016\u0010\u0013\u001a^\u0010\r\u001a\b\u0012\u0004\u0012\u0002H\u000b0\f\"\u0004\b\u0000\u0010\u000b*\b\u0012\u0004\u0012\u0002H\u000b0\f2#\u0010\u0015\u001a\u001f\u0012\u0015\u0012\u0013\u0018\u00010\u000e¢\u0006\f\b\u000f\u0012\b\b\u0010\u0012\u0004\b\b(\u0011\u0012\u0004\u0012\u00020\t0\bH\u0086\bø\u0001\u0000ø\u0001\u0001\u0082\u0002\n\n\b\b\u0001\u0012\u0002\u0010\u0001 \u0000¢\u0006\u0004\b\u0017\u0010\u0013\u001a\\\u0010\u0018\u001a\b\u0012\u0004\u0012\u0002H\u000b0\f\"\u0004\b\u0000\u0010\u000b*\b\u0012\u0004\u0012\u0002H\u000b0\f2!\u0010\u0015\u001a\u001d\u0012\u0013\u0012\u0011H\u000b¢\u0006\f\b\u000f\u0012\b\b\u0010\u0012\u0004\b\b(\u0019\u0012\u0004\u0012\u00020\t0\bH\u0086\bø\u0001\u0000ø\u0001\u0001\u0082\u0002\n\n\b\b\u0001\u0012\u0002\u0010\u0001 \u0000¢\u0006\u0004\b\u001a\u0010\u0013\u0082\u0002\u000b\n\u0005\b¡\u001e0\u0001\n\u0002\b\u0019¨\u0006\u001b"}, d2 = {"Channel", "Lkotlinx/coroutines/channels/Channel;", "E", "capacity", "", "onBufferOverflow", "Lkotlinx/coroutines/channels/BufferOverflow;", "onUndeliveredElement", "Lkotlin/Function1;", "", "getOrElse", "T", "Lkotlinx/coroutines/channels/ChannelResult;", "onFailure", "", "Lkotlin/ParameterName;", "name", "exception", "getOrElse-WpGqRn0", "(Ljava/lang/Object;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;", "onClosed", "action", "onClosed-WpGqRn0", "onFailure-WpGqRn0", "onSuccess", "value", "onSuccess-WpGqRn0", "kotlinx-coroutines-core"}, k = 2, mv = {1, 8, 0}, xi = 48)
|
||||
/* loaded from: classes.dex */
|
||||
public final class ChannelKt {
|
||||
/* JADX WARN: Multi-variable type inference failed */
|
||||
/* renamed from: getOrElse-WpGqRn0, reason: not valid java name */
|
||||
public static final <T> T m1858getOrElseWpGqRn0(Object obj, Function1<? super Throwable, ? extends T> function1) {
|
||||
return obj instanceof ChannelResult.Failed ? function1.invoke(ChannelResult.m1866exceptionOrNullimpl(obj)) : obj;
|
||||
}
|
||||
|
||||
/* renamed from: onSuccess-WpGqRn0, reason: not valid java name */
|
||||
public static final <T> Object m1861onSuccessWpGqRn0(Object obj, Function1<? super T, Unit> function1) {
|
||||
if (!(obj instanceof ChannelResult.Failed)) {
|
||||
function1.invoke(obj);
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
||||
/* renamed from: onFailure-WpGqRn0, reason: not valid java name */
|
||||
public static final <T> Object m1860onFailureWpGqRn0(Object obj, Function1<? super Throwable, Unit> function1) {
|
||||
if (obj instanceof ChannelResult.Failed) {
|
||||
function1.invoke(ChannelResult.m1866exceptionOrNullimpl(obj));
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
||||
/* renamed from: onClosed-WpGqRn0, reason: not valid java name */
|
||||
public static final <T> Object m1859onClosedWpGqRn0(Object obj, Function1<? super Throwable, Unit> function1) {
|
||||
if (obj instanceof ChannelResult.Closed) {
|
||||
function1.invoke(ChannelResult.m1866exceptionOrNullimpl(obj));
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
||||
public static /* synthetic */ Channel Channel$default(int i, BufferOverflow bufferOverflow, Function1 function1, int i2, Object obj) {
|
||||
if ((i2 & 1) != 0) {
|
||||
i = 0;
|
||||
}
|
||||
if ((i2 & 2) != 0) {
|
||||
bufferOverflow = BufferOverflow.SUSPEND;
|
||||
}
|
||||
if ((i2 & 4) != 0) {
|
||||
function1 = null;
|
||||
}
|
||||
return Channel(i, bufferOverflow, function1);
|
||||
}
|
||||
|
||||
public static final <E> Channel<E> Channel(int i, BufferOverflow bufferOverflow, Function1<? super E, Unit> function1) {
|
||||
ConflatedBufferedChannel conflatedBufferedChannel;
|
||||
if (i == -2) {
|
||||
return bufferOverflow == BufferOverflow.SUSPEND ? new BufferedChannel<>(Channel.INSTANCE.getCHANNEL_DEFAULT_CAPACITY$kotlinx_coroutines_core(), function1) : new ConflatedBufferedChannel(1, bufferOverflow, function1);
|
||||
}
|
||||
if (i == -1) {
|
||||
if (bufferOverflow != BufferOverflow.SUSPEND) {
|
||||
throw new IllegalArgumentException("CONFLATED capacity cannot be used with non-default onBufferOverflow".toString());
|
||||
}
|
||||
return new ConflatedBufferedChannel(1, BufferOverflow.DROP_OLDEST, function1);
|
||||
}
|
||||
if (i != 0) {
|
||||
if (i == Integer.MAX_VALUE) {
|
||||
return new BufferedChannel(Integer.MAX_VALUE, function1);
|
||||
}
|
||||
return bufferOverflow == BufferOverflow.SUSPEND ? new BufferedChannel<>(i, function1) : new ConflatedBufferedChannel(i, bufferOverflow, function1);
|
||||
}
|
||||
if (bufferOverflow == BufferOverflow.SUSPEND) {
|
||||
conflatedBufferedChannel = new BufferedChannel<>(0, function1);
|
||||
} else {
|
||||
conflatedBufferedChannel = new ConflatedBufferedChannel(1, bufferOverflow, function1);
|
||||
}
|
||||
return conflatedBufferedChannel;
|
||||
}
|
||||
|
||||
@Deprecated(level = DeprecationLevel.HIDDEN, message = "Since 1.4.0, binary compatibility with earlier versions")
|
||||
public static final /* synthetic */ Channel Channel(int i) {
|
||||
return Channel$default(i, null, null, 6, null);
|
||||
}
|
||||
|
||||
public static /* synthetic */ Channel Channel$default(int i, int i2, Object obj) {
|
||||
if ((i2 & 1) != 0) {
|
||||
i = 0;
|
||||
}
|
||||
return Channel(i);
|
||||
}
|
||||
}
|
@ -0,0 +1,187 @@
|
||||
package kotlinx.coroutines.channels;
|
||||
|
||||
import kotlin.Metadata;
|
||||
import kotlin.jvm.JvmInline;
|
||||
import kotlin.jvm.internal.DefaultConstructorMarker;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
|
||||
/* compiled from: Channel.kt */
|
||||
@Metadata(d1 = {"\u0000.\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0000\n\u0002\b\u0006\n\u0002\u0010\u000b\n\u0002\b\u000b\n\u0002\u0010\u0003\n\u0002\b\u0007\n\u0002\u0010\b\n\u0002\b\u0003\n\u0002\u0010\u000e\n\u0002\b\u0006\b\u0087@\u0018\u0000 %*\u0006\b\u0000\u0010\u0001 \u00012\u00020\u0002:\u0003$%&B\u0016\b\u0001\u0012\b\u0010\u0003\u001a\u0004\u0018\u00010\u0002ø\u0001\u0000¢\u0006\u0004\b\u0004\u0010\u0005J\u001a\u0010\u0010\u001a\u00020\t2\b\u0010\u0011\u001a\u0004\u0018\u00010\u0002HÖ\u0003¢\u0006\u0004\b\u0012\u0010\u0013J\u000f\u0010\u0014\u001a\u0004\u0018\u00010\u0015¢\u0006\u0004\b\u0016\u0010\u0017J\u000f\u0010\u0018\u001a\u0004\u0018\u00018\u0000¢\u0006\u0004\b\u0019\u0010\u0005J\r\u0010\u001a\u001a\u00028\u0000¢\u0006\u0004\b\u001b\u0010\u0005J\u0010\u0010\u001c\u001a\u00020\u001dHÖ\u0001¢\u0006\u0004\b\u001e\u0010\u001fJ\u000f\u0010 \u001a\u00020!H\u0016¢\u0006\u0004\b\"\u0010#R\u0018\u0010\u0003\u001a\u0004\u0018\u00010\u00028\u0000X\u0081\u0004¢\u0006\b\n\u0000\u0012\u0004\b\u0006\u0010\u0007R\u0011\u0010\b\u001a\u00020\t8F¢\u0006\u0006\u001a\u0004\b\n\u0010\u000bR\u0011\u0010\f\u001a\u00020\t8F¢\u0006\u0006\u001a\u0004\b\r\u0010\u000bR\u0011\u0010\u000e\u001a\u00020\t8F¢\u0006\u0006\u001a\u0004\b\u000f\u0010\u000b\u0088\u0001\u0003\u0092\u0001\u0004\u0018\u00010\u0002ø\u0001\u0000\u0082\u0002\u0004\n\u0002\b\u0019¨\u0006'"}, d2 = {"Lkotlinx/coroutines/channels/ChannelResult;", "T", "", "holder", "constructor-impl", "(Ljava/lang/Object;)Ljava/lang/Object;", "getHolder$annotations", "()V", "isClosed", "", "isClosed-impl", "(Ljava/lang/Object;)Z", "isFailure", "isFailure-impl", "isSuccess", "isSuccess-impl", "equals", "other", "equals-impl", "(Ljava/lang/Object;Ljava/lang/Object;)Z", "exceptionOrNull", "", "exceptionOrNull-impl", "(Ljava/lang/Object;)Ljava/lang/Throwable;", "getOrNull", "getOrNull-impl", "getOrThrow", "getOrThrow-impl", "hashCode", "", "hashCode-impl", "(Ljava/lang/Object;)I", "toString", "", "toString-impl", "(Ljava/lang/Object;)Ljava/lang/String;", "Closed", "Companion", "Failed", "kotlinx-coroutines-core"}, k = 1, mv = {1, 8, 0}, xi = 48)
|
||||
@JvmInline
|
||||
/* loaded from: classes.dex */
|
||||
public final class ChannelResult<T> {
|
||||
|
||||
/* renamed from: Companion, reason: from kotlin metadata */
|
||||
public static final Companion INSTANCE = new Companion(null);
|
||||
private static final Failed failed = new Failed();
|
||||
private final Object holder;
|
||||
|
||||
/* compiled from: Channel.kt */
|
||||
@Metadata(d1 = {"\u0000\u0012\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0002\n\u0002\u0010\u000e\n\u0000\b\u0010\u0018\u00002\u00020\u0001B\u0005¢\u0006\u0002\u0010\u0002J\b\u0010\u0003\u001a\u00020\u0004H\u0016¨\u0006\u0005"}, d2 = {"Lkotlinx/coroutines/channels/ChannelResult$Failed;", "", "()V", "toString", "", "kotlinx-coroutines-core"}, k = 1, mv = {1, 8, 0}, xi = 48)
|
||||
public static class Failed {
|
||||
public String toString() {
|
||||
return "Failed";
|
||||
}
|
||||
}
|
||||
|
||||
/* renamed from: box-impl, reason: not valid java name */
|
||||
public static final /* synthetic */ ChannelResult m1862boximpl(Object obj) {
|
||||
return new ChannelResult(obj);
|
||||
}
|
||||
|
||||
/* renamed from: constructor-impl, reason: not valid java name */
|
||||
public static <T> Object m1863constructorimpl(Object obj) {
|
||||
return obj;
|
||||
}
|
||||
|
||||
/* renamed from: equals-impl, reason: not valid java name */
|
||||
public static boolean m1864equalsimpl(Object obj, Object obj2) {
|
||||
return (obj2 instanceof ChannelResult) && Intrinsics.areEqual(obj, ((ChannelResult) obj2).getHolder());
|
||||
}
|
||||
|
||||
/* renamed from: equals-impl0, reason: not valid java name */
|
||||
public static final boolean m1865equalsimpl0(Object obj, Object obj2) {
|
||||
return Intrinsics.areEqual(obj, obj2);
|
||||
}
|
||||
|
||||
public static /* synthetic */ void getHolder$annotations() {
|
||||
}
|
||||
|
||||
/* renamed from: hashCode-impl, reason: not valid java name */
|
||||
public static int m1869hashCodeimpl(Object obj) {
|
||||
if (obj == null) {
|
||||
return 0;
|
||||
}
|
||||
return obj.hashCode();
|
||||
}
|
||||
|
||||
public boolean equals(Object obj) {
|
||||
return m1864equalsimpl(this.holder, obj);
|
||||
}
|
||||
|
||||
public int hashCode() {
|
||||
return m1869hashCodeimpl(this.holder);
|
||||
}
|
||||
|
||||
/* renamed from: unbox-impl, reason: not valid java name and from getter */
|
||||
public final /* synthetic */ Object getHolder() {
|
||||
return this.holder;
|
||||
}
|
||||
|
||||
private /* synthetic */ ChannelResult(Object obj) {
|
||||
this.holder = obj;
|
||||
}
|
||||
|
||||
/* renamed from: isSuccess-impl, reason: not valid java name */
|
||||
public static final boolean m1872isSuccessimpl(Object obj) {
|
||||
return !(obj instanceof Failed);
|
||||
}
|
||||
|
||||
/* renamed from: isFailure-impl, reason: not valid java name */
|
||||
public static final boolean m1871isFailureimpl(Object obj) {
|
||||
return obj instanceof Failed;
|
||||
}
|
||||
|
||||
/* renamed from: isClosed-impl, reason: not valid java name */
|
||||
public static final boolean m1870isClosedimpl(Object obj) {
|
||||
return obj instanceof Closed;
|
||||
}
|
||||
|
||||
/* JADX WARN: Multi-variable type inference failed */
|
||||
/* renamed from: getOrNull-impl, reason: not valid java name */
|
||||
public static final T m1867getOrNullimpl(Object obj) {
|
||||
if (obj instanceof Failed) {
|
||||
return null;
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
||||
/* JADX WARN: Multi-variable type inference failed */
|
||||
/* renamed from: getOrThrow-impl, reason: not valid java name */
|
||||
public static final T m1868getOrThrowimpl(Object obj) {
|
||||
if (!(obj instanceof Failed)) {
|
||||
return obj;
|
||||
}
|
||||
if (obj instanceof Closed) {
|
||||
Closed closed = (Closed) obj;
|
||||
if (closed.cause != null) {
|
||||
throw closed.cause;
|
||||
}
|
||||
}
|
||||
throw new IllegalStateException(("Trying to call 'getOrThrow' on a failed channel result: " + obj).toString());
|
||||
}
|
||||
|
||||
/* renamed from: exceptionOrNull-impl, reason: not valid java name */
|
||||
public static final Throwable m1866exceptionOrNullimpl(Object obj) {
|
||||
Closed closed = obj instanceof Closed ? (Closed) obj : null;
|
||||
if (closed != null) {
|
||||
return closed.cause;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/* compiled from: Channel.kt */
|
||||
@Metadata(d1 = {"\u0000*\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0003\n\u0002\b\u0002\n\u0002\u0010\u000b\n\u0000\n\u0002\u0010\u0000\n\u0000\n\u0002\u0010\b\n\u0000\n\u0002\u0010\u000e\n\u0000\b\u0000\u0018\u00002\u00020\u0001B\u000f\u0012\b\u0010\u0002\u001a\u0004\u0018\u00010\u0003¢\u0006\u0002\u0010\u0004J\u0013\u0010\u0005\u001a\u00020\u00062\b\u0010\u0007\u001a\u0004\u0018\u00010\bH\u0096\u0002J\b\u0010\t\u001a\u00020\nH\u0016J\b\u0010\u000b\u001a\u00020\fH\u0016R\u0012\u0010\u0002\u001a\u0004\u0018\u00010\u00038\u0006X\u0087\u0004¢\u0006\u0002\n\u0000¨\u0006\r"}, d2 = {"Lkotlinx/coroutines/channels/ChannelResult$Closed;", "Lkotlinx/coroutines/channels/ChannelResult$Failed;", "cause", "", "(Ljava/lang/Throwable;)V", "equals", "", "other", "", "hashCode", "", "toString", "", "kotlinx-coroutines-core"}, k = 1, mv = {1, 8, 0}, xi = 48)
|
||||
public static final class Closed extends Failed {
|
||||
public final Throwable cause;
|
||||
|
||||
public Closed(Throwable th) {
|
||||
this.cause = th;
|
||||
}
|
||||
|
||||
public boolean equals(Object other) {
|
||||
return (other instanceof Closed) && Intrinsics.areEqual(this.cause, ((Closed) other).cause);
|
||||
}
|
||||
|
||||
public int hashCode() {
|
||||
Throwable th = this.cause;
|
||||
if (th != null) {
|
||||
return th.hashCode();
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override // kotlinx.coroutines.channels.ChannelResult.Failed
|
||||
public String toString() {
|
||||
return "Closed(" + this.cause + ')';
|
||||
}
|
||||
}
|
||||
|
||||
/* compiled from: Channel.kt */
|
||||
@Metadata(d1 = {"\u0000\"\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\u0003\n\u0002\b\n\b\u0087\u0003\u0018\u00002\u00020\u0001B\u0007\b\u0002¢\u0006\u0002\u0010\u0002J.\u0010\u0005\u001a\b\u0012\u0004\u0012\u0002H\u00070\u0006\"\u0004\b\u0001\u0010\u00072\b\u0010\b\u001a\u0004\u0018\u00010\tH\u0007ø\u0001\u0000ø\u0001\u0001ø\u0001\u0002¢\u0006\u0004\b\n\u0010\u000bJ$\u0010\f\u001a\b\u0012\u0004\u0012\u0002H\u00070\u0006\"\u0004\b\u0001\u0010\u0007H\u0007ø\u0001\u0000ø\u0001\u0001ø\u0001\u0002¢\u0006\u0004\b\r\u0010\u000eJ,\u0010\u000f\u001a\b\u0012\u0004\u0012\u0002H\u00070\u0006\"\u0004\b\u0001\u0010\u00072\u0006\u0010\u0010\u001a\u0002H\u0007H\u0007ø\u0001\u0000ø\u0001\u0001ø\u0001\u0002¢\u0006\u0004\b\u0011\u0010\u0012R\u000e\u0010\u0003\u001a\u00020\u0004X\u0082\u0004¢\u0006\u0002\n\u0000\u0082\u0002\u000f\n\u0002\b!\n\u0005\b¡\u001e0\u0001\n\u0002\b\u0019¨\u0006\u0013"}, d2 = {"Lkotlinx/coroutines/channels/ChannelResult$Companion;", "", "()V", "failed", "Lkotlinx/coroutines/channels/ChannelResult$Failed;", "closed", "Lkotlinx/coroutines/channels/ChannelResult;", "E", "cause", "", "closed-JP2dKIU", "(Ljava/lang/Throwable;)Ljava/lang/Object;", "failure", "failure-PtdJZtk", "()Ljava/lang/Object;", "success", "value", "success-JP2dKIU", "(Ljava/lang/Object;)Ljava/lang/Object;", "kotlinx-coroutines-core"}, k = 1, mv = {1, 8, 0}, xi = 48)
|
||||
public static final class Companion {
|
||||
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
|
||||
this();
|
||||
}
|
||||
|
||||
private Companion() {
|
||||
}
|
||||
|
||||
/* renamed from: success-JP2dKIU, reason: not valid java name */
|
||||
public final <E> Object m1877successJP2dKIU(E value) {
|
||||
return ChannelResult.m1863constructorimpl(value);
|
||||
}
|
||||
|
||||
/* renamed from: failure-PtdJZtk, reason: not valid java name */
|
||||
public final <E> Object m1876failurePtdJZtk() {
|
||||
return ChannelResult.m1863constructorimpl(ChannelResult.failed);
|
||||
}
|
||||
|
||||
/* renamed from: closed-JP2dKIU, reason: not valid java name */
|
||||
public final <E> Object m1875closedJP2dKIU(Throwable cause) {
|
||||
return ChannelResult.m1863constructorimpl(new Closed(cause));
|
||||
}
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return m1873toStringimpl(this.holder);
|
||||
}
|
||||
|
||||
/* renamed from: toString-impl, reason: not valid java name */
|
||||
public static String m1873toStringimpl(Object obj) {
|
||||
if (obj instanceof Closed) {
|
||||
return ((Closed) obj).toString();
|
||||
}
|
||||
return "Value(" + obj + ')';
|
||||
}
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
package kotlinx.coroutines.channels;
|
||||
|
||||
import java.util.concurrent.atomic.AtomicReferenceArray;
|
||||
|
||||
/* compiled from: D8$$SyntheticClass */
|
||||
/* loaded from: classes.dex */
|
||||
public final /* synthetic */ class ChannelSegment$$ExternalSyntheticBackportWithForwarding0 {
|
||||
public static /* synthetic */ boolean m(AtomicReferenceArray atomicReferenceArray, int i, Object obj, Object obj2) {
|
||||
while (!atomicReferenceArray.compareAndSet(i, obj, obj2)) {
|
||||
if (atomicReferenceArray.get(i) != obj) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
@ -0,0 +1,202 @@
|
||||
package kotlinx.coroutines.channels;
|
||||
|
||||
import androidx.constraintlayout.core.motion.utils.TypedValues;
|
||||
import java.util.concurrent.atomic.AtomicReferenceArray;
|
||||
import kotlin.Metadata;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
import kotlinx.coroutines.internal.Segment;
|
||||
|
||||
/* compiled from: BufferedChannel.kt */
|
||||
@Metadata(d1 = {"\u0000L\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\u0010\b\n\u0002\b\u0005\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0004\n\u0002\u0010\u000b\n\u0002\b\u0005\n\u0002\u0010\u0002\n\u0002\b\u000b\n\u0002\u0010\u0003\n\u0000\n\u0002\u0018\u0002\n\u0002\b\r\b\u0000\u0018\u0000*\u0004\b\u0000\u0010\u00012\u000e\u0012\n\u0012\b\u0012\u0004\u0012\u0002H\u00010\u00000\u0002B5\u0012\u0006\u0010\u0003\u001a\u00020\u0004\u0012\u000e\u0010\u0005\u001a\n\u0012\u0004\u0012\u00028\u0000\u0018\u00010\u0000\u0012\u000e\u0010\u0006\u001a\n\u0012\u0004\u0012\u00028\u0000\u0018\u00010\u0007\u0012\u0006\u0010\b\u001a\u00020\t¢\u0006\u0002\u0010\nJ)\u0010\u0014\u001a\u00020\u00152\u0006\u0010\u0016\u001a\u00020\t2\b\u0010\u0017\u001a\u0004\u0018\u00010\u00102\b\u0010\u0018\u001a\u0004\u0018\u00010\u0010H\u0000¢\u0006\u0002\b\u0019J\u0015\u0010\u001a\u001a\u00020\u001b2\u0006\u0010\u0016\u001a\u00020\tH\u0000¢\u0006\u0002\b\u001cJ!\u0010\u001d\u001a\u0004\u0018\u00010\u00102\u0006\u0010\u0016\u001a\u00020\t2\b\u0010\u001e\u001a\u0004\u0018\u00010\u0010H\u0000¢\u0006\u0002\b\u001fJ\u0017\u0010 \u001a\u00028\u00002\u0006\u0010\u0016\u001a\u00020\tH\u0000¢\u0006\u0004\b!\u0010\"J\u0017\u0010#\u001a\u0004\u0018\u00010\u00102\u0006\u0010\u0016\u001a\u00020\tH\u0000¢\u0006\u0002\b$J\"\u0010%\u001a\u00020\u001b2\u0006\u0010\u0016\u001a\u00020\t2\b\u0010&\u001a\u0004\u0018\u00010'2\u0006\u0010(\u001a\u00020)H\u0016J\u0016\u0010*\u001a\u00020\u001b2\u0006\u0010\u0016\u001a\u00020\t2\u0006\u0010+\u001a\u00020\u0015J\u0017\u0010,\u001a\u00028\u00002\u0006\u0010\u0016\u001a\u00020\tH\u0000¢\u0006\u0004\b-\u0010\"J\u001a\u0010.\u001a\u00020\u001b2\u0006\u0010\u0016\u001a\u00020\t2\b\u0010/\u001a\u0004\u0018\u00010\u0010H\u0002J\u001f\u00100\u001a\u00020\u001b2\u0006\u0010\u0016\u001a\u00020\t2\b\u0010/\u001a\u0004\u0018\u00010\u0010H\u0000¢\u0006\u0002\b1J\u001f\u00102\u001a\u00020\u001b2\u0006\u0010\u0016\u001a\u00020\t2\u0006\u00103\u001a\u00028\u0000H\u0000¢\u0006\u0004\b4\u00105R\u0016\u0010\u000b\u001a\n\u0012\u0004\u0012\u00028\u0000\u0018\u00010\u0007X\u0082\u0004¢\u0006\u0002\n\u0000R\u0017\u0010\u0006\u001a\b\u0012\u0004\u0012\u00028\u00000\u00078F¢\u0006\u0006\u001a\u0004\b\f\u0010\rR\u0011\u0010\u000e\u001a\n\u0012\u0006\u0012\u0004\u0018\u00010\u00100\u000fX\u0082\u0004R\u0014\u0010\u0011\u001a\u00020\t8VX\u0096\u0004¢\u0006\u0006\u001a\u0004\b\u0012\u0010\u0013¨\u00066"}, d2 = {"Lkotlinx/coroutines/channels/ChannelSegment;", "E", "Lkotlinx/coroutines/internal/Segment;", "id", "", "prev", "channel", "Lkotlinx/coroutines/channels/BufferedChannel;", "pointers", "", "(JLkotlinx/coroutines/channels/ChannelSegment;Lkotlinx/coroutines/channels/BufferedChannel;I)V", "_channel", "getChannel", "()Lkotlinx/coroutines/channels/BufferedChannel;", "data", "Lkotlinx/atomicfu/AtomicArray;", "", "numberOfSlots", "getNumberOfSlots", "()I", "casState", "", "index", TypedValues.TransitionType.S_FROM, TypedValues.TransitionType.S_TO, "casState$kotlinx_coroutines_core", "cleanElement", "", "cleanElement$kotlinx_coroutines_core", "getAndSetState", "update", "getAndSetState$kotlinx_coroutines_core", "getElement", "getElement$kotlinx_coroutines_core", "(I)Ljava/lang/Object;", "getState", "getState$kotlinx_coroutines_core", "onCancellation", "cause", "", "context", "Lkotlin/coroutines/CoroutineContext;", "onCancelledRequest", "receiver", "retrieveElement", "retrieveElement$kotlinx_coroutines_core", "setElementLazy", "value", "setState", "setState$kotlinx_coroutines_core", "storeElement", "element", "storeElement$kotlinx_coroutines_core", "(ILjava/lang/Object;)V", "kotlinx-coroutines-core"}, k = 1, mv = {1, 8, 0}, xi = 48)
|
||||
/* loaded from: classes.dex */
|
||||
public final class ChannelSegment<E> extends Segment<ChannelSegment<E>> {
|
||||
private final BufferedChannel<E> _channel;
|
||||
private final AtomicReferenceArray data;
|
||||
|
||||
public ChannelSegment(long j, ChannelSegment<E> channelSegment, BufferedChannel<E> bufferedChannel, int i) {
|
||||
super(j, channelSegment, i);
|
||||
this._channel = bufferedChannel;
|
||||
this.data = new AtomicReferenceArray(BufferedChannelKt.SEGMENT_SIZE * 2);
|
||||
}
|
||||
|
||||
public final BufferedChannel<E> getChannel() {
|
||||
BufferedChannel<E> bufferedChannel = this._channel;
|
||||
Intrinsics.checkNotNull(bufferedChannel);
|
||||
return bufferedChannel;
|
||||
}
|
||||
|
||||
@Override // kotlinx.coroutines.internal.Segment
|
||||
public int getNumberOfSlots() {
|
||||
return BufferedChannelKt.SEGMENT_SIZE;
|
||||
}
|
||||
|
||||
public final void storeElement$kotlinx_coroutines_core(int index, E element) {
|
||||
setElementLazy(index, element);
|
||||
}
|
||||
|
||||
public final E getElement$kotlinx_coroutines_core(int index) {
|
||||
return (E) this.data.get(index * 2);
|
||||
}
|
||||
|
||||
public final E retrieveElement$kotlinx_coroutines_core(int index) {
|
||||
E element$kotlinx_coroutines_core = getElement$kotlinx_coroutines_core(index);
|
||||
cleanElement$kotlinx_coroutines_core(index);
|
||||
return element$kotlinx_coroutines_core;
|
||||
}
|
||||
|
||||
public final void cleanElement$kotlinx_coroutines_core(int index) {
|
||||
setElementLazy(index, null);
|
||||
}
|
||||
|
||||
private final void setElementLazy(int index, Object value) {
|
||||
this.data.lazySet(index * 2, value);
|
||||
}
|
||||
|
||||
public final Object getState$kotlinx_coroutines_core(int index) {
|
||||
return this.data.get((index * 2) + 1);
|
||||
}
|
||||
|
||||
public final void setState$kotlinx_coroutines_core(int index, Object value) {
|
||||
this.data.set((index * 2) + 1, value);
|
||||
}
|
||||
|
||||
public final boolean casState$kotlinx_coroutines_core(int index, Object from, Object to) {
|
||||
return ChannelSegment$$ExternalSyntheticBackportWithForwarding0.m(this.data, (index * 2) + 1, from, to);
|
||||
}
|
||||
|
||||
public final Object getAndSetState$kotlinx_coroutines_core(int index, Object update) {
|
||||
return this.data.getAndSet((index * 2) + 1, update);
|
||||
}
|
||||
|
||||
/* JADX WARN: Code restructure failed: missing block: B:54:0x0062, code lost:
|
||||
|
||||
cleanElement$kotlinx_coroutines_core(r4);
|
||||
*/
|
||||
/* JADX WARN: Code restructure failed: missing block: B:55:0x0065, code lost:
|
||||
|
||||
if (r5 == false) goto L65;
|
||||
*/
|
||||
/* JADX WARN: Code restructure failed: missing block: B:56:0x0067, code lost:
|
||||
|
||||
r4 = getChannel().onUndeliveredElement;
|
||||
*/
|
||||
/* JADX WARN: Code restructure failed: missing block: B:57:0x006d, code lost:
|
||||
|
||||
if (r4 == null) goto L66;
|
||||
*/
|
||||
/* JADX WARN: Code restructure failed: missing block: B:58:0x006f, code lost:
|
||||
|
||||
kotlinx.coroutines.internal.OnUndeliveredElementKt.callUndeliveredElement(r4, r0, r6);
|
||||
*/
|
||||
/* JADX WARN: Code restructure failed: missing block: B:59:0x0072, code lost:
|
||||
|
||||
return;
|
||||
*/
|
||||
/* JADX WARN: Code restructure failed: missing block: B:60:?, code lost:
|
||||
|
||||
return;
|
||||
*/
|
||||
/* JADX WARN: Code restructure failed: missing block: B:61:?, code lost:
|
||||
|
||||
return;
|
||||
*/
|
||||
@Override // kotlinx.coroutines.internal.Segment
|
||||
/*
|
||||
Code decompiled incorrectly, please refer to instructions dump.
|
||||
To view partially-correct add '--show-bad-code' argument
|
||||
*/
|
||||
public void onCancellation(int r4, java.lang.Throwable r5, kotlin.coroutines.CoroutineContext r6) {
|
||||
/*
|
||||
r3 = this;
|
||||
int r5 = kotlinx.coroutines.channels.BufferedChannelKt.SEGMENT_SIZE
|
||||
if (r4 < r5) goto L6
|
||||
r5 = 1
|
||||
goto L7
|
||||
L6:
|
||||
r5 = 0
|
||||
L7:
|
||||
if (r5 == 0) goto Lc
|
||||
int r0 = kotlinx.coroutines.channels.BufferedChannelKt.SEGMENT_SIZE
|
||||
int r4 = r4 - r0
|
||||
Lc:
|
||||
java.lang.Object r0 = r3.getElement$kotlinx_coroutines_core(r4)
|
||||
L10:
|
||||
java.lang.Object r1 = r3.getState$kotlinx_coroutines_core(r4)
|
||||
boolean r2 = r1 instanceof kotlinx.coroutines.Waiter
|
||||
if (r2 != 0) goto L73
|
||||
boolean r2 = r1 instanceof kotlinx.coroutines.channels.WaiterEB
|
||||
if (r2 == 0) goto L1d
|
||||
goto L73
|
||||
L1d:
|
||||
kotlinx.coroutines.internal.Symbol r2 = kotlinx.coroutines.channels.BufferedChannelKt.access$getINTERRUPTED_SEND$p()
|
||||
if (r1 == r2) goto L62
|
||||
kotlinx.coroutines.internal.Symbol r2 = kotlinx.coroutines.channels.BufferedChannelKt.access$getINTERRUPTED_RCV$p()
|
||||
if (r1 != r2) goto L2a
|
||||
goto L62
|
||||
L2a:
|
||||
kotlinx.coroutines.internal.Symbol r2 = kotlinx.coroutines.channels.BufferedChannelKt.access$getRESUMING_BY_EB$p()
|
||||
if (r1 == r2) goto L10
|
||||
kotlinx.coroutines.internal.Symbol r2 = kotlinx.coroutines.channels.BufferedChannelKt.access$getRESUMING_BY_RCV$p()
|
||||
if (r1 != r2) goto L37
|
||||
goto L10
|
||||
L37:
|
||||
kotlinx.coroutines.internal.Symbol r4 = kotlinx.coroutines.channels.BufferedChannelKt.access$getDONE_RCV$p()
|
||||
if (r1 == r4) goto L61
|
||||
kotlinx.coroutines.internal.Symbol r4 = kotlinx.coroutines.channels.BufferedChannelKt.BUFFERED
|
||||
if (r1 != r4) goto L42
|
||||
goto L61
|
||||
L42:
|
||||
kotlinx.coroutines.internal.Symbol r4 = kotlinx.coroutines.channels.BufferedChannelKt.getCHANNEL_CLOSED()
|
||||
if (r1 != r4) goto L49
|
||||
return
|
||||
L49:
|
||||
java.lang.IllegalStateException r4 = new java.lang.IllegalStateException
|
||||
java.lang.StringBuilder r5 = new java.lang.StringBuilder
|
||||
java.lang.String r6 = "unexpected state: "
|
||||
r5.<init>(r6)
|
||||
r5.append(r1)
|
||||
java.lang.String r5 = r5.toString()
|
||||
java.lang.String r5 = r5.toString()
|
||||
r4.<init>(r5)
|
||||
throw r4
|
||||
L61:
|
||||
return
|
||||
L62:
|
||||
r3.cleanElement$kotlinx_coroutines_core(r4)
|
||||
if (r5 == 0) goto L72
|
||||
kotlinx.coroutines.channels.BufferedChannel r4 = r3.getChannel()
|
||||
kotlin.jvm.functions.Function1<E, kotlin.Unit> r4 = r4.onUndeliveredElement
|
||||
if (r4 == 0) goto L72
|
||||
kotlinx.coroutines.internal.OnUndeliveredElementKt.callUndeliveredElement(r4, r0, r6)
|
||||
L72:
|
||||
return
|
||||
L73:
|
||||
if (r5 == 0) goto L7a
|
||||
kotlinx.coroutines.internal.Symbol r2 = kotlinx.coroutines.channels.BufferedChannelKt.access$getINTERRUPTED_SEND$p()
|
||||
goto L7e
|
||||
L7a:
|
||||
kotlinx.coroutines.internal.Symbol r2 = kotlinx.coroutines.channels.BufferedChannelKt.access$getINTERRUPTED_RCV$p()
|
||||
L7e:
|
||||
boolean r1 = r3.casState$kotlinx_coroutines_core(r4, r1, r2)
|
||||
if (r1 == 0) goto L10
|
||||
r3.cleanElement$kotlinx_coroutines_core(r4)
|
||||
r1 = r5 ^ 1
|
||||
r3.onCancelledRequest(r4, r1)
|
||||
if (r5 == 0) goto L99
|
||||
kotlinx.coroutines.channels.BufferedChannel r4 = r3.getChannel()
|
||||
kotlin.jvm.functions.Function1<E, kotlin.Unit> r4 = r4.onUndeliveredElement
|
||||
if (r4 == 0) goto L99
|
||||
kotlinx.coroutines.internal.OnUndeliveredElementKt.callUndeliveredElement(r4, r0, r6)
|
||||
L99:
|
||||
return
|
||||
*/
|
||||
throw new UnsupportedOperationException("Method not decompiled: kotlinx.coroutines.channels.ChannelSegment.onCancellation(int, java.lang.Throwable, kotlin.coroutines.CoroutineContext):void");
|
||||
}
|
||||
|
||||
public final void onCancelledRequest(int index, boolean receiver) {
|
||||
if (receiver) {
|
||||
getChannel().waitExpandBufferCompletion$kotlinx_coroutines_core((this.id * BufferedChannelKt.SEGMENT_SIZE) + index);
|
||||
}
|
||||
onSlotCleaned();
|
||||
}
|
||||
}
|
137
02-Easy5/E5/sources/kotlinx/coroutines/channels/ChannelsKt.java
Normal file
137
02-Easy5/E5/sources/kotlinx/coroutines/channels/ChannelsKt.java
Normal file
@ -0,0 +1,137 @@
|
||||
package kotlinx.coroutines.channels;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import kotlin.Deprecated;
|
||||
import kotlin.DeprecationLevel;
|
||||
import kotlin.Metadata;
|
||||
import kotlin.Pair;
|
||||
import kotlin.Unit;
|
||||
import kotlin.coroutines.Continuation;
|
||||
import kotlin.coroutines.CoroutineContext;
|
||||
import kotlin.jvm.functions.Function1;
|
||||
import kotlin.jvm.functions.Function2;
|
||||
import kotlin.jvm.functions.Function3;
|
||||
|
||||
@Metadata(d1 = {"kotlinx/coroutines/channels/ChannelsKt__ChannelsKt", "kotlinx/coroutines/channels/ChannelsKt__Channels_commonKt", "kotlinx/coroutines/channels/ChannelsKt__DeprecatedKt"}, k = 4, mv = {1, 8, 0}, xi = 48)
|
||||
/* loaded from: classes.dex */
|
||||
public final class ChannelsKt {
|
||||
public static final String DEFAULT_CLOSE_MESSAGE = "Channel was closed";
|
||||
|
||||
public static final void cancelConsumed(ReceiveChannel<?> receiveChannel, Throwable th) {
|
||||
ChannelsKt__Channels_commonKt.cancelConsumed(receiveChannel, th);
|
||||
}
|
||||
|
||||
@Deprecated(level = DeprecationLevel.WARNING, message = "BroadcastChannel is deprecated in the favour of SharedFlow and is no longer supported")
|
||||
public static final <E, R> R consume(BroadcastChannel<E> broadcastChannel, Function1<? super ReceiveChannel<? extends E>, ? extends R> function1) {
|
||||
return (R) ChannelsKt__Channels_commonKt.consume(broadcastChannel, function1);
|
||||
}
|
||||
|
||||
public static final <E, R> R consume(ReceiveChannel<? extends E> receiveChannel, Function1<? super ReceiveChannel<? extends E>, ? extends R> function1) {
|
||||
return (R) ChannelsKt__Channels_commonKt.consume(receiveChannel, function1);
|
||||
}
|
||||
|
||||
@Deprecated(level = DeprecationLevel.WARNING, message = "BroadcastChannel is deprecated in the favour of SharedFlow and is no longer supported")
|
||||
public static final <E> Object consumeEach(BroadcastChannel<E> broadcastChannel, Function1<? super E, Unit> function1, Continuation<? super Unit> continuation) {
|
||||
return ChannelsKt__Channels_commonKt.consumeEach(broadcastChannel, function1, continuation);
|
||||
}
|
||||
|
||||
public static final <E> Object consumeEach(ReceiveChannel<? extends E> receiveChannel, Function1<? super E, Unit> function1, Continuation<? super Unit> continuation) {
|
||||
return ChannelsKt__Channels_commonKt.consumeEach(receiveChannel, function1, continuation);
|
||||
}
|
||||
|
||||
public static final Function1<Throwable, Unit> consumes(ReceiveChannel<?> receiveChannel) {
|
||||
return ChannelsKt__DeprecatedKt.consumes(receiveChannel);
|
||||
}
|
||||
|
||||
public static final Function1<Throwable, Unit> consumesAll(ReceiveChannel<?>... receiveChannelArr) {
|
||||
return ChannelsKt__DeprecatedKt.consumesAll(receiveChannelArr);
|
||||
}
|
||||
|
||||
@Deprecated(level = DeprecationLevel.HIDDEN, message = "Binary compatibility")
|
||||
public static final /* synthetic */ ReceiveChannel distinct(ReceiveChannel receiveChannel) {
|
||||
ReceiveChannel distinctBy$default;
|
||||
distinctBy$default = ChannelsKt__DeprecatedKt.distinctBy$default(receiveChannel, null, new ChannelsKt__DeprecatedKt$distinct$1(null), 1, null);
|
||||
return distinctBy$default;
|
||||
}
|
||||
|
||||
public static final <E, K> ReceiveChannel<E> distinctBy(ReceiveChannel<? extends E> receiveChannel, CoroutineContext coroutineContext, Function2<? super E, ? super Continuation<? super K>, ? extends Object> function2) {
|
||||
return ChannelsKt__DeprecatedKt.distinctBy(receiveChannel, coroutineContext, function2);
|
||||
}
|
||||
|
||||
public static final <E> ReceiveChannel<E> filter(ReceiveChannel<? extends E> receiveChannel, CoroutineContext coroutineContext, Function2<? super E, ? super Continuation<? super Boolean>, ? extends Object> function2) {
|
||||
return ChannelsKt__DeprecatedKt.filter(receiveChannel, coroutineContext, function2);
|
||||
}
|
||||
|
||||
public static final <E> ReceiveChannel<E> filterNotNull(ReceiveChannel<? extends E> receiveChannel) {
|
||||
return ChannelsKt__DeprecatedKt.filterNotNull(receiveChannel);
|
||||
}
|
||||
|
||||
public static final <E, R> ReceiveChannel<R> map(ReceiveChannel<? extends E> receiveChannel, CoroutineContext coroutineContext, Function2<? super E, ? super Continuation<? super R>, ? extends Object> function2) {
|
||||
return ChannelsKt__DeprecatedKt.map(receiveChannel, coroutineContext, function2);
|
||||
}
|
||||
|
||||
public static final <E, R> ReceiveChannel<R> mapIndexed(ReceiveChannel<? extends E> receiveChannel, CoroutineContext coroutineContext, Function3<? super Integer, ? super E, ? super Continuation<? super R>, ? extends Object> function3) {
|
||||
return ChannelsKt__DeprecatedKt.mapIndexed(receiveChannel, coroutineContext, function3);
|
||||
}
|
||||
|
||||
@Deprecated(level = DeprecationLevel.HIDDEN, message = "Left for binary compatibility")
|
||||
public static final /* synthetic */ ReceiveChannel requireNoNulls(ReceiveChannel receiveChannel) {
|
||||
ReceiveChannel map$default;
|
||||
map$default = ChannelsKt__DeprecatedKt.map$default(receiveChannel, null, new ChannelsKt__DeprecatedKt$requireNoNulls$1(receiveChannel, null), 1, null);
|
||||
return map$default;
|
||||
}
|
||||
|
||||
public static final <E, C extends SendChannel<? super E>> Object toChannel(ReceiveChannel<? extends E> receiveChannel, C c, Continuation<? super C> continuation) {
|
||||
return ChannelsKt__DeprecatedKt.toChannel(receiveChannel, c, continuation);
|
||||
}
|
||||
|
||||
public static final <E, C extends Collection<? super E>> Object toCollection(ReceiveChannel<? extends E> receiveChannel, C c, Continuation<? super C> continuation) {
|
||||
return ChannelsKt__DeprecatedKt.toCollection(receiveChannel, c, continuation);
|
||||
}
|
||||
|
||||
public static final <E> Object toList(ReceiveChannel<? extends E> receiveChannel, Continuation<? super List<? extends E>> continuation) {
|
||||
return ChannelsKt__Channels_commonKt.toList(receiveChannel, continuation);
|
||||
}
|
||||
|
||||
public static final <K, V, M extends Map<? super K, ? super V>> Object toMap(ReceiveChannel<? extends Pair<? extends K, ? extends V>> receiveChannel, M m, Continuation<? super M> continuation) {
|
||||
return ChannelsKt__DeprecatedKt.toMap(receiveChannel, m, continuation);
|
||||
}
|
||||
|
||||
@Deprecated(level = DeprecationLevel.HIDDEN, message = "Binary compatibility")
|
||||
public static final /* synthetic */ Object toMap(ReceiveChannel receiveChannel, Continuation continuation) {
|
||||
Object map;
|
||||
map = toMap(receiveChannel, new LinkedHashMap(), continuation);
|
||||
return map;
|
||||
}
|
||||
|
||||
@Deprecated(level = DeprecationLevel.HIDDEN, message = "Binary compatibility")
|
||||
public static final /* synthetic */ Object toMutableList(ReceiveChannel receiveChannel, Continuation continuation) {
|
||||
Object collection;
|
||||
collection = toCollection(receiveChannel, new ArrayList(), continuation);
|
||||
return collection;
|
||||
}
|
||||
|
||||
public static final <E> Object toMutableSet(ReceiveChannel<? extends E> receiveChannel, Continuation<? super Set<E>> continuation) {
|
||||
return ChannelsKt__DeprecatedKt.toMutableSet(receiveChannel, continuation);
|
||||
}
|
||||
|
||||
public static final <E> Object trySendBlocking(SendChannel<? super E> sendChannel, E e) {
|
||||
return ChannelsKt__ChannelsKt.trySendBlocking(sendChannel, e);
|
||||
}
|
||||
|
||||
@Deprecated(level = DeprecationLevel.HIDDEN, message = "Binary compatibility")
|
||||
public static final /* synthetic */ ReceiveChannel zip(ReceiveChannel receiveChannel, ReceiveChannel receiveChannel2) {
|
||||
ReceiveChannel zip$default;
|
||||
zip$default = ChannelsKt__DeprecatedKt.zip$default(receiveChannel, receiveChannel2, null, ChannelsKt__DeprecatedKt$zip$1.INSTANCE, 2, null);
|
||||
return zip$default;
|
||||
}
|
||||
|
||||
public static final <E, R, V> ReceiveChannel<V> zip(ReceiveChannel<? extends E> receiveChannel, ReceiveChannel<? extends R> receiveChannel2, CoroutineContext coroutineContext, Function2<? super E, ? super R, ? extends V> function2) {
|
||||
return ChannelsKt__DeprecatedKt.zip(receiveChannel, receiveChannel2, coroutineContext, function2);
|
||||
}
|
||||
}
|
@ -0,0 +1,58 @@
|
||||
package kotlinx.coroutines.channels;
|
||||
|
||||
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.SuspendLambda;
|
||||
import kotlin.jvm.functions.Function2;
|
||||
import kotlinx.coroutines.CoroutineScope;
|
||||
|
||||
/* compiled from: Channels.kt */
|
||||
@Metadata(d1 = {"\u0000\f\n\u0000\n\u0002\u0018\u0002\n\u0002\u0010\u0002\n\u0000\u0010\u0003\u001a\u00020\u0002\"\u0004\b\u0000\u0010\u0000*\u00020\u0001H\u008a@"}, d2 = {"E", "Lkotlinx/coroutines/CoroutineScope;", "", "<anonymous>"}, k = 3, mv = {1, 8, 0})
|
||||
@DebugMetadata(c = "kotlinx.coroutines.channels.ChannelsKt__ChannelsKt$sendBlocking$1", f = "Channels.kt", i = {}, l = {58}, m = "invokeSuspend", n = {}, s = {})
|
||||
/* loaded from: classes.dex */
|
||||
final class ChannelsKt__ChannelsKt$sendBlocking$1 extends SuspendLambda implements Function2<CoroutineScope, Continuation<? super Unit>, Object> {
|
||||
final /* synthetic */ E $element;
|
||||
final /* synthetic */ SendChannel<E> $this_sendBlocking;
|
||||
int label;
|
||||
|
||||
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
||||
/* JADX WARN: Multi-variable type inference failed */
|
||||
ChannelsKt__ChannelsKt$sendBlocking$1(SendChannel<? super E> sendChannel, E e, Continuation<? super ChannelsKt__ChannelsKt$sendBlocking$1> continuation) {
|
||||
super(2, continuation);
|
||||
this.$this_sendBlocking = sendChannel;
|
||||
this.$element = e;
|
||||
}
|
||||
|
||||
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
||||
public final Continuation<Unit> create(Object obj, Continuation<?> continuation) {
|
||||
return new ChannelsKt__ChannelsKt$sendBlocking$1(this.$this_sendBlocking, this.$element, continuation);
|
||||
}
|
||||
|
||||
@Override // kotlin.jvm.functions.Function2
|
||||
public final Object invoke(CoroutineScope coroutineScope, Continuation<? super Unit> continuation) {
|
||||
return ((ChannelsKt__ChannelsKt$sendBlocking$1) create(coroutineScope, continuation)).invokeSuspend(Unit.INSTANCE);
|
||||
}
|
||||
|
||||
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
||||
public final Object invokeSuspend(Object obj) {
|
||||
Object coroutine_suspended = IntrinsicsKt.getCOROUTINE_SUSPENDED();
|
||||
int i = this.label;
|
||||
if (i == 0) {
|
||||
ResultKt.throwOnFailure(obj);
|
||||
this.label = 1;
|
||||
if (this.$this_sendBlocking.send(this.$element, this) == 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;
|
||||
}
|
||||
}
|
@ -0,0 +1,77 @@
|
||||
package kotlinx.coroutines.channels;
|
||||
|
||||
import kotlin.Metadata;
|
||||
import kotlin.Result;
|
||||
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.SuspendLambda;
|
||||
import kotlin.jvm.functions.Function2;
|
||||
import kotlinx.coroutines.CoroutineScope;
|
||||
|
||||
/* compiled from: Channels.kt */
|
||||
@Metadata(d1 = {"\u0000\u0010\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0010\u0002\n\u0000\u0010\u0004\u001a\b\u0012\u0004\u0012\u00020\u00030\u0002\"\u0004\b\u0000\u0010\u0000*\u00020\u0001H\u008a@"}, d2 = {"E", "Lkotlinx/coroutines/CoroutineScope;", "Lkotlinx/coroutines/channels/ChannelResult;", "", "<anonymous>"}, k = 3, mv = {1, 8, 0})
|
||||
@DebugMetadata(c = "kotlinx.coroutines.channels.ChannelsKt__ChannelsKt$trySendBlocking$2", f = "Channels.kt", i = {}, l = {39}, m = "invokeSuspend", n = {}, s = {})
|
||||
/* loaded from: classes.dex */
|
||||
final class ChannelsKt__ChannelsKt$trySendBlocking$2 extends SuspendLambda implements Function2<CoroutineScope, Continuation<? super ChannelResult<? extends Unit>>, Object> {
|
||||
final /* synthetic */ E $element;
|
||||
final /* synthetic */ SendChannel<E> $this_trySendBlocking;
|
||||
private /* synthetic */ Object L$0;
|
||||
int label;
|
||||
|
||||
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
||||
/* JADX WARN: Multi-variable type inference failed */
|
||||
ChannelsKt__ChannelsKt$trySendBlocking$2(SendChannel<? super E> sendChannel, E e, Continuation<? super ChannelsKt__ChannelsKt$trySendBlocking$2> continuation) {
|
||||
super(2, continuation);
|
||||
this.$this_trySendBlocking = sendChannel;
|
||||
this.$element = e;
|
||||
}
|
||||
|
||||
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
||||
public final Continuation<Unit> create(Object obj, Continuation<?> continuation) {
|
||||
ChannelsKt__ChannelsKt$trySendBlocking$2 channelsKt__ChannelsKt$trySendBlocking$2 = new ChannelsKt__ChannelsKt$trySendBlocking$2(this.$this_trySendBlocking, this.$element, continuation);
|
||||
channelsKt__ChannelsKt$trySendBlocking$2.L$0 = obj;
|
||||
return channelsKt__ChannelsKt$trySendBlocking$2;
|
||||
}
|
||||
|
||||
@Override // kotlin.jvm.functions.Function2
|
||||
public /* bridge */ /* synthetic */ Object invoke(CoroutineScope coroutineScope, Continuation<? super ChannelResult<? extends Unit>> continuation) {
|
||||
return invoke2(coroutineScope, (Continuation<? super ChannelResult<Unit>>) continuation);
|
||||
}
|
||||
|
||||
/* renamed from: invoke, reason: avoid collision after fix types in other method */
|
||||
public final Object invoke2(CoroutineScope coroutineScope, Continuation<? super ChannelResult<Unit>> continuation) {
|
||||
return ((ChannelsKt__ChannelsKt$trySendBlocking$2) create(coroutineScope, continuation)).invokeSuspend(Unit.INSTANCE);
|
||||
}
|
||||
|
||||
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
||||
public final Object invokeSuspend(Object obj) {
|
||||
Object m288constructorimpl;
|
||||
Object coroutine_suspended = IntrinsicsKt.getCOROUTINE_SUSPENDED();
|
||||
int i = this.label;
|
||||
try {
|
||||
if (i == 0) {
|
||||
ResultKt.throwOnFailure(obj);
|
||||
SendChannel<E> sendChannel = this.$this_trySendBlocking;
|
||||
E e = this.$element;
|
||||
Result.Companion companion = Result.INSTANCE;
|
||||
this.label = 1;
|
||||
if (sendChannel.send(e, this) == coroutine_suspended) {
|
||||
return coroutine_suspended;
|
||||
}
|
||||
} else {
|
||||
if (i != 1) {
|
||||
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
|
||||
}
|
||||
ResultKt.throwOnFailure(obj);
|
||||
}
|
||||
m288constructorimpl = Result.m288constructorimpl(Unit.INSTANCE);
|
||||
} catch (Throwable th) {
|
||||
Result.Companion companion2 = Result.INSTANCE;
|
||||
m288constructorimpl = Result.m288constructorimpl(ResultKt.createFailure(th));
|
||||
}
|
||||
return ChannelResult.m1862boximpl(Result.m295isSuccessimpl(m288constructorimpl) ? ChannelResult.INSTANCE.m1877successJP2dKIU(Unit.INSTANCE) : ChannelResult.INSTANCE.m1875closedJP2dKIU(Result.m291exceptionOrNullimpl(m288constructorimpl)));
|
||||
}
|
||||
}
|
@ -0,0 +1,33 @@
|
||||
package kotlinx.coroutines.channels;
|
||||
|
||||
import kotlin.Deprecated;
|
||||
import kotlin.DeprecationLevel;
|
||||
import kotlin.Metadata;
|
||||
import kotlin.ReplaceWith;
|
||||
import kotlin.Unit;
|
||||
import kotlinx.coroutines.BuildersKt__BuildersKt;
|
||||
import kotlinx.coroutines.channels.ChannelResult;
|
||||
|
||||
/* compiled from: Channels.kt */
|
||||
@Metadata(d1 = {"\u0000\u0018\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0002\u001a%\u0010\u0000\u001a\u00020\u0001\"\u0004\b\u0000\u0010\u0002*\b\u0012\u0004\u0012\u0002H\u00020\u00032\u0006\u0010\u0004\u001a\u0002H\u0002H\u0007¢\u0006\u0002\u0010\u0005\u001a,\u0010\u0006\u001a\b\u0012\u0004\u0012\u00020\u00010\u0007\"\u0004\b\u0000\u0010\u0002*\b\u0012\u0004\u0012\u0002H\u00020\u00032\u0006\u0010\u0004\u001a\u0002H\u0002ø\u0001\u0000¢\u0006\u0002\u0010\b\u0082\u0002\u0004\n\u0002\b\u0019¨\u0006\t"}, d2 = {"sendBlocking", "", "E", "Lkotlinx/coroutines/channels/SendChannel;", "element", "(Lkotlinx/coroutines/channels/SendChannel;Ljava/lang/Object;)V", "trySendBlocking", "Lkotlinx/coroutines/channels/ChannelResult;", "(Lkotlinx/coroutines/channels/SendChannel;Ljava/lang/Object;)Ljava/lang/Object;", "kotlinx-coroutines-core"}, k = 5, mv = {1, 8, 0}, xi = 48, xs = "kotlinx/coroutines/channels/ChannelsKt")
|
||||
/* loaded from: classes.dex */
|
||||
final /* synthetic */ class ChannelsKt__ChannelsKt {
|
||||
/* JADX WARN: Multi-variable type inference failed */
|
||||
public static final <E> Object trySendBlocking(SendChannel<? super E> sendChannel, E e) {
|
||||
Object runBlocking$default;
|
||||
Object mo1852trySendJP2dKIU = sendChannel.mo1852trySendJP2dKIU(e);
|
||||
if (mo1852trySendJP2dKIU instanceof ChannelResult.Failed) {
|
||||
runBlocking$default = BuildersKt__BuildersKt.runBlocking$default(null, new ChannelsKt__ChannelsKt$trySendBlocking$2(sendChannel, e, null), 1, null);
|
||||
return ((ChannelResult) runBlocking$default).getHolder();
|
||||
}
|
||||
return ChannelResult.INSTANCE.m1877successJP2dKIU(Unit.INSTANCE);
|
||||
}
|
||||
|
||||
@Deprecated(level = DeprecationLevel.HIDDEN, message = "Deprecated in the favour of 'trySendBlocking'. Consider handling the result of 'trySendBlocking' explicitly and rethrow exception if necessary", replaceWith = @ReplaceWith(expression = "trySendBlocking(element)", imports = {}))
|
||||
public static final /* synthetic */ void sendBlocking(SendChannel sendChannel, Object obj) {
|
||||
if (ChannelResult.m1872isSuccessimpl(sendChannel.mo1852trySendJP2dKIU(obj))) {
|
||||
return;
|
||||
}
|
||||
BuildersKt__BuildersKt.runBlocking$default(null, new ChannelsKt__ChannelsKt$sendBlocking$1(sendChannel, obj, null), 1, null);
|
||||
}
|
||||
}
|
@ -0,0 +1,30 @@
|
||||
package kotlinx.coroutines.channels;
|
||||
|
||||
import kotlin.Metadata;
|
||||
import kotlin.coroutines.Continuation;
|
||||
import kotlin.coroutines.jvm.internal.ContinuationImpl;
|
||||
import kotlin.coroutines.jvm.internal.DebugMetadata;
|
||||
import kotlin.jvm.functions.Function1;
|
||||
|
||||
/* compiled from: Channels.common.kt */
|
||||
@Metadata(k = 3, mv = {1, 8, 0}, xi = 176)
|
||||
@DebugMetadata(c = "kotlinx.coroutines.channels.ChannelsKt__Channels_commonKt", f = "Channels.common.kt", i = {0, 0}, l = {106}, m = "consumeEach", n = {"action", "$this$consume$iv"}, s = {"L$0", "L$1"})
|
||||
/* loaded from: classes.dex */
|
||||
final class ChannelsKt__Channels_commonKt$consumeEach$1<E> extends ContinuationImpl {
|
||||
Object L$0;
|
||||
Object L$1;
|
||||
Object L$2;
|
||||
int label;
|
||||
/* synthetic */ Object result;
|
||||
|
||||
ChannelsKt__Channels_commonKt$consumeEach$1(Continuation<? super ChannelsKt__Channels_commonKt$consumeEach$1> continuation) {
|
||||
super(continuation);
|
||||
}
|
||||
|
||||
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
||||
public final Object invokeSuspend(Object obj) {
|
||||
this.result = obj;
|
||||
this.label |= Integer.MIN_VALUE;
|
||||
return ChannelsKt__Channels_commonKt.consumeEach((ReceiveChannel) null, (Function1) null, this);
|
||||
}
|
||||
}
|
@ -0,0 +1,30 @@
|
||||
package kotlinx.coroutines.channels;
|
||||
|
||||
import kotlin.Metadata;
|
||||
import kotlin.coroutines.Continuation;
|
||||
import kotlin.coroutines.jvm.internal.ContinuationImpl;
|
||||
import kotlin.coroutines.jvm.internal.DebugMetadata;
|
||||
import kotlin.jvm.functions.Function1;
|
||||
|
||||
/* compiled from: Channels.common.kt */
|
||||
@Metadata(k = 3, mv = {1, 8, 0}, xi = 176)
|
||||
@DebugMetadata(c = "kotlinx.coroutines.channels.ChannelsKt__Channels_commonKt", f = "Channels.common.kt", i = {0, 0}, l = {130}, m = "consumeEach", n = {"action", "channel$iv"}, s = {"L$0", "L$1"})
|
||||
/* loaded from: classes.dex */
|
||||
final class ChannelsKt__Channels_commonKt$consumeEach$3<E> extends ContinuationImpl {
|
||||
Object L$0;
|
||||
Object L$1;
|
||||
Object L$2;
|
||||
int label;
|
||||
/* synthetic */ Object result;
|
||||
|
||||
ChannelsKt__Channels_commonKt$consumeEach$3(Continuation<? super ChannelsKt__Channels_commonKt$consumeEach$3> continuation) {
|
||||
super(continuation);
|
||||
}
|
||||
|
||||
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
||||
public final Object invokeSuspend(Object obj) {
|
||||
this.result = obj;
|
||||
this.label |= Integer.MIN_VALUE;
|
||||
return ChannelsKt__Channels_commonKt.consumeEach((BroadcastChannel) null, (Function1) null, this);
|
||||
}
|
||||
}
|
@ -0,0 +1,30 @@
|
||||
package kotlinx.coroutines.channels;
|
||||
|
||||
import kotlin.Metadata;
|
||||
import kotlin.coroutines.Continuation;
|
||||
import kotlin.coroutines.jvm.internal.ContinuationImpl;
|
||||
import kotlin.coroutines.jvm.internal.DebugMetadata;
|
||||
|
||||
/* compiled from: Channels.common.kt */
|
||||
@Metadata(k = 3, mv = {1, 8, 0}, xi = 48)
|
||||
@DebugMetadata(c = "kotlinx.coroutines.channels.ChannelsKt__Channels_commonKt", f = "Channels.common.kt", i = {0, 0}, l = {149}, m = "toList", n = {"$this$toList_u24lambda_u243", "$this$consume$iv$iv"}, s = {"L$1", "L$2"})
|
||||
/* loaded from: classes.dex */
|
||||
final class ChannelsKt__Channels_commonKt$toList$1<E> extends ContinuationImpl {
|
||||
Object L$0;
|
||||
Object L$1;
|
||||
Object L$2;
|
||||
Object L$3;
|
||||
int label;
|
||||
/* synthetic */ Object result;
|
||||
|
||||
ChannelsKt__Channels_commonKt$toList$1(Continuation<? super ChannelsKt__Channels_commonKt$toList$1> continuation) {
|
||||
super(continuation);
|
||||
}
|
||||
|
||||
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
||||
public final Object invokeSuspend(Object obj) {
|
||||
this.result = obj;
|
||||
this.label |= Integer.MIN_VALUE;
|
||||
return ChannelsKt.toList(null, this);
|
||||
}
|
||||
}
|
@ -0,0 +1,444 @@
|
||||
package kotlinx.coroutines.channels;
|
||||
|
||||
import java.util.concurrent.CancellationException;
|
||||
import kotlin.Deprecated;
|
||||
import kotlin.DeprecationLevel;
|
||||
import kotlin.Metadata;
|
||||
import kotlin.ReplaceWith;
|
||||
import kotlin.Unit;
|
||||
import kotlin.coroutines.Continuation;
|
||||
import kotlin.jvm.functions.Function1;
|
||||
import kotlin.jvm.internal.InlineMarker;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
import kotlinx.coroutines.ExceptionsKt;
|
||||
import kotlinx.coroutines.channels.ReceiveChannel;
|
||||
import kotlinx.coroutines.selects.SelectClause1;
|
||||
|
||||
/* compiled from: Channels.common.kt */
|
||||
@Metadata(d1 = {"\u0000>\n\u0000\n\u0002\u0010\u000e\n\u0000\n\u0002\u0010\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0003\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0007\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0003\n\u0002\u0010 \n\u0000\u001a\u001a\u0010\u0002\u001a\u00020\u0003*\u0006\u0012\u0002\b\u00030\u00042\b\u0010\u0005\u001a\u0004\u0018\u00010\u0006H\u0001\u001aC\u0010\u0007\u001a\u0002H\b\"\u0004\b\u0000\u0010\t\"\u0004\b\u0001\u0010\b*\b\u0012\u0004\u0012\u0002H\t0\n2\u001d\u0010\u000b\u001a\u0019\u0012\n\u0012\b\u0012\u0004\u0012\u0002H\t0\u0004\u0012\u0004\u0012\u0002H\b0\f¢\u0006\u0002\b\rH\u0087\b¢\u0006\u0002\u0010\u000e\u001aP\u0010\u0007\u001a\u0002H\b\"\u0004\b\u0000\u0010\t\"\u0004\b\u0001\u0010\b*\b\u0012\u0004\u0012\u0002H\t0\u00042\u001d\u0010\u000b\u001a\u0019\u0012\n\u0012\b\u0012\u0004\u0012\u0002H\t0\u0004\u0012\u0004\u0012\u0002H\b0\f¢\u0006\u0002\b\rH\u0086\b\u0082\u0002\n\n\b\b\u0001\u0012\u0002\u0010\u0001 \u0001¢\u0006\u0002\u0010\u000f\u001a5\u0010\u0010\u001a\u00020\u0003\"\u0004\b\u0000\u0010\t*\b\u0012\u0004\u0012\u0002H\t0\n2\u0012\u0010\u0011\u001a\u000e\u0012\u0004\u0012\u0002H\t\u0012\u0004\u0012\u00020\u00030\fH\u0087Hø\u0001\u0000¢\u0006\u0002\u0010\u0012\u001a5\u0010\u0010\u001a\u00020\u0003\"\u0004\b\u0000\u0010\t*\b\u0012\u0004\u0012\u0002H\t0\u00042\u0012\u0010\u0011\u001a\u000e\u0012\u0004\u0012\u0002H\t\u0012\u0004\u0012\u00020\u00030\fH\u0086Hø\u0001\u0000¢\u0006\u0002\u0010\u0013\u001a$\u0010\u0014\u001a\n\u0012\u0006\u0012\u0004\u0018\u0001H\t0\u0015\"\b\b\u0000\u0010\t*\u00020\u0016*\b\u0012\u0004\u0012\u0002H\t0\u0004H\u0007\u001a'\u0010\u0017\u001a\u0004\u0018\u0001H\t\"\b\b\u0000\u0010\t*\u00020\u0016*\b\u0012\u0004\u0012\u0002H\t0\u0004H\u0087@ø\u0001\u0000¢\u0006\u0002\u0010\u0018\u001a'\u0010\u0019\u001a\b\u0012\u0004\u0012\u0002H\t0\u001a\"\u0004\b\u0000\u0010\t*\b\u0012\u0004\u0012\u0002H\t0\u0004H\u0086@ø\u0001\u0000¢\u0006\u0002\u0010\u0018\"\u000e\u0010\u0000\u001a\u00020\u0001X\u0080T¢\u0006\u0002\n\u0000\u0082\u0002\u0004\n\u0002\b\u0019¨\u0006\u001b"}, d2 = {"DEFAULT_CLOSE_MESSAGE", "", "cancelConsumed", "", "Lkotlinx/coroutines/channels/ReceiveChannel;", "cause", "", "consume", "R", "E", "Lkotlinx/coroutines/channels/BroadcastChannel;", "block", "Lkotlin/Function1;", "Lkotlin/ExtensionFunctionType;", "(Lkotlinx/coroutines/channels/BroadcastChannel;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;", "(Lkotlinx/coroutines/channels/ReceiveChannel;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;", "consumeEach", "action", "(Lkotlinx/coroutines/channels/BroadcastChannel;Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;", "(Lkotlinx/coroutines/channels/ReceiveChannel;Lkotlin/jvm/functions/Function1;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;", "onReceiveOrNull", "Lkotlinx/coroutines/selects/SelectClause1;", "", "receiveOrNull", "(Lkotlinx/coroutines/channels/ReceiveChannel;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;", "toList", "", "kotlinx-coroutines-core"}, k = 5, mv = {1, 8, 0}, xi = 48, xs = "kotlinx/coroutines/channels/ChannelsKt")
|
||||
/* loaded from: classes.dex */
|
||||
final /* synthetic */ class ChannelsKt__Channels_commonKt {
|
||||
@Deprecated(level = DeprecationLevel.WARNING, message = "BroadcastChannel is deprecated in the favour of SharedFlow and is no longer supported")
|
||||
public static final <E, R> R consume(BroadcastChannel<E> broadcastChannel, Function1<? super ReceiveChannel<? extends E>, ? extends R> function1) {
|
||||
ReceiveChannel<E> openSubscription = broadcastChannel.openSubscription();
|
||||
try {
|
||||
return function1.invoke(openSubscription);
|
||||
} finally {
|
||||
InlineMarker.finallyStart(1);
|
||||
ReceiveChannel.DefaultImpls.cancel$default((ReceiveChannel) openSubscription, (CancellationException) null, 1, (Object) null);
|
||||
InlineMarker.finallyEnd(1);
|
||||
}
|
||||
}
|
||||
|
||||
@Deprecated(level = DeprecationLevel.HIDDEN, message = "Deprecated in the favour of 'receiveCatching'", replaceWith = @ReplaceWith(expression = "receiveCatching().getOrNull()", imports = {}))
|
||||
public static final /* synthetic */ Object receiveOrNull(ReceiveChannel receiveChannel, Continuation continuation) {
|
||||
Intrinsics.checkNotNull(receiveChannel, "null cannot be cast to non-null type kotlinx.coroutines.channels.ReceiveChannel<E of kotlinx.coroutines.channels.ChannelsKt__Channels_commonKt.receiveOrNull?>");
|
||||
return receiveChannel.receiveOrNull(continuation);
|
||||
}
|
||||
|
||||
@Deprecated(level = DeprecationLevel.HIDDEN, message = "Deprecated in the favour of 'onReceiveCatching'")
|
||||
public static final /* synthetic */ SelectClause1 onReceiveOrNull(ReceiveChannel receiveChannel) {
|
||||
Intrinsics.checkNotNull(receiveChannel, "null cannot be cast to non-null type kotlinx.coroutines.channels.ReceiveChannel<E of kotlinx.coroutines.channels.ChannelsKt__Channels_commonKt.onReceiveOrNull?>");
|
||||
return receiveChannel.getOnReceiveOrNull();
|
||||
}
|
||||
|
||||
public static final <E, R> R consume(ReceiveChannel<? extends E> receiveChannel, Function1<? super ReceiveChannel<? extends E>, ? extends R> function1) {
|
||||
try {
|
||||
R invoke = function1.invoke(receiveChannel);
|
||||
InlineMarker.finallyStart(1);
|
||||
ChannelsKt.cancelConsumed(receiveChannel, null);
|
||||
InlineMarker.finallyEnd(1);
|
||||
return invoke;
|
||||
} finally {
|
||||
}
|
||||
}
|
||||
|
||||
/* JADX WARN: Removed duplicated region for block: B:14:0x0065 A[Catch: all -> 0x0036, TryCatch #1 {all -> 0x0036, blocks: (B:11:0x0032, B:12:0x005d, B:14:0x0065, B:15:0x004b, B:20:0x006e), top: B:10:0x0032 }] */
|
||||
/* JADX WARN: Removed duplicated region for block: B:17:0x0059 A[RETURN] */
|
||||
/* JADX WARN: Removed duplicated region for block: B:19:0x005a */
|
||||
/* JADX WARN: Removed duplicated region for block: B:20:0x006e A[Catch: all -> 0x0036, TRY_LEAVE, TryCatch #1 {all -> 0x0036, blocks: (B:11:0x0032, B:12:0x005d, B:14:0x0065, B:15:0x004b, B:20:0x006e), top: B:10:0x0032 }] */
|
||||
/* JADX WARN: Removed duplicated region for block: B:33:0x0040 */
|
||||
/* JADX WARN: Removed duplicated region for block: B:8:0x0024 */
|
||||
/* JADX WARN: Unsupported multi-entry loop pattern (BACK_EDGE: B:19:0x005a -> B:12:0x005d). Please report as a decompilation issue!!! */
|
||||
/*
|
||||
Code decompiled incorrectly, please refer to instructions dump.
|
||||
To view partially-correct add '--show-bad-code' argument
|
||||
*/
|
||||
public static final <E> java.lang.Object consumeEach(kotlinx.coroutines.channels.ReceiveChannel<? extends E> r5, kotlin.jvm.functions.Function1<? super E, kotlin.Unit> r6, kotlin.coroutines.Continuation<? super kotlin.Unit> r7) {
|
||||
/*
|
||||
boolean r0 = r7 instanceof kotlinx.coroutines.channels.ChannelsKt__Channels_commonKt$consumeEach$1
|
||||
if (r0 == 0) goto L14
|
||||
r0 = r7
|
||||
kotlinx.coroutines.channels.ChannelsKt__Channels_commonKt$consumeEach$1 r0 = (kotlinx.coroutines.channels.ChannelsKt__Channels_commonKt$consumeEach$1) r0
|
||||
int r1 = r0.label
|
||||
r2 = -2147483648(0xffffffff80000000, float:-0.0)
|
||||
r1 = r1 & r2
|
||||
if (r1 == 0) goto L14
|
||||
int r7 = r0.label
|
||||
int r7 = r7 - r2
|
||||
r0.label = r7
|
||||
goto L19
|
||||
L14:
|
||||
kotlinx.coroutines.channels.ChannelsKt__Channels_commonKt$consumeEach$1 r0 = new kotlinx.coroutines.channels.ChannelsKt__Channels_commonKt$consumeEach$1
|
||||
r0.<init>(r7)
|
||||
L19:
|
||||
java.lang.Object r7 = r0.result
|
||||
java.lang.Object r1 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED()
|
||||
int r2 = r0.label
|
||||
r3 = 1
|
||||
if (r2 == 0) goto L40
|
||||
if (r2 != r3) goto L38
|
||||
java.lang.Object r5 = r0.L$2
|
||||
kotlinx.coroutines.channels.ChannelIterator r5 = (kotlinx.coroutines.channels.ChannelIterator) r5
|
||||
java.lang.Object r6 = r0.L$1
|
||||
kotlinx.coroutines.channels.ReceiveChannel r6 = (kotlinx.coroutines.channels.ReceiveChannel) r6
|
||||
java.lang.Object r2 = r0.L$0
|
||||
kotlin.jvm.functions.Function1 r2 = (kotlin.jvm.functions.Function1) r2
|
||||
kotlin.ResultKt.throwOnFailure(r7) // Catch: java.lang.Throwable -> L36
|
||||
goto L5d
|
||||
L36:
|
||||
r5 = move-exception
|
||||
goto L81
|
||||
L38:
|
||||
java.lang.IllegalStateException r5 = new java.lang.IllegalStateException
|
||||
java.lang.String r6 = "call to 'resume' before 'invoke' with coroutine"
|
||||
r5.<init>(r6)
|
||||
throw r5
|
||||
L40:
|
||||
kotlin.ResultKt.throwOnFailure(r7)
|
||||
kotlinx.coroutines.channels.ChannelIterator r7 = r5.iterator() // Catch: java.lang.Throwable -> L7d
|
||||
r4 = r6
|
||||
r6 = r5
|
||||
r5 = r7
|
||||
r7 = r4
|
||||
L4b:
|
||||
r0.L$0 = r7 // Catch: java.lang.Throwable -> L36
|
||||
r0.L$1 = r6 // Catch: java.lang.Throwable -> L36
|
||||
r0.L$2 = r5 // Catch: java.lang.Throwable -> L36
|
||||
r0.label = r3 // Catch: java.lang.Throwable -> L36
|
||||
java.lang.Object r2 = r5.hasNext(r0) // Catch: java.lang.Throwable -> L36
|
||||
if (r2 != r1) goto L5a
|
||||
return r1
|
||||
L5a:
|
||||
r4 = r2
|
||||
r2 = r7
|
||||
r7 = r4
|
||||
L5d:
|
||||
java.lang.Boolean r7 = (java.lang.Boolean) r7 // Catch: java.lang.Throwable -> L36
|
||||
boolean r7 = r7.booleanValue() // Catch: java.lang.Throwable -> L36
|
||||
if (r7 == 0) goto L6e
|
||||
java.lang.Object r7 = r5.next() // Catch: java.lang.Throwable -> L36
|
||||
r2.invoke(r7) // Catch: java.lang.Throwable -> L36
|
||||
r7 = r2
|
||||
goto L4b
|
||||
L6e:
|
||||
kotlin.Unit r5 = kotlin.Unit.INSTANCE // Catch: java.lang.Throwable -> L36
|
||||
kotlin.jvm.internal.InlineMarker.finallyStart(r3)
|
||||
r5 = 0
|
||||
kotlinx.coroutines.channels.ChannelsKt.cancelConsumed(r6, r5)
|
||||
kotlin.jvm.internal.InlineMarker.finallyEnd(r3)
|
||||
kotlin.Unit r5 = kotlin.Unit.INSTANCE
|
||||
return r5
|
||||
L7d:
|
||||
r6 = move-exception
|
||||
r4 = r6
|
||||
r6 = r5
|
||||
r5 = r4
|
||||
L81:
|
||||
throw r5 // Catch: java.lang.Throwable -> L82
|
||||
L82:
|
||||
r7 = move-exception
|
||||
kotlin.jvm.internal.InlineMarker.finallyStart(r3)
|
||||
kotlinx.coroutines.channels.ChannelsKt.cancelConsumed(r6, r5)
|
||||
kotlin.jvm.internal.InlineMarker.finallyEnd(r3)
|
||||
throw r7
|
||||
*/
|
||||
throw new UnsupportedOperationException("Method not decompiled: kotlinx.coroutines.channels.ChannelsKt__Channels_commonKt.consumeEach(kotlinx.coroutines.channels.ReceiveChannel, kotlin.jvm.functions.Function1, kotlin.coroutines.Continuation):java.lang.Object");
|
||||
}
|
||||
|
||||
/* JADX WARN: Multi-variable type inference failed */
|
||||
/* JADX WARN: Removed duplicated region for block: B:14:0x0070 A[Catch: all -> 0x003a, TryCatch #2 {all -> 0x003a, blocks: (B:11:0x0036, B:12:0x0068, B:14:0x0070, B:29:0x0079), top: B:10:0x0036 }] */
|
||||
/* JADX WARN: Removed duplicated region for block: B:18:0x0064 A[RETURN] */
|
||||
/* JADX WARN: Removed duplicated region for block: B:20:0x0065 */
|
||||
/* JADX WARN: Removed duplicated region for block: B:29:0x0079 A[Catch: all -> 0x003a, TRY_LEAVE, TryCatch #2 {all -> 0x003a, blocks: (B:11:0x0036, B:12:0x0068, B:14:0x0070, B:29:0x0079), top: B:10:0x0036 }] */
|
||||
/* JADX WARN: Removed duplicated region for block: B:37:0x0045 */
|
||||
/* JADX WARN: Removed duplicated region for block: B:8:0x0024 */
|
||||
/* JADX WARN: Unsupported multi-entry loop pattern (BACK_EDGE: B:20:0x0065 -> B:12:0x0068). Please report as a decompilation issue!!! */
|
||||
/*
|
||||
Code decompiled incorrectly, please refer to instructions dump.
|
||||
To view partially-correct add '--show-bad-code' argument
|
||||
*/
|
||||
public static final <E> java.lang.Object toList(kotlinx.coroutines.channels.ReceiveChannel<? extends E> r7, kotlin.coroutines.Continuation<? super java.util.List<? extends E>> r8) {
|
||||
/*
|
||||
boolean r0 = r8 instanceof kotlinx.coroutines.channels.ChannelsKt__Channels_commonKt$toList$1
|
||||
if (r0 == 0) goto L14
|
||||
r0 = r8
|
||||
kotlinx.coroutines.channels.ChannelsKt__Channels_commonKt$toList$1 r0 = (kotlinx.coroutines.channels.ChannelsKt__Channels_commonKt$toList$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.channels.ChannelsKt__Channels_commonKt$toList$1 r0 = new kotlinx.coroutines.channels.ChannelsKt__Channels_commonKt$toList$1
|
||||
r0.<init>(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 L45
|
||||
if (r2 != r3) goto L3d
|
||||
java.lang.Object r7 = r0.L$3
|
||||
kotlinx.coroutines.channels.ChannelIterator r7 = (kotlinx.coroutines.channels.ChannelIterator) r7
|
||||
java.lang.Object r2 = r0.L$2
|
||||
kotlinx.coroutines.channels.ReceiveChannel r2 = (kotlinx.coroutines.channels.ReceiveChannel) r2
|
||||
java.lang.Object r4 = r0.L$1
|
||||
java.util.List r4 = (java.util.List) r4
|
||||
java.lang.Object r5 = r0.L$0
|
||||
java.util.List r5 = (java.util.List) r5
|
||||
kotlin.ResultKt.throwOnFailure(r8) // Catch: java.lang.Throwable -> L3a
|
||||
goto L68
|
||||
L3a:
|
||||
r7 = move-exception
|
||||
r8 = r2
|
||||
goto L8a
|
||||
L3d:
|
||||
java.lang.IllegalStateException r7 = new java.lang.IllegalStateException
|
||||
java.lang.String r8 = "call to 'resume' before 'invoke' with coroutine"
|
||||
r7.<init>(r8)
|
||||
throw r7
|
||||
L45:
|
||||
kotlin.ResultKt.throwOnFailure(r8)
|
||||
java.util.List r8 = kotlin.collections.CollectionsKt.createListBuilder()
|
||||
kotlinx.coroutines.channels.ChannelIterator r2 = r7.iterator() // Catch: java.lang.Throwable -> L86
|
||||
r4 = r8
|
||||
r5 = r4
|
||||
r8 = r7
|
||||
r7 = r2
|
||||
L54:
|
||||
r0.L$0 = r5 // Catch: java.lang.Throwable -> L84
|
||||
r0.L$1 = r4 // Catch: java.lang.Throwable -> L84
|
||||
r0.L$2 = r8 // Catch: java.lang.Throwable -> L84
|
||||
r0.L$3 = r7 // Catch: java.lang.Throwable -> L84
|
||||
r0.label = r3 // Catch: java.lang.Throwable -> L84
|
||||
java.lang.Object r2 = r7.hasNext(r0) // Catch: java.lang.Throwable -> L84
|
||||
if (r2 != r1) goto L65
|
||||
return r1
|
||||
L65:
|
||||
r6 = r2
|
||||
r2 = r8
|
||||
r8 = r6
|
||||
L68:
|
||||
java.lang.Boolean r8 = (java.lang.Boolean) r8 // Catch: java.lang.Throwable -> L3a
|
||||
boolean r8 = r8.booleanValue() // Catch: java.lang.Throwable -> L3a
|
||||
if (r8 == 0) goto L79
|
||||
java.lang.Object r8 = r7.next() // Catch: java.lang.Throwable -> L3a
|
||||
r4.add(r8) // Catch: java.lang.Throwable -> L3a
|
||||
r8 = r2
|
||||
goto L54
|
||||
L79:
|
||||
kotlin.Unit r7 = kotlin.Unit.INSTANCE // Catch: java.lang.Throwable -> L3a
|
||||
r7 = 0
|
||||
kotlinx.coroutines.channels.ChannelsKt.cancelConsumed(r2, r7)
|
||||
java.util.List r7 = kotlin.collections.CollectionsKt.build(r5)
|
||||
return r7
|
||||
L84:
|
||||
r7 = move-exception
|
||||
goto L8a
|
||||
L86:
|
||||
r8 = move-exception
|
||||
r6 = r8
|
||||
r8 = r7
|
||||
r7 = r6
|
||||
L8a:
|
||||
throw r7 // Catch: java.lang.Throwable -> L8b
|
||||
L8b:
|
||||
r0 = move-exception
|
||||
kotlinx.coroutines.channels.ChannelsKt.cancelConsumed(r8, r7)
|
||||
throw r0
|
||||
*/
|
||||
throw new UnsupportedOperationException("Method not decompiled: kotlinx.coroutines.channels.ChannelsKt__Channels_commonKt.toList(kotlinx.coroutines.channels.ReceiveChannel, kotlin.coroutines.Continuation):java.lang.Object");
|
||||
}
|
||||
|
||||
/* JADX WARN: Removed duplicated region for block: B:17:0x006f A[Catch: all -> 0x0088, TryCatch #0 {all -> 0x0088, blocks: (B:15:0x0067, B:17:0x006f, B:29:0x007a), top: B:14:0x0067 }] */
|
||||
/* JADX WARN: Removed duplicated region for block: B:21:0x0062 A[RETURN] */
|
||||
/* JADX WARN: Removed duplicated region for block: B:23:0x0063 */
|
||||
/* JADX WARN: Removed duplicated region for block: B:29:0x007a A[Catch: all -> 0x0088, TRY_LEAVE, TryCatch #0 {all -> 0x0088, blocks: (B:15:0x0067, B:17:0x006f, B:29:0x007a), top: B:14:0x0067 }] */
|
||||
/* JADX WARN: Removed duplicated region for block: B:39:0x0046 */
|
||||
/* JADX WARN: Removed duplicated region for block: B:8:0x0025 */
|
||||
/* JADX WARN: Unsupported multi-entry loop pattern (BACK_EDGE: B:23:0x0063 -> B:13:0x0039). Please report as a decompilation issue!!! */
|
||||
@kotlin.Deprecated(level = kotlin.DeprecationLevel.WARNING, message = "BroadcastChannel is deprecated in the favour of SharedFlow and is no longer supported")
|
||||
/*
|
||||
Code decompiled incorrectly, please refer to instructions dump.
|
||||
To view partially-correct add '--show-bad-code' argument
|
||||
*/
|
||||
public static final <E> java.lang.Object consumeEach(kotlinx.coroutines.channels.BroadcastChannel<E> r6, kotlin.jvm.functions.Function1<? super E, kotlin.Unit> r7, kotlin.coroutines.Continuation<? super kotlin.Unit> r8) {
|
||||
/*
|
||||
boolean r0 = r8 instanceof kotlinx.coroutines.channels.ChannelsKt__Channels_commonKt$consumeEach$3
|
||||
if (r0 == 0) goto L14
|
||||
r0 = r8
|
||||
kotlinx.coroutines.channels.ChannelsKt__Channels_commonKt$consumeEach$3 r0 = (kotlinx.coroutines.channels.ChannelsKt__Channels_commonKt$consumeEach$3) 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.channels.ChannelsKt__Channels_commonKt$consumeEach$3 r0 = new kotlinx.coroutines.channels.ChannelsKt__Channels_commonKt$consumeEach$3
|
||||
r0.<init>(r8)
|
||||
L19:
|
||||
java.lang.Object r8 = r0.result
|
||||
java.lang.Object r1 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED()
|
||||
int r2 = r0.label
|
||||
r3 = 0
|
||||
r4 = 1
|
||||
if (r2 == 0) goto L46
|
||||
if (r2 != r4) goto L3e
|
||||
java.lang.Object r6 = r0.L$2
|
||||
kotlinx.coroutines.channels.ChannelIterator r6 = (kotlinx.coroutines.channels.ChannelIterator) r6
|
||||
java.lang.Object r7 = r0.L$1
|
||||
kotlinx.coroutines.channels.ReceiveChannel r7 = (kotlinx.coroutines.channels.ReceiveChannel) r7
|
||||
java.lang.Object r2 = r0.L$0
|
||||
kotlin.jvm.functions.Function1 r2 = (kotlin.jvm.functions.Function1) r2
|
||||
kotlin.ResultKt.throwOnFailure(r8) // Catch: java.lang.Throwable -> L3c
|
||||
r5 = r0
|
||||
r0 = r7
|
||||
r7 = r2
|
||||
L39:
|
||||
r2 = r1
|
||||
r1 = r5
|
||||
goto L67
|
||||
L3c:
|
||||
r6 = move-exception
|
||||
goto L92
|
||||
L3e:
|
||||
java.lang.IllegalStateException r6 = new java.lang.IllegalStateException
|
||||
java.lang.String r7 = "call to 'resume' before 'invoke' with coroutine"
|
||||
r6.<init>(r7)
|
||||
throw r6
|
||||
L46:
|
||||
kotlin.ResultKt.throwOnFailure(r8)
|
||||
kotlinx.coroutines.channels.ReceiveChannel r6 = r6.openSubscription()
|
||||
kotlinx.coroutines.channels.ChannelIterator r8 = r6.iterator() // Catch: java.lang.Throwable -> L8e
|
||||
r5 = r8
|
||||
r8 = r6
|
||||
r6 = r5
|
||||
L54:
|
||||
r0.L$0 = r7 // Catch: java.lang.Throwable -> L8b
|
||||
r0.L$1 = r8 // Catch: java.lang.Throwable -> L8b
|
||||
r0.L$2 = r6 // Catch: java.lang.Throwable -> L8b
|
||||
r0.label = r4 // Catch: java.lang.Throwable -> L8b
|
||||
java.lang.Object r2 = r6.hasNext(r0) // Catch: java.lang.Throwable -> L8b
|
||||
if (r2 != r1) goto L63
|
||||
return r1
|
||||
L63:
|
||||
r5 = r0
|
||||
r0 = r8
|
||||
r8 = r2
|
||||
goto L39
|
||||
L67:
|
||||
java.lang.Boolean r8 = (java.lang.Boolean) r8 // Catch: java.lang.Throwable -> L88
|
||||
boolean r8 = r8.booleanValue() // Catch: java.lang.Throwable -> L88
|
||||
if (r8 == 0) goto L7a
|
||||
java.lang.Object r8 = r6.next() // Catch: java.lang.Throwable -> L88
|
||||
r7.invoke(r8) // Catch: java.lang.Throwable -> L88
|
||||
r8 = r0
|
||||
r0 = r1
|
||||
r1 = r2
|
||||
goto L54
|
||||
L7a:
|
||||
kotlin.Unit r6 = kotlin.Unit.INSTANCE // Catch: java.lang.Throwable -> L88
|
||||
kotlin.jvm.internal.InlineMarker.finallyStart(r4)
|
||||
kotlinx.coroutines.channels.ReceiveChannel.DefaultImpls.cancel$default(r0, r3, r4, r3)
|
||||
kotlin.jvm.internal.InlineMarker.finallyEnd(r4)
|
||||
kotlin.Unit r6 = kotlin.Unit.INSTANCE
|
||||
return r6
|
||||
L88:
|
||||
r6 = move-exception
|
||||
r7 = r0
|
||||
goto L92
|
||||
L8b:
|
||||
r6 = move-exception
|
||||
r7 = r8
|
||||
goto L92
|
||||
L8e:
|
||||
r7 = move-exception
|
||||
r5 = r7
|
||||
r7 = r6
|
||||
r6 = r5
|
||||
L92:
|
||||
kotlin.jvm.internal.InlineMarker.finallyStart(r4)
|
||||
kotlinx.coroutines.channels.ReceiveChannel.DefaultImpls.cancel$default(r7, r3, r4, r3)
|
||||
kotlin.jvm.internal.InlineMarker.finallyEnd(r4)
|
||||
throw r6
|
||||
*/
|
||||
throw new UnsupportedOperationException("Method not decompiled: kotlinx.coroutines.channels.ChannelsKt__Channels_commonKt.consumeEach(kotlinx.coroutines.channels.BroadcastChannel, kotlin.jvm.functions.Function1, kotlin.coroutines.Continuation):java.lang.Object");
|
||||
}
|
||||
|
||||
public static final void cancelConsumed(ReceiveChannel<?> receiveChannel, Throwable th) {
|
||||
if (th != null) {
|
||||
r0 = th instanceof CancellationException ? (CancellationException) th : null;
|
||||
if (r0 == null) {
|
||||
r0 = ExceptionsKt.CancellationException("Channel was consumed, consumer had failed", th);
|
||||
}
|
||||
}
|
||||
receiveChannel.cancel(r0);
|
||||
}
|
||||
|
||||
private static final <E> Object consumeEach$$forInline(ReceiveChannel<? extends E> receiveChannel, Function1<? super E, Unit> function1, Continuation<? super Unit> continuation) {
|
||||
try {
|
||||
ReceiveChannel<? extends E> receiveChannel2 = receiveChannel;
|
||||
ChannelIterator<? extends E> it = receiveChannel.iterator();
|
||||
while (true) {
|
||||
InlineMarker.mark(3);
|
||||
InlineMarker.mark(0);
|
||||
Object hasNext = it.hasNext(null);
|
||||
InlineMarker.mark(1);
|
||||
if (!((Boolean) hasNext).booleanValue()) {
|
||||
Unit unit = Unit.INSTANCE;
|
||||
InlineMarker.finallyStart(1);
|
||||
ChannelsKt.cancelConsumed(receiveChannel, null);
|
||||
InlineMarker.finallyEnd(1);
|
||||
return Unit.INSTANCE;
|
||||
}
|
||||
function1.invoke(it.next());
|
||||
}
|
||||
} finally {
|
||||
}
|
||||
}
|
||||
|
||||
@Deprecated(level = DeprecationLevel.WARNING, message = "BroadcastChannel is deprecated in the favour of SharedFlow and is no longer supported")
|
||||
private static final <E> Object consumeEach$$forInline(BroadcastChannel<E> broadcastChannel, Function1<? super E, Unit> function1, Continuation<? super Unit> continuation) {
|
||||
ReceiveChannel<E> openSubscription = broadcastChannel.openSubscription();
|
||||
try {
|
||||
ReceiveChannel<E> receiveChannel = openSubscription;
|
||||
ChannelIterator<E> it = openSubscription.iterator();
|
||||
while (true) {
|
||||
InlineMarker.mark(3);
|
||||
InlineMarker.mark(0);
|
||||
Object hasNext = it.hasNext(null);
|
||||
InlineMarker.mark(1);
|
||||
if (!((Boolean) hasNext).booleanValue()) {
|
||||
Unit unit = Unit.INSTANCE;
|
||||
InlineMarker.finallyStart(1);
|
||||
ReceiveChannel.DefaultImpls.cancel$default((ReceiveChannel) openSubscription, (CancellationException) null, 1, (Object) null);
|
||||
InlineMarker.finallyEnd(1);
|
||||
return Unit.INSTANCE;
|
||||
}
|
||||
function1.invoke(it.next());
|
||||
}
|
||||
} catch (Throwable th) {
|
||||
InlineMarker.finallyStart(1);
|
||||
ReceiveChannel.DefaultImpls.cancel$default((ReceiveChannel) openSubscription, (CancellationException) null, 1, (Object) null);
|
||||
InlineMarker.finallyEnd(1);
|
||||
throw th;
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,29 @@
|
||||
package kotlinx.coroutines.channels;
|
||||
|
||||
import kotlin.Metadata;
|
||||
import kotlin.coroutines.Continuation;
|
||||
import kotlin.coroutines.jvm.internal.ContinuationImpl;
|
||||
import kotlin.coroutines.jvm.internal.DebugMetadata;
|
||||
|
||||
/* compiled from: Deprecated.kt */
|
||||
@Metadata(k = 3, mv = {1, 8, 0}, xi = 48)
|
||||
@DebugMetadata(c = "kotlinx.coroutines.channels.ChannelsKt__DeprecatedKt", f = "Deprecated.kt", i = {0}, l = {404}, m = "any", n = {"$this$consume$iv"}, s = {"L$0"})
|
||||
/* loaded from: classes.dex */
|
||||
final class ChannelsKt__DeprecatedKt$any$1<E> extends ContinuationImpl {
|
||||
Object L$0;
|
||||
int label;
|
||||
/* synthetic */ Object result;
|
||||
|
||||
ChannelsKt__DeprecatedKt$any$1(Continuation<? super ChannelsKt__DeprecatedKt$any$1> continuation) {
|
||||
super(continuation);
|
||||
}
|
||||
|
||||
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
||||
public final Object invokeSuspend(Object obj) {
|
||||
Object any;
|
||||
this.result = obj;
|
||||
this.label |= Integer.MIN_VALUE;
|
||||
any = ChannelsKt__DeprecatedKt.any(null, this);
|
||||
return any;
|
||||
}
|
||||
}
|
@ -0,0 +1,31 @@
|
||||
package kotlinx.coroutines.channels;
|
||||
|
||||
import kotlin.Metadata;
|
||||
import kotlin.coroutines.Continuation;
|
||||
import kotlin.coroutines.jvm.internal.ContinuationImpl;
|
||||
import kotlin.coroutines.jvm.internal.DebugMetadata;
|
||||
|
||||
/* compiled from: Deprecated.kt */
|
||||
@Metadata(k = 3, mv = {1, 8, 0}, xi = 48)
|
||||
@DebugMetadata(c = "kotlinx.coroutines.channels.ChannelsKt__DeprecatedKt", f = "Deprecated.kt", i = {0, 0}, l = {487}, m = "count", n = {"count", "$this$consume$iv$iv"}, s = {"L$0", "L$1"})
|
||||
/* loaded from: classes.dex */
|
||||
final class ChannelsKt__DeprecatedKt$count$1<E> extends ContinuationImpl {
|
||||
Object L$0;
|
||||
Object L$1;
|
||||
Object L$2;
|
||||
int label;
|
||||
/* synthetic */ Object result;
|
||||
|
||||
ChannelsKt__DeprecatedKt$count$1(Continuation<? super ChannelsKt__DeprecatedKt$count$1> continuation) {
|
||||
super(continuation);
|
||||
}
|
||||
|
||||
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
||||
public final Object invokeSuspend(Object obj) {
|
||||
Object count;
|
||||
this.result = obj;
|
||||
this.label |= Integer.MIN_VALUE;
|
||||
count = ChannelsKt__DeprecatedKt.count(null, this);
|
||||
return count;
|
||||
}
|
||||
}
|
@ -0,0 +1,51 @@
|
||||
package kotlinx.coroutines.channels;
|
||||
|
||||
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.SuspendLambda;
|
||||
import kotlin.jvm.functions.Function2;
|
||||
|
||||
/* JADX INFO: Add missing generic type declarations: [E] */
|
||||
/* compiled from: Deprecated.kt */
|
||||
@Metadata(d1 = {"\u0000\u0004\n\u0002\b\u0003\u0010\u0002\u001a\u00028\u0000\"\u0004\b\u0000\u0010\u00002\u0006\u0010\u0001\u001a\u00028\u0000H\u008a@"}, d2 = {"E", "it", "<anonymous>"}, k = 3, mv = {1, 8, 0})
|
||||
@DebugMetadata(c = "kotlinx.coroutines.channels.ChannelsKt__DeprecatedKt$distinct$1", f = "Deprecated.kt", i = {}, l = {}, m = "invokeSuspend", n = {}, s = {})
|
||||
/* loaded from: classes.dex */
|
||||
final class ChannelsKt__DeprecatedKt$distinct$1<E> extends SuspendLambda implements Function2<E, Continuation<? super E>, Object> {
|
||||
/* synthetic */ Object L$0;
|
||||
int label;
|
||||
|
||||
ChannelsKt__DeprecatedKt$distinct$1(Continuation<? super ChannelsKt__DeprecatedKt$distinct$1> continuation) {
|
||||
super(2, continuation);
|
||||
}
|
||||
|
||||
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
||||
public final Continuation<Unit> create(Object obj, Continuation<?> continuation) {
|
||||
ChannelsKt__DeprecatedKt$distinct$1 channelsKt__DeprecatedKt$distinct$1 = new ChannelsKt__DeprecatedKt$distinct$1(continuation);
|
||||
channelsKt__DeprecatedKt$distinct$1.L$0 = obj;
|
||||
return channelsKt__DeprecatedKt$distinct$1;
|
||||
}
|
||||
|
||||
/* JADX WARN: Multi-variable type inference failed */
|
||||
@Override // kotlin.jvm.functions.Function2
|
||||
public /* bridge */ /* synthetic */ Object invoke(Object obj, Object obj2) {
|
||||
return invoke((ChannelsKt__DeprecatedKt$distinct$1<E>) obj, (Continuation<? super ChannelsKt__DeprecatedKt$distinct$1<E>>) obj2);
|
||||
}
|
||||
|
||||
public final Object invoke(E e, Continuation<? super E> continuation) {
|
||||
return ((ChannelsKt__DeprecatedKt$distinct$1) create(e, continuation)).invokeSuspend(Unit.INSTANCE);
|
||||
}
|
||||
|
||||
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
||||
public final Object invokeSuspend(Object obj) {
|
||||
IntrinsicsKt.getCOROUTINE_SUSPENDED();
|
||||
if (this.label != 0) {
|
||||
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
|
||||
}
|
||||
ResultKt.throwOnFailure(obj);
|
||||
return this.L$0;
|
||||
}
|
||||
}
|
@ -0,0 +1,65 @@
|
||||
package kotlinx.coroutines.channels;
|
||||
|
||||
import kotlin.Metadata;
|
||||
import kotlin.Unit;
|
||||
import kotlin.coroutines.Continuation;
|
||||
import kotlin.coroutines.jvm.internal.DebugMetadata;
|
||||
import kotlin.coroutines.jvm.internal.SuspendLambda;
|
||||
import kotlin.jvm.functions.Function2;
|
||||
|
||||
/* JADX INFO: Add missing generic type declarations: [E] */
|
||||
/* compiled from: Deprecated.kt */
|
||||
@Metadata(d1 = {"\u0000\u000e\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\u0010\u0002\n\u0000\u0010\u0004\u001a\u00020\u0003\"\u0004\b\u0000\u0010\u0000\"\u0004\b\u0001\u0010\u0001*\b\u0012\u0004\u0012\u00028\u00000\u0002H\u008a@"}, d2 = {"E", "K", "Lkotlinx/coroutines/channels/ProducerScope;", "", "<anonymous>"}, k = 3, mv = {1, 8, 0})
|
||||
@DebugMetadata(c = "kotlinx.coroutines.channels.ChannelsKt__DeprecatedKt$distinctBy$1", f = "Deprecated.kt", i = {0, 0, 1, 1, 1, 2, 2, 2}, l = {387, 388, 390}, m = "invokeSuspend", n = {"$this$produce", "keys", "$this$produce", "keys", "e", "$this$produce", "keys", "k"}, s = {"L$0", "L$1", "L$0", "L$1", "L$3", "L$0", "L$1", "L$3"})
|
||||
/* loaded from: classes.dex */
|
||||
final class ChannelsKt__DeprecatedKt$distinctBy$1<E> extends SuspendLambda implements Function2<ProducerScope<? super E>, Continuation<? super Unit>, Object> {
|
||||
final /* synthetic */ Function2<E, Continuation<? super K>, Object> $selector;
|
||||
final /* synthetic */ ReceiveChannel<E> $this_distinctBy;
|
||||
private /* synthetic */ Object L$0;
|
||||
Object L$1;
|
||||
Object L$2;
|
||||
Object L$3;
|
||||
int label;
|
||||
|
||||
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
||||
/* JADX WARN: Multi-variable type inference failed */
|
||||
ChannelsKt__DeprecatedKt$distinctBy$1(ReceiveChannel<? extends E> receiveChannel, Function2<? super E, ? super Continuation<? super K>, ? extends Object> function2, Continuation<? super ChannelsKt__DeprecatedKt$distinctBy$1> continuation) {
|
||||
super(2, continuation);
|
||||
this.$this_distinctBy = receiveChannel;
|
||||
this.$selector = function2;
|
||||
}
|
||||
|
||||
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
||||
public final Continuation<Unit> create(Object obj, Continuation<?> continuation) {
|
||||
ChannelsKt__DeprecatedKt$distinctBy$1 channelsKt__DeprecatedKt$distinctBy$1 = new ChannelsKt__DeprecatedKt$distinctBy$1(this.$this_distinctBy, this.$selector, continuation);
|
||||
channelsKt__DeprecatedKt$distinctBy$1.L$0 = obj;
|
||||
return channelsKt__DeprecatedKt$distinctBy$1;
|
||||
}
|
||||
|
||||
@Override // kotlin.jvm.functions.Function2
|
||||
public final Object invoke(ProducerScope<? super E> producerScope, Continuation<? super Unit> continuation) {
|
||||
return ((ChannelsKt__DeprecatedKt$distinctBy$1) create(producerScope, continuation)).invokeSuspend(Unit.INSTANCE);
|
||||
}
|
||||
|
||||
/* JADX WARN: Multi-variable type inference failed */
|
||||
/* JADX WARN: Removed duplicated region for block: B:10:0x0085 A[RETURN] */
|
||||
/* JADX WARN: Removed duplicated region for block: B:12:0x0086 */
|
||||
/* JADX WARN: Removed duplicated region for block: B:15:0x0095 */
|
||||
/* JADX WARN: Removed duplicated region for block: B:21:0x00b7 */
|
||||
/* JADX WARN: Removed duplicated region for block: B:25:0x00db */
|
||||
/* JADX WARN: Removed duplicated region for block: B:26:0x00e1 */
|
||||
/* JADX WARN: Unsupported multi-entry loop pattern (BACK_EDGE: B:24:0x00cb -> B:7:0x00d1). Please report as a decompilation issue!!! */
|
||||
/* JADX WARN: Unsupported multi-entry loop pattern (BACK_EDGE: B:25:0x00db -> B:8:0x0071). Please report as a decompilation issue!!! */
|
||||
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
||||
/*
|
||||
Code decompiled incorrectly, please refer to instructions dump.
|
||||
To view partially-correct add '--show-bad-code' argument
|
||||
*/
|
||||
public final java.lang.Object invokeSuspend(java.lang.Object r12) {
|
||||
/*
|
||||
Method dump skipped, instructions count: 228
|
||||
To view this dump add '--comments-level debug' option
|
||||
*/
|
||||
throw new UnsupportedOperationException("Method not decompiled: kotlinx.coroutines.channels.ChannelsKt__DeprecatedKt$distinctBy$1.invokeSuspend(java.lang.Object):java.lang.Object");
|
||||
}
|
||||
}
|
@ -0,0 +1,64 @@
|
||||
package kotlinx.coroutines.channels;
|
||||
|
||||
import kotlin.Metadata;
|
||||
import kotlin.Unit;
|
||||
import kotlin.coroutines.Continuation;
|
||||
import kotlin.coroutines.jvm.internal.DebugMetadata;
|
||||
import kotlin.coroutines.jvm.internal.SuspendLambda;
|
||||
import kotlin.jvm.functions.Function2;
|
||||
|
||||
/* JADX INFO: Add missing generic type declarations: [E] */
|
||||
/* compiled from: Deprecated.kt */
|
||||
@Metadata(d1 = {"\u0000\f\n\u0000\n\u0002\u0018\u0002\n\u0002\u0010\u0002\n\u0000\u0010\u0003\u001a\u00020\u0002\"\u0004\b\u0000\u0010\u0000*\b\u0012\u0004\u0012\u00028\u00000\u0001H\u008a@"}, d2 = {"E", "Lkotlinx/coroutines/channels/ProducerScope;", "", "<anonymous>"}, k = 3, mv = {1, 8, 0})
|
||||
@DebugMetadata(c = "kotlinx.coroutines.channels.ChannelsKt__DeprecatedKt$drop$1", f = "Deprecated.kt", i = {0, 0, 1, 2}, l = {164, 169, 170}, m = "invokeSuspend", n = {"$this$produce", "remaining", "$this$produce", "$this$produce"}, s = {"L$0", "I$0", "L$0", "L$0"})
|
||||
/* loaded from: classes.dex */
|
||||
final class ChannelsKt__DeprecatedKt$drop$1<E> extends SuspendLambda implements Function2<ProducerScope<? super E>, Continuation<? super Unit>, Object> {
|
||||
final /* synthetic */ int $n;
|
||||
final /* synthetic */ ReceiveChannel<E> $this_drop;
|
||||
int I$0;
|
||||
private /* synthetic */ Object L$0;
|
||||
Object L$1;
|
||||
int label;
|
||||
|
||||
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
||||
/* JADX WARN: Multi-variable type inference failed */
|
||||
ChannelsKt__DeprecatedKt$drop$1(int i, ReceiveChannel<? extends E> receiveChannel, Continuation<? super ChannelsKt__DeprecatedKt$drop$1> continuation) {
|
||||
super(2, continuation);
|
||||
this.$n = i;
|
||||
this.$this_drop = receiveChannel;
|
||||
}
|
||||
|
||||
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
||||
public final Continuation<Unit> create(Object obj, Continuation<?> continuation) {
|
||||
ChannelsKt__DeprecatedKt$drop$1 channelsKt__DeprecatedKt$drop$1 = new ChannelsKt__DeprecatedKt$drop$1(this.$n, this.$this_drop, continuation);
|
||||
channelsKt__DeprecatedKt$drop$1.L$0 = obj;
|
||||
return channelsKt__DeprecatedKt$drop$1;
|
||||
}
|
||||
|
||||
@Override // kotlin.jvm.functions.Function2
|
||||
public final Object invoke(ProducerScope<? super E> producerScope, Continuation<? super Unit> continuation) {
|
||||
return ((ChannelsKt__DeprecatedKt$drop$1) create(producerScope, continuation)).invokeSuspend(Unit.INSTANCE);
|
||||
}
|
||||
|
||||
/* JADX WARN: Removed duplicated region for block: B:11:0x00b2 */
|
||||
/* JADX WARN: Removed duplicated region for block: B:14:0x00bd */
|
||||
/* JADX WARN: Removed duplicated region for block: B:18:0x00d3 */
|
||||
/* JADX WARN: Removed duplicated region for block: B:26:0x0089 */
|
||||
/* JADX WARN: Removed duplicated region for block: B:31:0x0079 A[RETURN] */
|
||||
/* JADX WARN: Removed duplicated region for block: B:32:0x007a */
|
||||
/* JADX WARN: Removed duplicated region for block: B:9:0x00b1 A[RETURN] */
|
||||
/* JADX WARN: Unsupported multi-entry loop pattern (BACK_EDGE: B:17:0x00d1 -> B:7:0x00a2). Please report as a decompilation issue!!! */
|
||||
/* JADX WARN: Unsupported multi-entry loop pattern (BACK_EDGE: B:32:0x007a -> B:24:0x0081). Please report as a decompilation issue!!! */
|
||||
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
||||
/*
|
||||
Code decompiled incorrectly, please refer to instructions dump.
|
||||
To view partially-correct add '--show-bad-code' argument
|
||||
*/
|
||||
public final java.lang.Object invokeSuspend(java.lang.Object r10) {
|
||||
/*
|
||||
Method dump skipped, instructions count: 243
|
||||
To view this dump add '--comments-level debug' option
|
||||
*/
|
||||
throw new UnsupportedOperationException("Method not decompiled: kotlinx.coroutines.channels.ChannelsKt__DeprecatedKt$drop$1.invokeSuspend(java.lang.Object):java.lang.Object");
|
||||
}
|
||||
}
|
@ -0,0 +1,67 @@
|
||||
package kotlinx.coroutines.channels;
|
||||
|
||||
import kotlin.Metadata;
|
||||
import kotlin.Unit;
|
||||
import kotlin.coroutines.Continuation;
|
||||
import kotlin.coroutines.jvm.internal.DebugMetadata;
|
||||
import kotlin.coroutines.jvm.internal.SuspendLambda;
|
||||
import kotlin.jvm.functions.Function2;
|
||||
|
||||
/* JADX INFO: Add missing generic type declarations: [E] */
|
||||
/* compiled from: Deprecated.kt */
|
||||
@Metadata(d1 = {"\u0000\f\n\u0000\n\u0002\u0018\u0002\n\u0002\u0010\u0002\n\u0000\u0010\u0003\u001a\u00020\u0002\"\u0004\b\u0000\u0010\u0000*\b\u0012\u0004\u0012\u00028\u00000\u0001H\u008a@"}, d2 = {"E", "Lkotlinx/coroutines/channels/ProducerScope;", "", "<anonymous>"}, k = 3, mv = {1, 8, 0})
|
||||
@DebugMetadata(c = "kotlinx.coroutines.channels.ChannelsKt__DeprecatedKt$dropWhile$1", f = "Deprecated.kt", i = {0, 1, 1, 2, 3, 4}, l = {181, 182, 183, 187, 188}, m = "invokeSuspend", n = {"$this$produce", "$this$produce", "e", "$this$produce", "$this$produce", "$this$produce"}, s = {"L$0", "L$0", "L$2", "L$0", "L$0", "L$0"})
|
||||
/* loaded from: classes.dex */
|
||||
final class ChannelsKt__DeprecatedKt$dropWhile$1<E> extends SuspendLambda implements Function2<ProducerScope<? super E>, Continuation<? super Unit>, Object> {
|
||||
final /* synthetic */ Function2<E, Continuation<? super Boolean>, Object> $predicate;
|
||||
final /* synthetic */ ReceiveChannel<E> $this_dropWhile;
|
||||
private /* synthetic */ Object L$0;
|
||||
Object L$1;
|
||||
Object L$2;
|
||||
int label;
|
||||
|
||||
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
||||
/* JADX WARN: Multi-variable type inference failed */
|
||||
ChannelsKt__DeprecatedKt$dropWhile$1(ReceiveChannel<? extends E> receiveChannel, Function2<? super E, ? super Continuation<? super Boolean>, ? extends Object> function2, Continuation<? super ChannelsKt__DeprecatedKt$dropWhile$1> continuation) {
|
||||
super(2, continuation);
|
||||
this.$this_dropWhile = receiveChannel;
|
||||
this.$predicate = function2;
|
||||
}
|
||||
|
||||
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
||||
public final Continuation<Unit> create(Object obj, Continuation<?> continuation) {
|
||||
ChannelsKt__DeprecatedKt$dropWhile$1 channelsKt__DeprecatedKt$dropWhile$1 = new ChannelsKt__DeprecatedKt$dropWhile$1(this.$this_dropWhile, this.$predicate, continuation);
|
||||
channelsKt__DeprecatedKt$dropWhile$1.L$0 = obj;
|
||||
return channelsKt__DeprecatedKt$dropWhile$1;
|
||||
}
|
||||
|
||||
@Override // kotlin.jvm.functions.Function2
|
||||
public final Object invoke(ProducerScope<? super E> producerScope, Continuation<? super Unit> continuation) {
|
||||
return ((ChannelsKt__DeprecatedKt$dropWhile$1) create(producerScope, continuation)).invokeSuspend(Unit.INSTANCE);
|
||||
}
|
||||
|
||||
/* JADX WARN: Multi-variable type inference failed */
|
||||
/* JADX WARN: Removed duplicated region for block: B:11:0x00ef A[RETURN] */
|
||||
/* JADX WARN: Removed duplicated region for block: B:13:0x00f0 */
|
||||
/* JADX WARN: Removed duplicated region for block: B:16:0x00fb */
|
||||
/* JADX WARN: Removed duplicated region for block: B:20:0x0111 */
|
||||
/* JADX WARN: Removed duplicated region for block: B:31:0x00c1 */
|
||||
/* JADX WARN: Removed duplicated region for block: B:34:0x00d5 */
|
||||
/* JADX WARN: Removed duplicated region for block: B:37:0x0091 A[RETURN] */
|
||||
/* JADX WARN: Removed duplicated region for block: B:38:0x0092 */
|
||||
/* JADX WARN: Removed duplicated region for block: B:41:0x00a0 */
|
||||
/* JADX WARN: Unsupported multi-entry loop pattern (BACK_EDGE: B:19:0x010f -> B:9:0x00e0). Please report as a decompilation issue!!! */
|
||||
/* JADX WARN: Unsupported multi-entry loop pattern (BACK_EDGE: B:44:0x00b5 -> B:29:0x00b9). Please report as a decompilation issue!!! */
|
||||
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
||||
/*
|
||||
Code decompiled incorrectly, please refer to instructions dump.
|
||||
To view partially-correct add '--show-bad-code' argument
|
||||
*/
|
||||
public final java.lang.Object invokeSuspend(java.lang.Object r13) {
|
||||
/*
|
||||
Method dump skipped, instructions count: 276
|
||||
To view this dump add '--comments-level debug' option
|
||||
*/
|
||||
throw new UnsupportedOperationException("Method not decompiled: kotlinx.coroutines.channels.ChannelsKt__DeprecatedKt$dropWhile$1.invokeSuspend(java.lang.Object):java.lang.Object");
|
||||
}
|
||||
}
|
@ -0,0 +1,32 @@
|
||||
package kotlinx.coroutines.channels;
|
||||
|
||||
import kotlin.Metadata;
|
||||
import kotlin.coroutines.Continuation;
|
||||
import kotlin.coroutines.jvm.internal.ContinuationImpl;
|
||||
import kotlin.coroutines.jvm.internal.DebugMetadata;
|
||||
|
||||
/* compiled from: Deprecated.kt */
|
||||
@Metadata(k = 3, mv = {1, 8, 0}, xi = 48)
|
||||
@DebugMetadata(c = "kotlinx.coroutines.channels.ChannelsKt__DeprecatedKt", f = "Deprecated.kt", i = {0, 0, 0}, l = {38}, m = "elementAt", n = {"$this$consume$iv", "index", "count"}, s = {"L$0", "I$0", "I$1"})
|
||||
/* loaded from: classes.dex */
|
||||
final class ChannelsKt__DeprecatedKt$elementAt$1<E> extends ContinuationImpl {
|
||||
int I$0;
|
||||
int I$1;
|
||||
Object L$0;
|
||||
Object L$1;
|
||||
int label;
|
||||
/* synthetic */ Object result;
|
||||
|
||||
ChannelsKt__DeprecatedKt$elementAt$1(Continuation<? super ChannelsKt__DeprecatedKt$elementAt$1> continuation) {
|
||||
super(continuation);
|
||||
}
|
||||
|
||||
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
||||
public final Object invokeSuspend(Object obj) {
|
||||
Object elementAt;
|
||||
this.result = obj;
|
||||
this.label |= Integer.MIN_VALUE;
|
||||
elementAt = ChannelsKt__DeprecatedKt.elementAt(null, 0, this);
|
||||
return elementAt;
|
||||
}
|
||||
}
|
@ -0,0 +1,32 @@
|
||||
package kotlinx.coroutines.channels;
|
||||
|
||||
import kotlin.Metadata;
|
||||
import kotlin.coroutines.Continuation;
|
||||
import kotlin.coroutines.jvm.internal.ContinuationImpl;
|
||||
import kotlin.coroutines.jvm.internal.DebugMetadata;
|
||||
|
||||
/* compiled from: Deprecated.kt */
|
||||
@Metadata(k = 3, mv = {1, 8, 0}, xi = 48)
|
||||
@DebugMetadata(c = "kotlinx.coroutines.channels.ChannelsKt__DeprecatedKt", f = "Deprecated.kt", i = {0, 0, 0}, l = {53}, m = "elementAtOrNull", n = {"$this$consume$iv", "index", "count"}, s = {"L$0", "I$0", "I$1"})
|
||||
/* loaded from: classes.dex */
|
||||
final class ChannelsKt__DeprecatedKt$elementAtOrNull$1<E> extends ContinuationImpl {
|
||||
int I$0;
|
||||
int I$1;
|
||||
Object L$0;
|
||||
Object L$1;
|
||||
int label;
|
||||
/* synthetic */ Object result;
|
||||
|
||||
ChannelsKt__DeprecatedKt$elementAtOrNull$1(Continuation<? super ChannelsKt__DeprecatedKt$elementAtOrNull$1> continuation) {
|
||||
super(continuation);
|
||||
}
|
||||
|
||||
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
||||
public final Object invokeSuspend(Object obj) {
|
||||
Object elementAtOrNull;
|
||||
this.result = obj;
|
||||
this.label |= Integer.MIN_VALUE;
|
||||
elementAtOrNull = ChannelsKt__DeprecatedKt.elementAtOrNull(null, 0, this);
|
||||
return elementAtOrNull;
|
||||
}
|
||||
}
|
@ -0,0 +1,177 @@
|
||||
package kotlinx.coroutines.channels;
|
||||
|
||||
import kotlin.Metadata;
|
||||
import kotlin.Unit;
|
||||
import kotlin.coroutines.Continuation;
|
||||
import kotlin.coroutines.jvm.internal.DebugMetadata;
|
||||
import kotlin.coroutines.jvm.internal.SuspendLambda;
|
||||
import kotlin.jvm.functions.Function2;
|
||||
|
||||
/* JADX INFO: Add missing generic type declarations: [E] */
|
||||
/* compiled from: Deprecated.kt */
|
||||
@Metadata(d1 = {"\u0000\f\n\u0000\n\u0002\u0018\u0002\n\u0002\u0010\u0002\n\u0000\u0010\u0003\u001a\u00020\u0002\"\u0004\b\u0000\u0010\u0000*\b\u0012\u0004\u0012\u00028\u00000\u0001H\u008a@"}, d2 = {"E", "Lkotlinx/coroutines/channels/ProducerScope;", "", "<anonymous>"}, k = 3, mv = {1, 8, 0})
|
||||
@DebugMetadata(c = "kotlinx.coroutines.channels.ChannelsKt__DeprecatedKt$filter$1", f = "Deprecated.kt", i = {0, 1, 1, 2}, l = {198, 199, 199}, m = "invokeSuspend", n = {"$this$produce", "$this$produce", "e", "$this$produce"}, s = {"L$0", "L$0", "L$2", "L$0"})
|
||||
/* loaded from: classes.dex */
|
||||
final class ChannelsKt__DeprecatedKt$filter$1<E> extends SuspendLambda implements Function2<ProducerScope<? super E>, Continuation<? super Unit>, Object> {
|
||||
final /* synthetic */ Function2<E, Continuation<? super Boolean>, Object> $predicate;
|
||||
final /* synthetic */ ReceiveChannel<E> $this_filter;
|
||||
private /* synthetic */ Object L$0;
|
||||
Object L$1;
|
||||
Object L$2;
|
||||
int label;
|
||||
|
||||
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
||||
/* JADX WARN: Multi-variable type inference failed */
|
||||
ChannelsKt__DeprecatedKt$filter$1(ReceiveChannel<? extends E> receiveChannel, Function2<? super E, ? super Continuation<? super Boolean>, ? extends Object> function2, Continuation<? super ChannelsKt__DeprecatedKt$filter$1> continuation) {
|
||||
super(2, continuation);
|
||||
this.$this_filter = receiveChannel;
|
||||
this.$predicate = function2;
|
||||
}
|
||||
|
||||
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
||||
public final Continuation<Unit> create(Object obj, Continuation<?> continuation) {
|
||||
ChannelsKt__DeprecatedKt$filter$1 channelsKt__DeprecatedKt$filter$1 = new ChannelsKt__DeprecatedKt$filter$1(this.$this_filter, this.$predicate, continuation);
|
||||
channelsKt__DeprecatedKt$filter$1.L$0 = obj;
|
||||
return channelsKt__DeprecatedKt$filter$1;
|
||||
}
|
||||
|
||||
@Override // kotlin.jvm.functions.Function2
|
||||
public final Object invoke(ProducerScope<? super E> producerScope, Continuation<? super Unit> continuation) {
|
||||
return ((ChannelsKt__DeprecatedKt$filter$1) create(producerScope, continuation)).invokeSuspend(Unit.INSTANCE);
|
||||
}
|
||||
|
||||
/* JADX WARN: Code restructure failed: missing block: B:25:0x0058, code lost:
|
||||
|
||||
r11 = r0;
|
||||
r0 = r1;
|
||||
r1 = r6;
|
||||
r6 = r8;
|
||||
*/
|
||||
/* JADX WARN: Multi-variable type inference failed */
|
||||
/* JADX WARN: Removed duplicated region for block: B:10:0x0069 A[RETURN] */
|
||||
/* JADX WARN: Removed duplicated region for block: B:12:0x006a */
|
||||
/* JADX WARN: Removed duplicated region for block: B:15:0x0078 */
|
||||
/* JADX WARN: Removed duplicated region for block: B:21:0x0099 */
|
||||
/* JADX WARN: Removed duplicated region for block: B:26:0x00b0 */
|
||||
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
||||
/*
|
||||
Code decompiled incorrectly, please refer to instructions dump.
|
||||
To view partially-correct add '--show-bad-code' argument
|
||||
*/
|
||||
public final java.lang.Object invokeSuspend(java.lang.Object r11) {
|
||||
/*
|
||||
r10 = this;
|
||||
java.lang.Object r0 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED()
|
||||
int r1 = r10.label
|
||||
r2 = 0
|
||||
r3 = 3
|
||||
r4 = 2
|
||||
r5 = 1
|
||||
if (r1 == 0) goto L49
|
||||
if (r1 == r5) goto L39
|
||||
if (r1 == r4) goto L26
|
||||
if (r1 != r3) goto L1e
|
||||
java.lang.Object r1 = r10.L$1
|
||||
kotlinx.coroutines.channels.ChannelIterator r1 = (kotlinx.coroutines.channels.ChannelIterator) r1
|
||||
java.lang.Object r6 = r10.L$0
|
||||
kotlinx.coroutines.channels.ProducerScope r6 = (kotlinx.coroutines.channels.ProducerScope) r6
|
||||
kotlin.ResultKt.throwOnFailure(r11)
|
||||
goto L57
|
||||
L1e:
|
||||
java.lang.IllegalStateException r11 = new java.lang.IllegalStateException
|
||||
java.lang.String r0 = "call to 'resume' before 'invoke' with coroutine"
|
||||
r11.<init>(r0)
|
||||
throw r11
|
||||
L26:
|
||||
java.lang.Object r1 = r10.L$2
|
||||
java.lang.Object r6 = r10.L$1
|
||||
kotlinx.coroutines.channels.ChannelIterator r6 = (kotlinx.coroutines.channels.ChannelIterator) r6
|
||||
java.lang.Object r7 = r10.L$0
|
||||
kotlinx.coroutines.channels.ProducerScope r7 = (kotlinx.coroutines.channels.ProducerScope) r7
|
||||
kotlin.ResultKt.throwOnFailure(r11)
|
||||
r8 = r7
|
||||
r7 = r1
|
||||
r1 = r0
|
||||
r0 = r10
|
||||
goto L91
|
||||
L39:
|
||||
java.lang.Object r1 = r10.L$1
|
||||
kotlinx.coroutines.channels.ChannelIterator r1 = (kotlinx.coroutines.channels.ChannelIterator) r1
|
||||
java.lang.Object r6 = r10.L$0
|
||||
kotlinx.coroutines.channels.ProducerScope r6 = (kotlinx.coroutines.channels.ProducerScope) r6
|
||||
kotlin.ResultKt.throwOnFailure(r11)
|
||||
r7 = r6
|
||||
r6 = r1
|
||||
r1 = r0
|
||||
r0 = r10
|
||||
goto L70
|
||||
L49:
|
||||
kotlin.ResultKt.throwOnFailure(r11)
|
||||
java.lang.Object r11 = r10.L$0
|
||||
kotlinx.coroutines.channels.ProducerScope r11 = (kotlinx.coroutines.channels.ProducerScope) r11
|
||||
kotlinx.coroutines.channels.ReceiveChannel<E> r1 = r10.$this_filter
|
||||
kotlinx.coroutines.channels.ChannelIterator r1 = r1.iterator()
|
||||
r6 = r11
|
||||
L57:
|
||||
r11 = r10
|
||||
L58:
|
||||
r7 = r11
|
||||
kotlin.coroutines.Continuation r7 = (kotlin.coroutines.Continuation) r7
|
||||
r11.L$0 = r6
|
||||
r11.L$1 = r1
|
||||
r11.L$2 = r2
|
||||
r11.label = r5
|
||||
java.lang.Object r7 = r1.hasNext(r7)
|
||||
if (r7 != r0) goto L6a
|
||||
return r0
|
||||
L6a:
|
||||
r9 = r0
|
||||
r0 = r11
|
||||
r11 = r7
|
||||
r7 = r6
|
||||
r6 = r1
|
||||
r1 = r9
|
||||
L70:
|
||||
java.lang.Boolean r11 = (java.lang.Boolean) r11
|
||||
boolean r11 = r11.booleanValue()
|
||||
if (r11 == 0) goto Lb0
|
||||
java.lang.Object r11 = r6.next()
|
||||
kotlin.jvm.functions.Function2<E, kotlin.coroutines.Continuation<? super java.lang.Boolean>, java.lang.Object> r8 = r0.$predicate
|
||||
r0.L$0 = r7
|
||||
r0.L$1 = r6
|
||||
r0.L$2 = r11
|
||||
r0.label = r4
|
||||
java.lang.Object r8 = r8.invoke(r11, r0)
|
||||
if (r8 != r1) goto L8d
|
||||
return r1
|
||||
L8d:
|
||||
r9 = r7
|
||||
r7 = r11
|
||||
r11 = r8
|
||||
r8 = r9
|
||||
L91:
|
||||
java.lang.Boolean r11 = (java.lang.Boolean) r11
|
||||
boolean r11 = r11.booleanValue()
|
||||
if (r11 == 0) goto Lab
|
||||
r11 = r0
|
||||
kotlin.coroutines.Continuation r11 = (kotlin.coroutines.Continuation) r11
|
||||
r0.L$0 = r8
|
||||
r0.L$1 = r6
|
||||
r0.L$2 = r2
|
||||
r0.label = r3
|
||||
java.lang.Object r11 = r8.send(r7, r11)
|
||||
if (r11 != r1) goto Lab
|
||||
return r1
|
||||
Lab:
|
||||
r11 = r0
|
||||
r0 = r1
|
||||
r1 = r6
|
||||
r6 = r8
|
||||
goto L58
|
||||
Lb0:
|
||||
kotlin.Unit r11 = kotlin.Unit.INSTANCE
|
||||
return r11
|
||||
*/
|
||||
throw new UnsupportedOperationException("Method not decompiled: kotlinx.coroutines.channels.ChannelsKt__DeprecatedKt$filter$1.invokeSuspend(java.lang.Object):java.lang.Object");
|
||||
}
|
||||
}
|
@ -0,0 +1,70 @@
|
||||
package kotlinx.coroutines.channels;
|
||||
|
||||
import kotlin.Metadata;
|
||||
import kotlin.Unit;
|
||||
import kotlin.coroutines.Continuation;
|
||||
import kotlin.coroutines.jvm.internal.DebugMetadata;
|
||||
import kotlin.coroutines.jvm.internal.SuspendLambda;
|
||||
import kotlin.jvm.functions.Function2;
|
||||
import kotlin.jvm.functions.Function3;
|
||||
|
||||
/* JADX INFO: Add missing generic type declarations: [E] */
|
||||
/* compiled from: Deprecated.kt */
|
||||
@Metadata(d1 = {"\u0000\f\n\u0000\n\u0002\u0018\u0002\n\u0002\u0010\u0002\n\u0000\u0010\u0003\u001a\u00020\u0002\"\u0004\b\u0000\u0010\u0000*\b\u0012\u0004\u0012\u00028\u00000\u0001H\u008a@"}, d2 = {"E", "Lkotlinx/coroutines/channels/ProducerScope;", "", "<anonymous>"}, k = 3, mv = {1, 8, 0})
|
||||
@DebugMetadata(c = "kotlinx.coroutines.channels.ChannelsKt__DeprecatedKt$filterIndexed$1", f = "Deprecated.kt", i = {0, 0, 1, 1, 1, 2, 2}, l = {211, 212, 212}, m = "invokeSuspend", n = {"$this$produce", "index", "$this$produce", "e", "index", "$this$produce", "index"}, s = {"L$0", "I$0", "L$0", "L$2", "I$0", "L$0", "I$0"})
|
||||
/* loaded from: classes.dex */
|
||||
final class ChannelsKt__DeprecatedKt$filterIndexed$1<E> extends SuspendLambda implements Function2<ProducerScope<? super E>, Continuation<? super Unit>, Object> {
|
||||
final /* synthetic */ Function3<Integer, E, Continuation<? super Boolean>, Object> $predicate;
|
||||
final /* synthetic */ ReceiveChannel<E> $this_filterIndexed;
|
||||
int I$0;
|
||||
private /* synthetic */ Object L$0;
|
||||
Object L$1;
|
||||
Object L$2;
|
||||
int label;
|
||||
|
||||
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
||||
/* JADX WARN: Multi-variable type inference failed */
|
||||
ChannelsKt__DeprecatedKt$filterIndexed$1(ReceiveChannel<? extends E> receiveChannel, Function3<? super Integer, ? super E, ? super Continuation<? super Boolean>, ? extends Object> function3, Continuation<? super ChannelsKt__DeprecatedKt$filterIndexed$1> continuation) {
|
||||
super(2, continuation);
|
||||
this.$this_filterIndexed = receiveChannel;
|
||||
this.$predicate = function3;
|
||||
}
|
||||
|
||||
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
||||
public final Continuation<Unit> create(Object obj, Continuation<?> continuation) {
|
||||
ChannelsKt__DeprecatedKt$filterIndexed$1 channelsKt__DeprecatedKt$filterIndexed$1 = new ChannelsKt__DeprecatedKt$filterIndexed$1(this.$this_filterIndexed, this.$predicate, continuation);
|
||||
channelsKt__DeprecatedKt$filterIndexed$1.L$0 = obj;
|
||||
return channelsKt__DeprecatedKt$filterIndexed$1;
|
||||
}
|
||||
|
||||
@Override // kotlin.jvm.functions.Function2
|
||||
public final Object invoke(ProducerScope<? super E> producerScope, Continuation<? super Unit> continuation) {
|
||||
return ((ChannelsKt__DeprecatedKt$filterIndexed$1) create(producerScope, continuation)).invokeSuspend(Unit.INSTANCE);
|
||||
}
|
||||
|
||||
/* JADX WARN: Code restructure failed: missing block: B:26:0x0064, code lost:
|
||||
|
||||
r13 = r0;
|
||||
r0 = r1;
|
||||
r7 = r8;
|
||||
r1 = r10;
|
||||
*/
|
||||
/* JADX WARN: Multi-variable type inference failed */
|
||||
/* JADX WARN: Removed duplicated region for block: B:10:0x0077 A[RETURN] */
|
||||
/* JADX WARN: Removed duplicated region for block: B:12:0x0078 */
|
||||
/* JADX WARN: Removed duplicated region for block: B:15:0x0087 */
|
||||
/* JADX WARN: Removed duplicated region for block: B:22:0x00b0 */
|
||||
/* JADX WARN: Removed duplicated region for block: B:27:0x00c9 */
|
||||
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
||||
/*
|
||||
Code decompiled incorrectly, please refer to instructions dump.
|
||||
To view partially-correct add '--show-bad-code' argument
|
||||
*/
|
||||
public final java.lang.Object invokeSuspend(java.lang.Object r13) {
|
||||
/*
|
||||
Method dump skipped, instructions count: 204
|
||||
To view this dump add '--comments-level debug' option
|
||||
*/
|
||||
throw new UnsupportedOperationException("Method not decompiled: kotlinx.coroutines.channels.ChannelsKt__DeprecatedKt$filterIndexed$1.invokeSuspend(java.lang.Object):java.lang.Object");
|
||||
}
|
||||
}
|
@ -0,0 +1,69 @@
|
||||
package kotlinx.coroutines.channels;
|
||||
|
||||
import kotlin.Metadata;
|
||||
import kotlin.ResultKt;
|
||||
import kotlin.Unit;
|
||||
import kotlin.coroutines.Continuation;
|
||||
import kotlin.coroutines.intrinsics.IntrinsicsKt;
|
||||
import kotlin.coroutines.jvm.internal.Boxing;
|
||||
import kotlin.coroutines.jvm.internal.DebugMetadata;
|
||||
import kotlin.coroutines.jvm.internal.SuspendLambda;
|
||||
import kotlin.jvm.functions.Function2;
|
||||
|
||||
/* JADX INFO: Add missing generic type declarations: [E] */
|
||||
/* compiled from: Deprecated.kt */
|
||||
@Metadata(d1 = {"\u0000\n\n\u0002\b\u0002\n\u0002\u0010\u000b\n\u0000\u0010\u0003\u001a\u00020\u0002\"\u0004\b\u0000\u0010\u00002\u0006\u0010\u0001\u001a\u00028\u0000H\u008a@"}, d2 = {"E", "it", "", "<anonymous>"}, k = 3, mv = {1, 8, 0})
|
||||
@DebugMetadata(c = "kotlinx.coroutines.channels.ChannelsKt__DeprecatedKt$filterNot$1", f = "Deprecated.kt", i = {}, l = {222}, m = "invokeSuspend", n = {}, s = {})
|
||||
/* loaded from: classes.dex */
|
||||
final class ChannelsKt__DeprecatedKt$filterNot$1<E> extends SuspendLambda implements Function2<E, Continuation<? super Boolean>, Object> {
|
||||
final /* synthetic */ Function2<E, Continuation<? super Boolean>, Object> $predicate;
|
||||
/* synthetic */ Object L$0;
|
||||
int label;
|
||||
|
||||
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
||||
/* JADX WARN: Multi-variable type inference failed */
|
||||
ChannelsKt__DeprecatedKt$filterNot$1(Function2<? super E, ? super Continuation<? super Boolean>, ? extends Object> function2, Continuation<? super ChannelsKt__DeprecatedKt$filterNot$1> continuation) {
|
||||
super(2, continuation);
|
||||
this.$predicate = function2;
|
||||
}
|
||||
|
||||
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
||||
public final Continuation<Unit> create(Object obj, Continuation<?> continuation) {
|
||||
ChannelsKt__DeprecatedKt$filterNot$1 channelsKt__DeprecatedKt$filterNot$1 = new ChannelsKt__DeprecatedKt$filterNot$1(this.$predicate, continuation);
|
||||
channelsKt__DeprecatedKt$filterNot$1.L$0 = obj;
|
||||
return channelsKt__DeprecatedKt$filterNot$1;
|
||||
}
|
||||
|
||||
/* JADX WARN: Multi-variable type inference failed */
|
||||
@Override // kotlin.jvm.functions.Function2
|
||||
public /* bridge */ /* synthetic */ Object invoke(Object obj, Continuation<? super Boolean> continuation) {
|
||||
return invoke2((ChannelsKt__DeprecatedKt$filterNot$1<E>) obj, continuation);
|
||||
}
|
||||
|
||||
/* renamed from: invoke, reason: avoid collision after fix types in other method */
|
||||
public final Object invoke2(E e, Continuation<? super Boolean> continuation) {
|
||||
return ((ChannelsKt__DeprecatedKt$filterNot$1) create(e, continuation)).invokeSuspend(Unit.INSTANCE);
|
||||
}
|
||||
|
||||
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
||||
public final Object invokeSuspend(Object obj) {
|
||||
Object coroutine_suspended = IntrinsicsKt.getCOROUTINE_SUSPENDED();
|
||||
int i = this.label;
|
||||
if (i == 0) {
|
||||
ResultKt.throwOnFailure(obj);
|
||||
Object obj2 = this.L$0;
|
||||
Function2<E, Continuation<? super Boolean>, Object> function2 = this.$predicate;
|
||||
this.label = 1;
|
||||
obj = function2.invoke(obj2, this);
|
||||
if (obj == coroutine_suspended) {
|
||||
return coroutine_suspended;
|
||||
}
|
||||
} else {
|
||||
if (i != 1) {
|
||||
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
|
||||
}
|
||||
ResultKt.throwOnFailure(obj);
|
||||
}
|
||||
return Boxing.boxBoolean(!((Boolean) obj).booleanValue());
|
||||
}
|
||||
}
|
@ -0,0 +1,53 @@
|
||||
package kotlinx.coroutines.channels;
|
||||
|
||||
import kotlin.Metadata;
|
||||
import kotlin.ResultKt;
|
||||
import kotlin.Unit;
|
||||
import kotlin.coroutines.Continuation;
|
||||
import kotlin.coroutines.intrinsics.IntrinsicsKt;
|
||||
import kotlin.coroutines.jvm.internal.Boxing;
|
||||
import kotlin.coroutines.jvm.internal.DebugMetadata;
|
||||
import kotlin.coroutines.jvm.internal.SuspendLambda;
|
||||
import kotlin.jvm.functions.Function2;
|
||||
|
||||
/* JADX INFO: Add missing generic type declarations: [E] */
|
||||
/* compiled from: Deprecated.kt */
|
||||
@Metadata(d1 = {"\u0000\u000e\n\u0002\u0010\u0000\n\u0002\b\u0002\n\u0002\u0010\u000b\n\u0000\u0010\u0004\u001a\u00020\u0003\"\b\b\u0000\u0010\u0001*\u00020\u00002\b\u0010\u0002\u001a\u0004\u0018\u00018\u0000H\u008a@"}, d2 = {"", "E", "it", "", "<anonymous>"}, k = 3, mv = {1, 8, 0})
|
||||
@DebugMetadata(c = "kotlinx.coroutines.channels.ChannelsKt__DeprecatedKt$filterNotNull$1", f = "Deprecated.kt", i = {}, l = {}, m = "invokeSuspend", n = {}, s = {})
|
||||
/* loaded from: classes.dex */
|
||||
final class ChannelsKt__DeprecatedKt$filterNotNull$1<E> extends SuspendLambda implements Function2<E, Continuation<? super Boolean>, Object> {
|
||||
/* synthetic */ Object L$0;
|
||||
int label;
|
||||
|
||||
ChannelsKt__DeprecatedKt$filterNotNull$1(Continuation<? super ChannelsKt__DeprecatedKt$filterNotNull$1> continuation) {
|
||||
super(2, continuation);
|
||||
}
|
||||
|
||||
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
||||
public final Continuation<Unit> create(Object obj, Continuation<?> continuation) {
|
||||
ChannelsKt__DeprecatedKt$filterNotNull$1 channelsKt__DeprecatedKt$filterNotNull$1 = new ChannelsKt__DeprecatedKt$filterNotNull$1(continuation);
|
||||
channelsKt__DeprecatedKt$filterNotNull$1.L$0 = obj;
|
||||
return channelsKt__DeprecatedKt$filterNotNull$1;
|
||||
}
|
||||
|
||||
/* JADX WARN: Multi-variable type inference failed */
|
||||
@Override // kotlin.jvm.functions.Function2
|
||||
public /* bridge */ /* synthetic */ Object invoke(Object obj, Continuation<? super Boolean> continuation) {
|
||||
return invoke2((ChannelsKt__DeprecatedKt$filterNotNull$1<E>) obj, continuation);
|
||||
}
|
||||
|
||||
/* renamed from: invoke, reason: avoid collision after fix types in other method */
|
||||
public final Object invoke2(E e, Continuation<? super Boolean> continuation) {
|
||||
return ((ChannelsKt__DeprecatedKt$filterNotNull$1) create(e, continuation)).invokeSuspend(Unit.INSTANCE);
|
||||
}
|
||||
|
||||
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
||||
public final Object invokeSuspend(Object obj) {
|
||||
IntrinsicsKt.getCOROUTINE_SUSPENDED();
|
||||
if (this.label != 0) {
|
||||
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
|
||||
}
|
||||
ResultKt.throwOnFailure(obj);
|
||||
return Boxing.boxBoolean(this.L$0 != null);
|
||||
}
|
||||
}
|
@ -0,0 +1,32 @@
|
||||
package kotlinx.coroutines.channels;
|
||||
|
||||
import java.util.Collection;
|
||||
import kotlin.Metadata;
|
||||
import kotlin.coroutines.Continuation;
|
||||
import kotlin.coroutines.jvm.internal.ContinuationImpl;
|
||||
import kotlin.coroutines.jvm.internal.DebugMetadata;
|
||||
|
||||
/* compiled from: Deprecated.kt */
|
||||
@Metadata(k = 3, mv = {1, 8, 0}, xi = 48)
|
||||
@DebugMetadata(c = "kotlinx.coroutines.channels.ChannelsKt__DeprecatedKt", f = "Deprecated.kt", i = {0, 0}, l = {487}, m = "filterNotNullTo", n = {"destination", "$this$consume$iv$iv"}, s = {"L$0", "L$1"})
|
||||
/* loaded from: classes.dex */
|
||||
final class ChannelsKt__DeprecatedKt$filterNotNullTo$1<E, C extends Collection<? super E>> extends ContinuationImpl {
|
||||
Object L$0;
|
||||
Object L$1;
|
||||
Object L$2;
|
||||
int label;
|
||||
/* synthetic */ Object result;
|
||||
|
||||
ChannelsKt__DeprecatedKt$filterNotNullTo$1(Continuation<? super ChannelsKt__DeprecatedKt$filterNotNullTo$1> continuation) {
|
||||
super(continuation);
|
||||
}
|
||||
|
||||
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
||||
public final Object invokeSuspend(Object obj) {
|
||||
Object filterNotNullTo;
|
||||
this.result = obj;
|
||||
this.label |= Integer.MIN_VALUE;
|
||||
filterNotNullTo = ChannelsKt__DeprecatedKt.filterNotNullTo((ReceiveChannel) null, (Collection) null, this);
|
||||
return filterNotNullTo;
|
||||
}
|
||||
}
|
@ -0,0 +1,32 @@
|
||||
package kotlinx.coroutines.channels;
|
||||
|
||||
import kotlin.Metadata;
|
||||
import kotlin.coroutines.Continuation;
|
||||
import kotlin.coroutines.jvm.internal.ContinuationImpl;
|
||||
import kotlin.coroutines.jvm.internal.DebugMetadata;
|
||||
import kotlinx.coroutines.channels.SendChannel;
|
||||
|
||||
/* compiled from: Deprecated.kt */
|
||||
@Metadata(k = 3, mv = {1, 8, 0}, xi = 48)
|
||||
@DebugMetadata(c = "kotlinx.coroutines.channels.ChannelsKt__DeprecatedKt", f = "Deprecated.kt", i = {0, 0, 1, 1}, l = {487, 242}, m = "filterNotNullTo", n = {"destination", "$this$consume$iv$iv", "destination", "$this$consume$iv$iv"}, s = {"L$0", "L$1", "L$0", "L$1"})
|
||||
/* loaded from: classes.dex */
|
||||
final class ChannelsKt__DeprecatedKt$filterNotNullTo$3<E, C extends SendChannel<? super E>> extends ContinuationImpl {
|
||||
Object L$0;
|
||||
Object L$1;
|
||||
Object L$2;
|
||||
int label;
|
||||
/* synthetic */ Object result;
|
||||
|
||||
ChannelsKt__DeprecatedKt$filterNotNullTo$3(Continuation<? super ChannelsKt__DeprecatedKt$filterNotNullTo$3> continuation) {
|
||||
super(continuation);
|
||||
}
|
||||
|
||||
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
||||
public final Object invokeSuspend(Object obj) {
|
||||
Object filterNotNullTo;
|
||||
this.result = obj;
|
||||
this.label |= Integer.MIN_VALUE;
|
||||
filterNotNullTo = ChannelsKt__DeprecatedKt.filterNotNullTo((ReceiveChannel) null, (SendChannel) null, this);
|
||||
return filterNotNullTo;
|
||||
}
|
||||
}
|
@ -0,0 +1,30 @@
|
||||
package kotlinx.coroutines.channels;
|
||||
|
||||
import kotlin.Metadata;
|
||||
import kotlin.coroutines.Continuation;
|
||||
import kotlin.coroutines.jvm.internal.ContinuationImpl;
|
||||
import kotlin.coroutines.jvm.internal.DebugMetadata;
|
||||
|
||||
/* compiled from: Deprecated.kt */
|
||||
@Metadata(k = 3, mv = {1, 8, 0}, xi = 48)
|
||||
@DebugMetadata(c = "kotlinx.coroutines.channels.ChannelsKt__DeprecatedKt", f = "Deprecated.kt", i = {0, 0}, l = {65}, m = "first", n = {"$this$consume$iv", "iterator"}, s = {"L$0", "L$1"})
|
||||
/* loaded from: classes.dex */
|
||||
final class ChannelsKt__DeprecatedKt$first$1<E> extends ContinuationImpl {
|
||||
Object L$0;
|
||||
Object L$1;
|
||||
int label;
|
||||
/* synthetic */ Object result;
|
||||
|
||||
ChannelsKt__DeprecatedKt$first$1(Continuation<? super ChannelsKt__DeprecatedKt$first$1> continuation) {
|
||||
super(continuation);
|
||||
}
|
||||
|
||||
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
||||
public final Object invokeSuspend(Object obj) {
|
||||
Object first;
|
||||
this.result = obj;
|
||||
this.label |= Integer.MIN_VALUE;
|
||||
first = ChannelsKt__DeprecatedKt.first(null, this);
|
||||
return first;
|
||||
}
|
||||
}
|
@ -0,0 +1,30 @@
|
||||
package kotlinx.coroutines.channels;
|
||||
|
||||
import kotlin.Metadata;
|
||||
import kotlin.coroutines.Continuation;
|
||||
import kotlin.coroutines.jvm.internal.ContinuationImpl;
|
||||
import kotlin.coroutines.jvm.internal.DebugMetadata;
|
||||
|
||||
/* compiled from: Deprecated.kt */
|
||||
@Metadata(k = 3, mv = {1, 8, 0}, xi = 48)
|
||||
@DebugMetadata(c = "kotlinx.coroutines.channels.ChannelsKt__DeprecatedKt", f = "Deprecated.kt", i = {0, 0}, l = {75}, m = "firstOrNull", n = {"$this$consume$iv", "iterator"}, s = {"L$0", "L$1"})
|
||||
/* loaded from: classes.dex */
|
||||
final class ChannelsKt__DeprecatedKt$firstOrNull$1<E> extends ContinuationImpl {
|
||||
Object L$0;
|
||||
Object L$1;
|
||||
int label;
|
||||
/* synthetic */ Object result;
|
||||
|
||||
ChannelsKt__DeprecatedKt$firstOrNull$1(Continuation<? super ChannelsKt__DeprecatedKt$firstOrNull$1> continuation) {
|
||||
super(continuation);
|
||||
}
|
||||
|
||||
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
||||
public final Object invokeSuspend(Object obj) {
|
||||
Object firstOrNull;
|
||||
this.result = obj;
|
||||
this.label |= Integer.MIN_VALUE;
|
||||
firstOrNull = ChannelsKt__DeprecatedKt.firstOrNull(null, this);
|
||||
return firstOrNull;
|
||||
}
|
||||
}
|
@ -0,0 +1,160 @@
|
||||
package kotlinx.coroutines.channels;
|
||||
|
||||
import kotlin.Metadata;
|
||||
import kotlin.Unit;
|
||||
import kotlin.coroutines.Continuation;
|
||||
import kotlin.coroutines.jvm.internal.DebugMetadata;
|
||||
import kotlin.coroutines.jvm.internal.SuspendLambda;
|
||||
import kotlin.jvm.functions.Function2;
|
||||
|
||||
/* JADX INFO: Add missing generic type declarations: [R] */
|
||||
/* compiled from: Deprecated.kt */
|
||||
@Metadata(d1 = {"\u0000\u000e\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\u0010\u0002\n\u0000\u0010\u0004\u001a\u00020\u0003\"\u0004\b\u0000\u0010\u0000\"\u0004\b\u0001\u0010\u0001*\b\u0012\u0004\u0012\u00028\u00010\u0002H\u008a@"}, d2 = {"E", "R", "Lkotlinx/coroutines/channels/ProducerScope;", "", "<anonymous>"}, k = 3, mv = {1, 8, 0})
|
||||
@DebugMetadata(c = "kotlinx.coroutines.channels.ChannelsKt__DeprecatedKt$flatMap$1", f = "Deprecated.kt", i = {0, 1, 2}, l = {321, 322, 322}, m = "invokeSuspend", n = {"$this$produce", "$this$produce", "$this$produce"}, s = {"L$0", "L$0", "L$0"})
|
||||
/* loaded from: classes.dex */
|
||||
final class ChannelsKt__DeprecatedKt$flatMap$1<R> extends SuspendLambda implements Function2<ProducerScope<? super R>, Continuation<? super Unit>, Object> {
|
||||
final /* synthetic */ ReceiveChannel<E> $this_flatMap;
|
||||
final /* synthetic */ Function2<E, Continuation<? super ReceiveChannel<? extends R>>, Object> $transform;
|
||||
private /* synthetic */ Object L$0;
|
||||
Object L$1;
|
||||
int label;
|
||||
|
||||
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
||||
/* JADX WARN: Multi-variable type inference failed */
|
||||
ChannelsKt__DeprecatedKt$flatMap$1(ReceiveChannel<? extends E> receiveChannel, Function2<? super E, ? super Continuation<? super ReceiveChannel<? extends R>>, ? extends Object> function2, Continuation<? super ChannelsKt__DeprecatedKt$flatMap$1> continuation) {
|
||||
super(2, continuation);
|
||||
this.$this_flatMap = receiveChannel;
|
||||
this.$transform = function2;
|
||||
}
|
||||
|
||||
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
||||
public final Continuation<Unit> create(Object obj, Continuation<?> continuation) {
|
||||
ChannelsKt__DeprecatedKt$flatMap$1 channelsKt__DeprecatedKt$flatMap$1 = new ChannelsKt__DeprecatedKt$flatMap$1(this.$this_flatMap, this.$transform, continuation);
|
||||
channelsKt__DeprecatedKt$flatMap$1.L$0 = obj;
|
||||
return channelsKt__DeprecatedKt$flatMap$1;
|
||||
}
|
||||
|
||||
@Override // kotlin.jvm.functions.Function2
|
||||
public final Object invoke(ProducerScope<? super R> producerScope, Continuation<? super Unit> continuation) {
|
||||
return ((ChannelsKt__DeprecatedKt$flatMap$1) create(producerScope, continuation)).invokeSuspend(Unit.INSTANCE);
|
||||
}
|
||||
|
||||
/* JADX WARN: Removed duplicated region for block: B:10:0x0063 A[RETURN] */
|
||||
/* JADX WARN: Removed duplicated region for block: B:12:0x0064 */
|
||||
/* JADX WARN: Removed duplicated region for block: B:15:0x0072 */
|
||||
/* JADX WARN: Removed duplicated region for block: B:20:0x0099 A[RETURN] */
|
||||
/* JADX WARN: Removed duplicated region for block: B:21:0x009a */
|
||||
/* JADX WARN: Removed duplicated region for block: B:22:0x009f */
|
||||
/* JADX WARN: Unsupported multi-entry loop pattern (BACK_EDGE: B:21:0x009a -> B:8:0x0054). Please report as a decompilation issue!!! */
|
||||
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
||||
/*
|
||||
Code decompiled incorrectly, please refer to instructions dump.
|
||||
To view partially-correct add '--show-bad-code' argument
|
||||
*/
|
||||
public final java.lang.Object invokeSuspend(java.lang.Object r11) {
|
||||
/*
|
||||
r10 = this;
|
||||
java.lang.Object r0 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED()
|
||||
int r1 = r10.label
|
||||
r2 = 3
|
||||
r3 = 2
|
||||
r4 = 1
|
||||
if (r1 == 0) goto L45
|
||||
if (r1 == r4) goto L35
|
||||
if (r1 == r3) goto L25
|
||||
if (r1 != r2) goto L1d
|
||||
java.lang.Object r1 = r10.L$1
|
||||
kotlinx.coroutines.channels.ChannelIterator r1 = (kotlinx.coroutines.channels.ChannelIterator) r1
|
||||
java.lang.Object r5 = r10.L$0
|
||||
kotlinx.coroutines.channels.ProducerScope r5 = (kotlinx.coroutines.channels.ProducerScope) r5
|
||||
kotlin.ResultKt.throwOnFailure(r11)
|
||||
goto L53
|
||||
L1d:
|
||||
java.lang.IllegalStateException r11 = new java.lang.IllegalStateException
|
||||
java.lang.String r0 = "call to 'resume' before 'invoke' with coroutine"
|
||||
r11.<init>(r0)
|
||||
throw r11
|
||||
L25:
|
||||
java.lang.Object r1 = r10.L$1
|
||||
kotlinx.coroutines.channels.ChannelIterator r1 = (kotlinx.coroutines.channels.ChannelIterator) r1
|
||||
java.lang.Object r5 = r10.L$0
|
||||
kotlinx.coroutines.channels.ProducerScope r5 = (kotlinx.coroutines.channels.ProducerScope) r5
|
||||
kotlin.ResultKt.throwOnFailure(r11)
|
||||
r6 = r5
|
||||
r5 = r1
|
||||
r1 = r0
|
||||
r0 = r10
|
||||
goto L85
|
||||
L35:
|
||||
java.lang.Object r1 = r10.L$1
|
||||
kotlinx.coroutines.channels.ChannelIterator r1 = (kotlinx.coroutines.channels.ChannelIterator) r1
|
||||
java.lang.Object r5 = r10.L$0
|
||||
kotlinx.coroutines.channels.ProducerScope r5 = (kotlinx.coroutines.channels.ProducerScope) r5
|
||||
kotlin.ResultKt.throwOnFailure(r11)
|
||||
r6 = r5
|
||||
r5 = r1
|
||||
r1 = r0
|
||||
r0 = r10
|
||||
goto L6a
|
||||
L45:
|
||||
kotlin.ResultKt.throwOnFailure(r11)
|
||||
java.lang.Object r11 = r10.L$0
|
||||
kotlinx.coroutines.channels.ProducerScope r11 = (kotlinx.coroutines.channels.ProducerScope) r11
|
||||
kotlinx.coroutines.channels.ReceiveChannel<E> r1 = r10.$this_flatMap
|
||||
kotlinx.coroutines.channels.ChannelIterator r1 = r1.iterator()
|
||||
r5 = r11
|
||||
L53:
|
||||
r11 = r10
|
||||
L54:
|
||||
r6 = r11
|
||||
kotlin.coroutines.Continuation r6 = (kotlin.coroutines.Continuation) r6
|
||||
r11.L$0 = r5
|
||||
r11.L$1 = r1
|
||||
r11.label = r4
|
||||
java.lang.Object r6 = r1.hasNext(r6)
|
||||
if (r6 != r0) goto L64
|
||||
return r0
|
||||
L64:
|
||||
r9 = r0
|
||||
r0 = r11
|
||||
r11 = r6
|
||||
r6 = r5
|
||||
r5 = r1
|
||||
r1 = r9
|
||||
L6a:
|
||||
java.lang.Boolean r11 = (java.lang.Boolean) r11
|
||||
boolean r11 = r11.booleanValue()
|
||||
if (r11 == 0) goto L9f
|
||||
java.lang.Object r11 = r5.next()
|
||||
kotlin.jvm.functions.Function2<E, kotlin.coroutines.Continuation<? super kotlinx.coroutines.channels.ReceiveChannel<? extends R>>, java.lang.Object> r7 = r0.$transform
|
||||
r0.L$0 = r6
|
||||
r0.L$1 = r5
|
||||
r0.label = r3
|
||||
java.lang.Object r11 = r7.invoke(r11, r0)
|
||||
if (r11 != r1) goto L85
|
||||
return r1
|
||||
L85:
|
||||
kotlinx.coroutines.channels.ReceiveChannel r11 = (kotlinx.coroutines.channels.ReceiveChannel) r11
|
||||
r7 = r6
|
||||
kotlinx.coroutines.channels.SendChannel r7 = (kotlinx.coroutines.channels.SendChannel) r7
|
||||
r8 = r0
|
||||
kotlin.coroutines.Continuation r8 = (kotlin.coroutines.Continuation) r8
|
||||
r0.L$0 = r6
|
||||
r0.L$1 = r5
|
||||
r0.label = r2
|
||||
java.lang.Object r11 = kotlinx.coroutines.channels.ChannelsKt.toChannel(r11, r7, r8)
|
||||
if (r11 != r1) goto L9a
|
||||
return r1
|
||||
L9a:
|
||||
r11 = r0
|
||||
r0 = r1
|
||||
r1 = r5
|
||||
r5 = r6
|
||||
goto L54
|
||||
L9f:
|
||||
kotlin.Unit r11 = kotlin.Unit.INSTANCE
|
||||
return r11
|
||||
*/
|
||||
throw new UnsupportedOperationException("Method not decompiled: kotlinx.coroutines.channels.ChannelsKt__DeprecatedKt$flatMap$1.invokeSuspend(java.lang.Object):java.lang.Object");
|
||||
}
|
||||
}
|
@ -0,0 +1,32 @@
|
||||
package kotlinx.coroutines.channels;
|
||||
|
||||
import kotlin.Metadata;
|
||||
import kotlin.coroutines.Continuation;
|
||||
import kotlin.coroutines.jvm.internal.ContinuationImpl;
|
||||
import kotlin.coroutines.jvm.internal.DebugMetadata;
|
||||
|
||||
/* compiled from: Deprecated.kt */
|
||||
@Metadata(k = 3, mv = {1, 8, 0}, xi = 48)
|
||||
@DebugMetadata(c = "kotlinx.coroutines.channels.ChannelsKt__DeprecatedKt", f = "Deprecated.kt", i = {0, 0, 0}, l = {487}, m = "indexOf", n = {"element", "index", "$this$consume$iv$iv"}, s = {"L$0", "L$1", "L$2"})
|
||||
/* loaded from: classes.dex */
|
||||
final class ChannelsKt__DeprecatedKt$indexOf$1<E> extends ContinuationImpl {
|
||||
Object L$0;
|
||||
Object L$1;
|
||||
Object L$2;
|
||||
Object L$3;
|
||||
int label;
|
||||
/* synthetic */ Object result;
|
||||
|
||||
ChannelsKt__DeprecatedKt$indexOf$1(Continuation<? super ChannelsKt__DeprecatedKt$indexOf$1> continuation) {
|
||||
super(continuation);
|
||||
}
|
||||
|
||||
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
||||
public final Object invokeSuspend(Object obj) {
|
||||
Object indexOf;
|
||||
this.result = obj;
|
||||
this.label |= Integer.MIN_VALUE;
|
||||
indexOf = ChannelsKt__DeprecatedKt.indexOf(null, null, this);
|
||||
return indexOf;
|
||||
}
|
||||
}
|
@ -0,0 +1,31 @@
|
||||
package kotlinx.coroutines.channels;
|
||||
|
||||
import kotlin.Metadata;
|
||||
import kotlin.coroutines.Continuation;
|
||||
import kotlin.coroutines.jvm.internal.ContinuationImpl;
|
||||
import kotlin.coroutines.jvm.internal.DebugMetadata;
|
||||
|
||||
/* compiled from: Deprecated.kt */
|
||||
@Metadata(k = 3, mv = {1, 8, 0}, xi = 48)
|
||||
@DebugMetadata(c = "kotlinx.coroutines.channels.ChannelsKt__DeprecatedKt", f = "Deprecated.kt", i = {0, 0, 1, 1, 1}, l = {97, 100}, m = "last", n = {"$this$consume$iv", "iterator", "$this$consume$iv", "iterator", "last"}, s = {"L$0", "L$1", "L$0", "L$1", "L$2"})
|
||||
/* loaded from: classes.dex */
|
||||
final class ChannelsKt__DeprecatedKt$last$1<E> extends ContinuationImpl {
|
||||
Object L$0;
|
||||
Object L$1;
|
||||
Object L$2;
|
||||
int label;
|
||||
/* synthetic */ Object result;
|
||||
|
||||
ChannelsKt__DeprecatedKt$last$1(Continuation<? super ChannelsKt__DeprecatedKt$last$1> continuation) {
|
||||
super(continuation);
|
||||
}
|
||||
|
||||
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
||||
public final Object invokeSuspend(Object obj) {
|
||||
Object last;
|
||||
this.result = obj;
|
||||
this.label |= Integer.MIN_VALUE;
|
||||
last = ChannelsKt__DeprecatedKt.last(null, this);
|
||||
return last;
|
||||
}
|
||||
}
|
@ -0,0 +1,33 @@
|
||||
package kotlinx.coroutines.channels;
|
||||
|
||||
import kotlin.Metadata;
|
||||
import kotlin.coroutines.Continuation;
|
||||
import kotlin.coroutines.jvm.internal.ContinuationImpl;
|
||||
import kotlin.coroutines.jvm.internal.DebugMetadata;
|
||||
|
||||
/* compiled from: Deprecated.kt */
|
||||
@Metadata(k = 3, mv = {1, 8, 0}, xi = 48)
|
||||
@DebugMetadata(c = "kotlinx.coroutines.channels.ChannelsKt__DeprecatedKt", f = "Deprecated.kt", i = {0, 0, 0, 0}, l = {487}, m = "lastIndexOf", n = {"element", "lastIndex", "index", "$this$consume$iv$iv"}, s = {"L$0", "L$1", "L$2", "L$3"})
|
||||
/* loaded from: classes.dex */
|
||||
final class ChannelsKt__DeprecatedKt$lastIndexOf$1<E> extends ContinuationImpl {
|
||||
Object L$0;
|
||||
Object L$1;
|
||||
Object L$2;
|
||||
Object L$3;
|
||||
Object L$4;
|
||||
int label;
|
||||
/* synthetic */ Object result;
|
||||
|
||||
ChannelsKt__DeprecatedKt$lastIndexOf$1(Continuation<? super ChannelsKt__DeprecatedKt$lastIndexOf$1> continuation) {
|
||||
super(continuation);
|
||||
}
|
||||
|
||||
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
||||
public final Object invokeSuspend(Object obj) {
|
||||
Object lastIndexOf;
|
||||
this.result = obj;
|
||||
this.label |= Integer.MIN_VALUE;
|
||||
lastIndexOf = ChannelsKt__DeprecatedKt.lastIndexOf(null, null, this);
|
||||
return lastIndexOf;
|
||||
}
|
||||
}
|
@ -0,0 +1,31 @@
|
||||
package kotlinx.coroutines.channels;
|
||||
|
||||
import kotlin.Metadata;
|
||||
import kotlin.coroutines.Continuation;
|
||||
import kotlin.coroutines.jvm.internal.ContinuationImpl;
|
||||
import kotlin.coroutines.jvm.internal.DebugMetadata;
|
||||
|
||||
/* compiled from: Deprecated.kt */
|
||||
@Metadata(k = 3, mv = {1, 8, 0}, xi = 48)
|
||||
@DebugMetadata(c = "kotlinx.coroutines.channels.ChannelsKt__DeprecatedKt", f = "Deprecated.kt", i = {0, 0, 1, 1, 1}, l = {123, 126}, m = "lastOrNull", n = {"$this$consume$iv", "iterator", "$this$consume$iv", "iterator", "last"}, s = {"L$0", "L$1", "L$0", "L$1", "L$2"})
|
||||
/* loaded from: classes.dex */
|
||||
final class ChannelsKt__DeprecatedKt$lastOrNull$1<E> extends ContinuationImpl {
|
||||
Object L$0;
|
||||
Object L$1;
|
||||
Object L$2;
|
||||
int label;
|
||||
/* synthetic */ Object result;
|
||||
|
||||
ChannelsKt__DeprecatedKt$lastOrNull$1(Continuation<? super ChannelsKt__DeprecatedKt$lastOrNull$1> continuation) {
|
||||
super(continuation);
|
||||
}
|
||||
|
||||
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
||||
public final Object invokeSuspend(Object obj) {
|
||||
Object lastOrNull;
|
||||
this.result = obj;
|
||||
this.label |= Integer.MIN_VALUE;
|
||||
lastOrNull = ChannelsKt__DeprecatedKt.lastOrNull(null, this);
|
||||
return lastOrNull;
|
||||
}
|
||||
}
|
@ -0,0 +1,62 @@
|
||||
package kotlinx.coroutines.channels;
|
||||
|
||||
import kotlin.Metadata;
|
||||
import kotlin.Unit;
|
||||
import kotlin.coroutines.Continuation;
|
||||
import kotlin.coroutines.jvm.internal.DebugMetadata;
|
||||
import kotlin.coroutines.jvm.internal.SuspendLambda;
|
||||
import kotlin.jvm.functions.Function2;
|
||||
|
||||
/* JADX INFO: Add missing generic type declarations: [R] */
|
||||
/* compiled from: Deprecated.kt */
|
||||
@Metadata(d1 = {"\u0000\u000e\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\u0010\u0002\n\u0000\u0010\u0004\u001a\u00020\u0003\"\u0004\b\u0000\u0010\u0000\"\u0004\b\u0001\u0010\u0001*\b\u0012\u0004\u0012\u00028\u00010\u0002H\u008a@"}, d2 = {"E", "R", "Lkotlinx/coroutines/channels/ProducerScope;", "", "<anonymous>"}, k = 3, mv = {1, 8, 0})
|
||||
@DebugMetadata(c = "kotlinx.coroutines.channels.ChannelsKt__DeprecatedKt$map$1", f = "Deprecated.kt", i = {0, 0, 1, 1, 2, 2}, l = {487, 333, 333}, m = "invokeSuspend", n = {"$this$produce", "$this$consume$iv$iv", "$this$produce", "$this$consume$iv$iv", "$this$produce", "$this$consume$iv$iv"}, s = {"L$0", "L$2", "L$0", "L$2", "L$0", "L$2"})
|
||||
/* loaded from: classes.dex */
|
||||
final class ChannelsKt__DeprecatedKt$map$1<R> extends SuspendLambda implements Function2<ProducerScope<? super R>, Continuation<? super Unit>, Object> {
|
||||
final /* synthetic */ ReceiveChannel<E> $this_map;
|
||||
final /* synthetic */ Function2<E, Continuation<? super R>, Object> $transform;
|
||||
private /* synthetic */ Object L$0;
|
||||
Object L$1;
|
||||
Object L$2;
|
||||
Object L$3;
|
||||
Object L$4;
|
||||
int label;
|
||||
|
||||
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
||||
/* JADX WARN: Multi-variable type inference failed */
|
||||
ChannelsKt__DeprecatedKt$map$1(ReceiveChannel<? extends E> receiveChannel, Function2<? super E, ? super Continuation<? super R>, ? extends Object> function2, Continuation<? super ChannelsKt__DeprecatedKt$map$1> continuation) {
|
||||
super(2, continuation);
|
||||
this.$this_map = receiveChannel;
|
||||
this.$transform = function2;
|
||||
}
|
||||
|
||||
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
||||
public final Continuation<Unit> create(Object obj, Continuation<?> continuation) {
|
||||
ChannelsKt__DeprecatedKt$map$1 channelsKt__DeprecatedKt$map$1 = new ChannelsKt__DeprecatedKt$map$1(this.$this_map, this.$transform, continuation);
|
||||
channelsKt__DeprecatedKt$map$1.L$0 = obj;
|
||||
return channelsKt__DeprecatedKt$map$1;
|
||||
}
|
||||
|
||||
@Override // kotlin.jvm.functions.Function2
|
||||
public final Object invoke(ProducerScope<? super R> producerScope, Continuation<? super Unit> continuation) {
|
||||
return ((ChannelsKt__DeprecatedKt$map$1) create(producerScope, continuation)).invokeSuspend(Unit.INSTANCE);
|
||||
}
|
||||
|
||||
/* JADX WARN: Removed duplicated region for block: B:17:0x0093 A[Catch: all -> 0x00d1, TRY_LEAVE, TryCatch #0 {all -> 0x00d1, blocks: (B:8:0x0022, B:10:0x0076, B:15:0x008b, B:17:0x0093, B:34:0x00c9, B:45:0x005e, B:48:0x006e), top: B:2:0x000a }] */
|
||||
/* JADX WARN: Removed duplicated region for block: B:23:0x00c2 A[RETURN] */
|
||||
/* JADX WARN: Removed duplicated region for block: B:24:0x00c3 */
|
||||
/* JADX WARN: Removed duplicated region for block: B:34:0x00c9 A[Catch: all -> 0x00d1, TRY_ENTER, TRY_LEAVE, TryCatch #0 {all -> 0x00d1, blocks: (B:8:0x0022, B:10:0x0076, B:15:0x008b, B:17:0x0093, B:34:0x00c9, B:45:0x005e, B:48:0x006e), top: B:2:0x000a }] */
|
||||
/* JADX WARN: Unsupported multi-entry loop pattern (BACK_EDGE: B:24:0x00c3 -> B:10:0x0076). Please report as a decompilation issue!!! */
|
||||
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
||||
/*
|
||||
Code decompiled incorrectly, please refer to instructions dump.
|
||||
To view partially-correct add '--show-bad-code' argument
|
||||
*/
|
||||
public final java.lang.Object invokeSuspend(java.lang.Object r13) {
|
||||
/*
|
||||
Method dump skipped, instructions count: 216
|
||||
To view this dump add '--comments-level debug' option
|
||||
*/
|
||||
throw new UnsupportedOperationException("Method not decompiled: kotlinx.coroutines.channels.ChannelsKt__DeprecatedKt$map$1.invokeSuspend(java.lang.Object):java.lang.Object");
|
||||
}
|
||||
}
|
@ -0,0 +1,171 @@
|
||||
package kotlinx.coroutines.channels;
|
||||
|
||||
import kotlin.Metadata;
|
||||
import kotlin.Unit;
|
||||
import kotlin.coroutines.Continuation;
|
||||
import kotlin.coroutines.jvm.internal.DebugMetadata;
|
||||
import kotlin.coroutines.jvm.internal.SuspendLambda;
|
||||
import kotlin.jvm.functions.Function2;
|
||||
import kotlin.jvm.functions.Function3;
|
||||
|
||||
/* JADX INFO: Add missing generic type declarations: [R] */
|
||||
/* compiled from: Deprecated.kt */
|
||||
@Metadata(d1 = {"\u0000\u000e\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\u0010\u0002\n\u0000\u0010\u0004\u001a\u00020\u0003\"\u0004\b\u0000\u0010\u0000\"\u0004\b\u0001\u0010\u0001*\b\u0012\u0004\u0012\u00028\u00010\u0002H\u008a@"}, d2 = {"E", "R", "Lkotlinx/coroutines/channels/ProducerScope;", "", "<anonymous>"}, k = 3, mv = {1, 8, 0})
|
||||
@DebugMetadata(c = "kotlinx.coroutines.channels.ChannelsKt__DeprecatedKt$mapIndexed$1", f = "Deprecated.kt", i = {0, 0, 1, 1, 2, 2}, l = {344, 345, 345}, m = "invokeSuspend", n = {"$this$produce", "index", "$this$produce", "index", "$this$produce", "index"}, s = {"L$0", "I$0", "L$0", "I$0", "L$0", "I$0"})
|
||||
/* loaded from: classes.dex */
|
||||
final class ChannelsKt__DeprecatedKt$mapIndexed$1<R> extends SuspendLambda implements Function2<ProducerScope<? super R>, Continuation<? super Unit>, Object> {
|
||||
final /* synthetic */ ReceiveChannel<E> $this_mapIndexed;
|
||||
final /* synthetic */ Function3<Integer, E, Continuation<? super R>, Object> $transform;
|
||||
int I$0;
|
||||
private /* synthetic */ Object L$0;
|
||||
Object L$1;
|
||||
Object L$2;
|
||||
int label;
|
||||
|
||||
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
||||
/* JADX WARN: Multi-variable type inference failed */
|
||||
ChannelsKt__DeprecatedKt$mapIndexed$1(ReceiveChannel<? extends E> receiveChannel, Function3<? super Integer, ? super E, ? super Continuation<? super R>, ? extends Object> function3, Continuation<? super ChannelsKt__DeprecatedKt$mapIndexed$1> continuation) {
|
||||
super(2, continuation);
|
||||
this.$this_mapIndexed = receiveChannel;
|
||||
this.$transform = function3;
|
||||
}
|
||||
|
||||
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
||||
public final Continuation<Unit> create(Object obj, Continuation<?> continuation) {
|
||||
ChannelsKt__DeprecatedKt$mapIndexed$1 channelsKt__DeprecatedKt$mapIndexed$1 = new ChannelsKt__DeprecatedKt$mapIndexed$1(this.$this_mapIndexed, this.$transform, continuation);
|
||||
channelsKt__DeprecatedKt$mapIndexed$1.L$0 = obj;
|
||||
return channelsKt__DeprecatedKt$mapIndexed$1;
|
||||
}
|
||||
|
||||
@Override // kotlin.jvm.functions.Function2
|
||||
public final Object invoke(ProducerScope<? super R> producerScope, Continuation<? super Unit> continuation) {
|
||||
return ((ChannelsKt__DeprecatedKt$mapIndexed$1) create(producerScope, continuation)).invokeSuspend(Unit.INSTANCE);
|
||||
}
|
||||
|
||||
/* JADX WARN: Removed duplicated region for block: B:14:0x007b */
|
||||
/* JADX WARN: Removed duplicated region for block: B:20:0x00b1 A[RETURN] */
|
||||
/* JADX WARN: Removed duplicated region for block: B:21:0x00b2 */
|
||||
/* JADX WARN: Removed duplicated region for block: B:22:0x00b6 */
|
||||
/* JADX WARN: Unsupported multi-entry loop pattern (BACK_EDGE: B:21:0x00b2 -> B:7:0x005d). Please report as a decompilation issue!!! */
|
||||
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
||||
/*
|
||||
Code decompiled incorrectly, please refer to instructions dump.
|
||||
To view partially-correct add '--show-bad-code' argument
|
||||
*/
|
||||
public final java.lang.Object invokeSuspend(java.lang.Object r13) {
|
||||
/*
|
||||
r12 = this;
|
||||
java.lang.Object r0 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED()
|
||||
int r1 = r12.label
|
||||
r2 = 3
|
||||
r3 = 2
|
||||
r4 = 1
|
||||
if (r1 == 0) goto L4c
|
||||
if (r1 == r4) goto L3d
|
||||
if (r1 == r3) goto L29
|
||||
if (r1 != r2) goto L21
|
||||
int r1 = r12.I$0
|
||||
java.lang.Object r5 = r12.L$1
|
||||
kotlinx.coroutines.channels.ChannelIterator r5 = (kotlinx.coroutines.channels.ChannelIterator) r5
|
||||
java.lang.Object r6 = r12.L$0
|
||||
kotlinx.coroutines.channels.ProducerScope r6 = (kotlinx.coroutines.channels.ProducerScope) r6
|
||||
kotlin.ResultKt.throwOnFailure(r13)
|
||||
r13 = r6
|
||||
r6 = r12
|
||||
goto L5d
|
||||
L21:
|
||||
java.lang.IllegalStateException r13 = new java.lang.IllegalStateException
|
||||
java.lang.String r0 = "call to 'resume' before 'invoke' with coroutine"
|
||||
r13.<init>(r0)
|
||||
throw r13
|
||||
L29:
|
||||
int r1 = r12.I$0
|
||||
java.lang.Object r5 = r12.L$2
|
||||
kotlinx.coroutines.channels.ProducerScope r5 = (kotlinx.coroutines.channels.ProducerScope) r5
|
||||
java.lang.Object r6 = r12.L$1
|
||||
kotlinx.coroutines.channels.ChannelIterator r6 = (kotlinx.coroutines.channels.ChannelIterator) r6
|
||||
java.lang.Object r7 = r12.L$0
|
||||
kotlinx.coroutines.channels.ProducerScope r7 = (kotlinx.coroutines.channels.ProducerScope) r7
|
||||
kotlin.ResultKt.throwOnFailure(r13)
|
||||
r8 = r12
|
||||
goto L9d
|
||||
L3d:
|
||||
int r1 = r12.I$0
|
||||
java.lang.Object r5 = r12.L$1
|
||||
kotlinx.coroutines.channels.ChannelIterator r5 = (kotlinx.coroutines.channels.ChannelIterator) r5
|
||||
java.lang.Object r6 = r12.L$0
|
||||
kotlinx.coroutines.channels.ProducerScope r6 = (kotlinx.coroutines.channels.ProducerScope) r6
|
||||
kotlin.ResultKt.throwOnFailure(r13)
|
||||
r7 = r12
|
||||
goto L73
|
||||
L4c:
|
||||
kotlin.ResultKt.throwOnFailure(r13)
|
||||
java.lang.Object r13 = r12.L$0
|
||||
kotlinx.coroutines.channels.ProducerScope r13 = (kotlinx.coroutines.channels.ProducerScope) r13
|
||||
kotlinx.coroutines.channels.ReceiveChannel<E> r1 = r12.$this_mapIndexed
|
||||
kotlinx.coroutines.channels.ChannelIterator r1 = r1.iterator()
|
||||
r5 = 0
|
||||
r6 = r12
|
||||
r5 = r1
|
||||
r1 = 0
|
||||
L5d:
|
||||
r7 = r6
|
||||
kotlin.coroutines.Continuation r7 = (kotlin.coroutines.Continuation) r7
|
||||
r6.L$0 = r13
|
||||
r6.L$1 = r5
|
||||
r6.I$0 = r1
|
||||
r6.label = r4
|
||||
java.lang.Object r7 = r5.hasNext(r7)
|
||||
if (r7 != r0) goto L6f
|
||||
return r0
|
||||
L6f:
|
||||
r11 = r6
|
||||
r6 = r13
|
||||
r13 = r7
|
||||
r7 = r11
|
||||
L73:
|
||||
java.lang.Boolean r13 = (java.lang.Boolean) r13
|
||||
boolean r13 = r13.booleanValue()
|
||||
if (r13 == 0) goto Lb6
|
||||
java.lang.Object r13 = r5.next()
|
||||
kotlin.jvm.functions.Function3<java.lang.Integer, E, kotlin.coroutines.Continuation<? super R>, java.lang.Object> r8 = r7.$transform
|
||||
int r9 = r1 + 1
|
||||
java.lang.Integer r1 = kotlin.coroutines.jvm.internal.Boxing.boxInt(r1)
|
||||
r7.L$0 = r6
|
||||
r7.L$1 = r5
|
||||
r7.L$2 = r6
|
||||
r7.I$0 = r9
|
||||
r7.label = r3
|
||||
java.lang.Object r13 = r8.invoke(r1, r13, r7)
|
||||
if (r13 != r0) goto L98
|
||||
return r0
|
||||
L98:
|
||||
r8 = r7
|
||||
r1 = r9
|
||||
r7 = r6
|
||||
r6 = r5
|
||||
r5 = r7
|
||||
L9d:
|
||||
r9 = r8
|
||||
kotlin.coroutines.Continuation r9 = (kotlin.coroutines.Continuation) r9
|
||||
r8.L$0 = r7
|
||||
r8.L$1 = r6
|
||||
r10 = 0
|
||||
r8.L$2 = r10
|
||||
r8.I$0 = r1
|
||||
r8.label = r2
|
||||
java.lang.Object r13 = r5.send(r13, r9)
|
||||
if (r13 != r0) goto Lb2
|
||||
return r0
|
||||
Lb2:
|
||||
r5 = r6
|
||||
r13 = r7
|
||||
r6 = r8
|
||||
goto L5d
|
||||
Lb6:
|
||||
kotlin.Unit r13 = kotlin.Unit.INSTANCE
|
||||
return r13
|
||||
*/
|
||||
throw new UnsupportedOperationException("Method not decompiled: kotlinx.coroutines.channels.ChannelsKt__DeprecatedKt$mapIndexed$1.invokeSuspend(java.lang.Object):java.lang.Object");
|
||||
}
|
||||
}
|
@ -0,0 +1,33 @@
|
||||
package kotlinx.coroutines.channels;
|
||||
|
||||
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: Deprecated.kt */
|
||||
@Metadata(k = 3, mv = {1, 8, 0}, xi = 48)
|
||||
@DebugMetadata(c = "kotlinx.coroutines.channels.ChannelsKt__DeprecatedKt", f = "Deprecated.kt", i = {0, 0, 0, 1, 1, 1, 1}, l = {TypedValues.CycleType.TYPE_EASING, TypedValues.CycleType.TYPE_CUSTOM_WAVE_SHAPE}, m = "maxWith", n = {"comparator", "$this$consume$iv", "iterator", "comparator", "$this$consume$iv", "iterator", "max"}, s = {"L$0", "L$1", "L$2", "L$0", "L$1", "L$2", "L$3"})
|
||||
/* loaded from: classes.dex */
|
||||
final class ChannelsKt__DeprecatedKt$maxWith$1<E> extends ContinuationImpl {
|
||||
Object L$0;
|
||||
Object L$1;
|
||||
Object L$2;
|
||||
Object L$3;
|
||||
int label;
|
||||
/* synthetic */ Object result;
|
||||
|
||||
ChannelsKt__DeprecatedKt$maxWith$1(Continuation<? super ChannelsKt__DeprecatedKt$maxWith$1> continuation) {
|
||||
super(continuation);
|
||||
}
|
||||
|
||||
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
||||
public final Object invokeSuspend(Object obj) {
|
||||
Object maxWith;
|
||||
this.result = obj;
|
||||
this.label |= Integer.MIN_VALUE;
|
||||
maxWith = ChannelsKt__DeprecatedKt.maxWith(null, null, this);
|
||||
return maxWith;
|
||||
}
|
||||
}
|
@ -0,0 +1,32 @@
|
||||
package kotlinx.coroutines.channels;
|
||||
|
||||
import kotlin.Metadata;
|
||||
import kotlin.coroutines.Continuation;
|
||||
import kotlin.coroutines.jvm.internal.ContinuationImpl;
|
||||
import kotlin.coroutines.jvm.internal.DebugMetadata;
|
||||
|
||||
/* compiled from: Deprecated.kt */
|
||||
@Metadata(k = 3, mv = {1, 8, 0}, xi = 48)
|
||||
@DebugMetadata(c = "kotlinx.coroutines.channels.ChannelsKt__DeprecatedKt", f = "Deprecated.kt", i = {0, 0, 0, 1, 1, 1, 1}, l = {434, 436}, m = "minWith", n = {"comparator", "$this$consume$iv", "iterator", "comparator", "$this$consume$iv", "iterator", "min"}, s = {"L$0", "L$1", "L$2", "L$0", "L$1", "L$2", "L$3"})
|
||||
/* loaded from: classes.dex */
|
||||
final class ChannelsKt__DeprecatedKt$minWith$1<E> extends ContinuationImpl {
|
||||
Object L$0;
|
||||
Object L$1;
|
||||
Object L$2;
|
||||
Object L$3;
|
||||
int label;
|
||||
/* synthetic */ Object result;
|
||||
|
||||
ChannelsKt__DeprecatedKt$minWith$1(Continuation<? super ChannelsKt__DeprecatedKt$minWith$1> continuation) {
|
||||
super(continuation);
|
||||
}
|
||||
|
||||
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
||||
public final Object invokeSuspend(Object obj) {
|
||||
Object minWith;
|
||||
this.result = obj;
|
||||
this.label |= Integer.MIN_VALUE;
|
||||
minWith = ChannelsKt__DeprecatedKt.minWith(null, null, this);
|
||||
return minWith;
|
||||
}
|
||||
}
|
@ -0,0 +1,29 @@
|
||||
package kotlinx.coroutines.channels;
|
||||
|
||||
import kotlin.Metadata;
|
||||
import kotlin.coroutines.Continuation;
|
||||
import kotlin.coroutines.jvm.internal.ContinuationImpl;
|
||||
import kotlin.coroutines.jvm.internal.DebugMetadata;
|
||||
|
||||
/* compiled from: Deprecated.kt */
|
||||
@Metadata(k = 3, mv = {1, 8, 0}, xi = 48)
|
||||
@DebugMetadata(c = "kotlinx.coroutines.channels.ChannelsKt__DeprecatedKt", f = "Deprecated.kt", i = {0}, l = {447}, m = "none", n = {"$this$consume$iv"}, s = {"L$0"})
|
||||
/* loaded from: classes.dex */
|
||||
final class ChannelsKt__DeprecatedKt$none$1<E> extends ContinuationImpl {
|
||||
Object L$0;
|
||||
int label;
|
||||
/* synthetic */ Object result;
|
||||
|
||||
ChannelsKt__DeprecatedKt$none$1(Continuation<? super ChannelsKt__DeprecatedKt$none$1> continuation) {
|
||||
super(continuation);
|
||||
}
|
||||
|
||||
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
||||
public final Object invokeSuspend(Object obj) {
|
||||
Object none;
|
||||
this.result = obj;
|
||||
this.label |= Integer.MIN_VALUE;
|
||||
none = ChannelsKt__DeprecatedKt.none(null, this);
|
||||
return none;
|
||||
}
|
||||
}
|
@ -0,0 +1,59 @@
|
||||
package kotlinx.coroutines.channels;
|
||||
|
||||
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.SuspendLambda;
|
||||
import kotlin.jvm.functions.Function2;
|
||||
|
||||
/* JADX INFO: Add missing generic type declarations: [E] */
|
||||
/* compiled from: Deprecated.kt */
|
||||
@Metadata(d1 = {"\u0000\b\n\u0002\u0010\u0000\n\u0002\b\u0003\u0010\u0003\u001a\u00028\u0000\"\b\b\u0000\u0010\u0001*\u00020\u00002\b\u0010\u0002\u001a\u0004\u0018\u00018\u0000H\u008a@"}, d2 = {"", "E", "it", "<anonymous>"}, k = 3, mv = {1, 8, 0})
|
||||
@DebugMetadata(c = "kotlinx.coroutines.channels.ChannelsKt__DeprecatedKt$requireNoNulls$1", f = "Deprecated.kt", i = {}, l = {}, m = "invokeSuspend", n = {}, s = {})
|
||||
/* loaded from: classes.dex */
|
||||
final class ChannelsKt__DeprecatedKt$requireNoNulls$1<E> extends SuspendLambda implements Function2<E, Continuation<? super E>, Object> {
|
||||
final /* synthetic */ ReceiveChannel<E> $this_requireNoNulls;
|
||||
/* synthetic */ Object L$0;
|
||||
int label;
|
||||
|
||||
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
||||
/* JADX WARN: Multi-variable type inference failed */
|
||||
ChannelsKt__DeprecatedKt$requireNoNulls$1(ReceiveChannel<? extends E> receiveChannel, Continuation<? super ChannelsKt__DeprecatedKt$requireNoNulls$1> continuation) {
|
||||
super(2, continuation);
|
||||
this.$this_requireNoNulls = receiveChannel;
|
||||
}
|
||||
|
||||
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
||||
public final Continuation<Unit> create(Object obj, Continuation<?> continuation) {
|
||||
ChannelsKt__DeprecatedKt$requireNoNulls$1 channelsKt__DeprecatedKt$requireNoNulls$1 = new ChannelsKt__DeprecatedKt$requireNoNulls$1(this.$this_requireNoNulls, continuation);
|
||||
channelsKt__DeprecatedKt$requireNoNulls$1.L$0 = obj;
|
||||
return channelsKt__DeprecatedKt$requireNoNulls$1;
|
||||
}
|
||||
|
||||
/* JADX WARN: Multi-variable type inference failed */
|
||||
@Override // kotlin.jvm.functions.Function2
|
||||
public /* bridge */ /* synthetic */ Object invoke(Object obj, Object obj2) {
|
||||
return invoke((ChannelsKt__DeprecatedKt$requireNoNulls$1<E>) obj, (Continuation<? super ChannelsKt__DeprecatedKt$requireNoNulls$1<E>>) obj2);
|
||||
}
|
||||
|
||||
public final Object invoke(E e, Continuation<? super E> continuation) {
|
||||
return ((ChannelsKt__DeprecatedKt$requireNoNulls$1) create(e, continuation)).invokeSuspend(Unit.INSTANCE);
|
||||
}
|
||||
|
||||
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
||||
public final Object invokeSuspend(Object obj) {
|
||||
IntrinsicsKt.getCOROUTINE_SUSPENDED();
|
||||
if (this.label != 0) {
|
||||
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
|
||||
}
|
||||
ResultKt.throwOnFailure(obj);
|
||||
Object obj2 = this.L$0;
|
||||
if (obj2 != null) {
|
||||
return obj2;
|
||||
}
|
||||
throw new IllegalArgumentException("null element found in " + this.$this_requireNoNulls + '.');
|
||||
}
|
||||
}
|
@ -0,0 +1,30 @@
|
||||
package kotlinx.coroutines.channels;
|
||||
|
||||
import kotlin.Metadata;
|
||||
import kotlin.coroutines.Continuation;
|
||||
import kotlin.coroutines.jvm.internal.ContinuationImpl;
|
||||
import kotlin.coroutines.jvm.internal.DebugMetadata;
|
||||
|
||||
/* compiled from: Deprecated.kt */
|
||||
@Metadata(k = 3, mv = {1, 8, 0}, xi = 48)
|
||||
@DebugMetadata(c = "kotlinx.coroutines.channels.ChannelsKt__DeprecatedKt", f = "Deprecated.kt", i = {0, 0, 1, 1}, l = {136, 139}, m = "single", n = {"$this$consume$iv", "iterator", "$this$consume$iv", "single"}, s = {"L$0", "L$1", "L$0", "L$1"})
|
||||
/* loaded from: classes.dex */
|
||||
final class ChannelsKt__DeprecatedKt$single$1<E> extends ContinuationImpl {
|
||||
Object L$0;
|
||||
Object L$1;
|
||||
int label;
|
||||
/* synthetic */ Object result;
|
||||
|
||||
ChannelsKt__DeprecatedKt$single$1(Continuation<? super ChannelsKt__DeprecatedKt$single$1> continuation) {
|
||||
super(continuation);
|
||||
}
|
||||
|
||||
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
||||
public final Object invokeSuspend(Object obj) {
|
||||
Object single;
|
||||
this.result = obj;
|
||||
this.label |= Integer.MIN_VALUE;
|
||||
single = ChannelsKt__DeprecatedKt.single(null, this);
|
||||
return single;
|
||||
}
|
||||
}
|
@ -0,0 +1,30 @@
|
||||
package kotlinx.coroutines.channels;
|
||||
|
||||
import kotlin.Metadata;
|
||||
import kotlin.coroutines.Continuation;
|
||||
import kotlin.coroutines.jvm.internal.ContinuationImpl;
|
||||
import kotlin.coroutines.jvm.internal.DebugMetadata;
|
||||
|
||||
/* compiled from: Deprecated.kt */
|
||||
@Metadata(k = 3, mv = {1, 8, 0}, xi = 48)
|
||||
@DebugMetadata(c = "kotlinx.coroutines.channels.ChannelsKt__DeprecatedKt", f = "Deprecated.kt", i = {0, 0, 1, 1}, l = {149, 152}, m = "singleOrNull", n = {"$this$consume$iv", "iterator", "$this$consume$iv", "single"}, s = {"L$0", "L$1", "L$0", "L$1"})
|
||||
/* loaded from: classes.dex */
|
||||
final class ChannelsKt__DeprecatedKt$singleOrNull$1<E> extends ContinuationImpl {
|
||||
Object L$0;
|
||||
Object L$1;
|
||||
int label;
|
||||
/* synthetic */ Object result;
|
||||
|
||||
ChannelsKt__DeprecatedKt$singleOrNull$1(Continuation<? super ChannelsKt__DeprecatedKt$singleOrNull$1> continuation) {
|
||||
super(continuation);
|
||||
}
|
||||
|
||||
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
||||
public final Object invokeSuspend(Object obj) {
|
||||
Object singleOrNull;
|
||||
this.result = obj;
|
||||
this.label |= Integer.MIN_VALUE;
|
||||
singleOrNull = ChannelsKt__DeprecatedKt.singleOrNull(null, this);
|
||||
return singleOrNull;
|
||||
}
|
||||
}
|
@ -0,0 +1,161 @@
|
||||
package kotlinx.coroutines.channels;
|
||||
|
||||
import kotlin.Metadata;
|
||||
import kotlin.Unit;
|
||||
import kotlin.coroutines.Continuation;
|
||||
import kotlin.coroutines.jvm.internal.DebugMetadata;
|
||||
import kotlin.coroutines.jvm.internal.SuspendLambda;
|
||||
import kotlin.jvm.functions.Function2;
|
||||
|
||||
/* JADX INFO: Add missing generic type declarations: [E] */
|
||||
/* compiled from: Deprecated.kt */
|
||||
@Metadata(d1 = {"\u0000\f\n\u0000\n\u0002\u0018\u0002\n\u0002\u0010\u0002\n\u0000\u0010\u0003\u001a\u00020\u0002\"\u0004\b\u0000\u0010\u0000*\b\u0012\u0004\u0012\u00028\u00000\u0001H\u008a@"}, d2 = {"E", "Lkotlinx/coroutines/channels/ProducerScope;", "", "<anonymous>"}, k = 3, mv = {1, 8, 0})
|
||||
@DebugMetadata(c = "kotlinx.coroutines.channels.ChannelsKt__DeprecatedKt$take$1", f = "Deprecated.kt", i = {0, 0, 1, 1}, l = {254, 255}, m = "invokeSuspend", n = {"$this$produce", "remaining", "$this$produce", "remaining"}, s = {"L$0", "I$0", "L$0", "I$0"})
|
||||
/* loaded from: classes.dex */
|
||||
final class ChannelsKt__DeprecatedKt$take$1<E> extends SuspendLambda implements Function2<ProducerScope<? super E>, Continuation<? super Unit>, Object> {
|
||||
final /* synthetic */ int $n;
|
||||
final /* synthetic */ ReceiveChannel<E> $this_take;
|
||||
int I$0;
|
||||
private /* synthetic */ Object L$0;
|
||||
Object L$1;
|
||||
int label;
|
||||
|
||||
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
||||
/* JADX WARN: Multi-variable type inference failed */
|
||||
ChannelsKt__DeprecatedKt$take$1(int i, ReceiveChannel<? extends E> receiveChannel, Continuation<? super ChannelsKt__DeprecatedKt$take$1> continuation) {
|
||||
super(2, continuation);
|
||||
this.$n = i;
|
||||
this.$this_take = receiveChannel;
|
||||
}
|
||||
|
||||
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
||||
public final Continuation<Unit> create(Object obj, Continuation<?> continuation) {
|
||||
ChannelsKt__DeprecatedKt$take$1 channelsKt__DeprecatedKt$take$1 = new ChannelsKt__DeprecatedKt$take$1(this.$n, this.$this_take, continuation);
|
||||
channelsKt__DeprecatedKt$take$1.L$0 = obj;
|
||||
return channelsKt__DeprecatedKt$take$1;
|
||||
}
|
||||
|
||||
@Override // kotlin.jvm.functions.Function2
|
||||
public final Object invoke(ProducerScope<? super E> producerScope, Continuation<? super Unit> continuation) {
|
||||
return ((ChannelsKt__DeprecatedKt$take$1) create(producerScope, continuation)).invokeSuspend(Unit.INSTANCE);
|
||||
}
|
||||
|
||||
/* JADX WARN: Removed duplicated region for block: B:10:0x0063 A[RETURN] */
|
||||
/* JADX WARN: Removed duplicated region for block: B:12:0x0064 */
|
||||
/* JADX WARN: Removed duplicated region for block: B:15:0x0070 */
|
||||
/* JADX WARN: Removed duplicated region for block: B:19:0x008f */
|
||||
/* JADX WARN: Removed duplicated region for block: B:21:0x008c */
|
||||
/* JADX WARN: Unsupported multi-entry loop pattern (BACK_EDGE: B:18:0x0086 -> B:6:0x0088). Please report as a decompilation issue!!! */
|
||||
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
||||
/*
|
||||
Code decompiled incorrectly, please refer to instructions dump.
|
||||
To view partially-correct add '--show-bad-code' argument
|
||||
*/
|
||||
public final java.lang.Object invokeSuspend(java.lang.Object r10) {
|
||||
/*
|
||||
r9 = this;
|
||||
java.lang.Object r0 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED()
|
||||
int r1 = r9.label
|
||||
r2 = 2
|
||||
r3 = 1
|
||||
if (r1 == 0) goto L36
|
||||
if (r1 == r3) goto L27
|
||||
if (r1 != r2) goto L1f
|
||||
int r1 = r9.I$0
|
||||
java.lang.Object r4 = r9.L$1
|
||||
kotlinx.coroutines.channels.ChannelIterator r4 = (kotlinx.coroutines.channels.ChannelIterator) r4
|
||||
java.lang.Object r5 = r9.L$0
|
||||
kotlinx.coroutines.channels.ProducerScope r5 = (kotlinx.coroutines.channels.ProducerScope) r5
|
||||
kotlin.ResultKt.throwOnFailure(r10)
|
||||
r10 = r5
|
||||
r5 = r9
|
||||
goto L88
|
||||
L1f:
|
||||
java.lang.IllegalStateException r10 = new java.lang.IllegalStateException
|
||||
java.lang.String r0 = "call to 'resume' before 'invoke' with coroutine"
|
||||
r10.<init>(r0)
|
||||
throw r10
|
||||
L27:
|
||||
int r1 = r9.I$0
|
||||
java.lang.Object r4 = r9.L$1
|
||||
kotlinx.coroutines.channels.ChannelIterator r4 = (kotlinx.coroutines.channels.ChannelIterator) r4
|
||||
java.lang.Object r5 = r9.L$0
|
||||
kotlinx.coroutines.channels.ProducerScope r5 = (kotlinx.coroutines.channels.ProducerScope) r5
|
||||
kotlin.ResultKt.throwOnFailure(r10)
|
||||
r6 = r9
|
||||
goto L68
|
||||
L36:
|
||||
kotlin.ResultKt.throwOnFailure(r10)
|
||||
java.lang.Object r10 = r9.L$0
|
||||
kotlinx.coroutines.channels.ProducerScope r10 = (kotlinx.coroutines.channels.ProducerScope) r10
|
||||
int r1 = r9.$n
|
||||
if (r1 != 0) goto L44
|
||||
kotlin.Unit r10 = kotlin.Unit.INSTANCE
|
||||
return r10
|
||||
L44:
|
||||
if (r1 < 0) goto L48
|
||||
r4 = 1
|
||||
goto L49
|
||||
L48:
|
||||
r4 = 0
|
||||
L49:
|
||||
if (r4 == 0) goto L92
|
||||
kotlinx.coroutines.channels.ReceiveChannel<E> r4 = r9.$this_take
|
||||
kotlinx.coroutines.channels.ChannelIterator r4 = r4.iterator()
|
||||
r5 = r9
|
||||
L52:
|
||||
r6 = r5
|
||||
kotlin.coroutines.Continuation r6 = (kotlin.coroutines.Continuation) r6
|
||||
r5.L$0 = r10
|
||||
r5.L$1 = r4
|
||||
r5.I$0 = r1
|
||||
r5.label = r3
|
||||
java.lang.Object r6 = r4.hasNext(r6)
|
||||
if (r6 != r0) goto L64
|
||||
return r0
|
||||
L64:
|
||||
r8 = r5
|
||||
r5 = r10
|
||||
r10 = r6
|
||||
r6 = r8
|
||||
L68:
|
||||
java.lang.Boolean r10 = (java.lang.Boolean) r10
|
||||
boolean r10 = r10.booleanValue()
|
||||
if (r10 == 0) goto L8f
|
||||
java.lang.Object r10 = r4.next()
|
||||
r7 = r6
|
||||
kotlin.coroutines.Continuation r7 = (kotlin.coroutines.Continuation) r7
|
||||
r6.L$0 = r5
|
||||
r6.L$1 = r4
|
||||
r6.I$0 = r1
|
||||
r6.label = r2
|
||||
java.lang.Object r10 = r5.send(r10, r7)
|
||||
if (r10 != r0) goto L86
|
||||
return r0
|
||||
L86:
|
||||
r10 = r5
|
||||
r5 = r6
|
||||
L88:
|
||||
int r1 = r1 + (-1)
|
||||
if (r1 != 0) goto L52
|
||||
kotlin.Unit r10 = kotlin.Unit.INSTANCE
|
||||
return r10
|
||||
L8f:
|
||||
kotlin.Unit r10 = kotlin.Unit.INSTANCE
|
||||
return r10
|
||||
L92:
|
||||
java.lang.StringBuilder r10 = new java.lang.StringBuilder
|
||||
java.lang.String r0 = "Requested element count "
|
||||
r10.<init>(r0)
|
||||
r10.append(r1)
|
||||
java.lang.String r0 = " is less than zero."
|
||||
r10.append(r0)
|
||||
java.lang.String r10 = r10.toString()
|
||||
java.lang.IllegalArgumentException r0 = new java.lang.IllegalArgumentException
|
||||
java.lang.String r10 = r10.toString()
|
||||
r0.<init>(r10)
|
||||
throw r0
|
||||
*/
|
||||
throw new UnsupportedOperationException("Method not decompiled: kotlinx.coroutines.channels.ChannelsKt__DeprecatedKt$take$1.invokeSuspend(java.lang.Object):java.lang.Object");
|
||||
}
|
||||
}
|
@ -0,0 +1,63 @@
|
||||
package kotlinx.coroutines.channels;
|
||||
|
||||
import kotlin.Metadata;
|
||||
import kotlin.Unit;
|
||||
import kotlin.coroutines.Continuation;
|
||||
import kotlin.coroutines.jvm.internal.DebugMetadata;
|
||||
import kotlin.coroutines.jvm.internal.SuspendLambda;
|
||||
import kotlin.jvm.functions.Function2;
|
||||
|
||||
/* JADX INFO: Add missing generic type declarations: [E] */
|
||||
/* compiled from: Deprecated.kt */
|
||||
@Metadata(d1 = {"\u0000\f\n\u0000\n\u0002\u0018\u0002\n\u0002\u0010\u0002\n\u0000\u0010\u0003\u001a\u00020\u0002\"\u0004\b\u0000\u0010\u0000*\b\u0012\u0004\u0012\u00028\u00000\u0001H\u008a@"}, d2 = {"E", "Lkotlinx/coroutines/channels/ProducerScope;", "", "<anonymous>"}, k = 3, mv = {1, 8, 0})
|
||||
@DebugMetadata(c = "kotlinx.coroutines.channels.ChannelsKt__DeprecatedKt$takeWhile$1", f = "Deprecated.kt", i = {0, 1, 1, 2}, l = {269, 270, 271}, m = "invokeSuspend", n = {"$this$produce", "$this$produce", "e", "$this$produce"}, s = {"L$0", "L$0", "L$2", "L$0"})
|
||||
/* loaded from: classes.dex */
|
||||
final class ChannelsKt__DeprecatedKt$takeWhile$1<E> extends SuspendLambda implements Function2<ProducerScope<? super E>, Continuation<? super Unit>, Object> {
|
||||
final /* synthetic */ Function2<E, Continuation<? super Boolean>, Object> $predicate;
|
||||
final /* synthetic */ ReceiveChannel<E> $this_takeWhile;
|
||||
private /* synthetic */ Object L$0;
|
||||
Object L$1;
|
||||
Object L$2;
|
||||
int label;
|
||||
|
||||
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
||||
/* JADX WARN: Multi-variable type inference failed */
|
||||
ChannelsKt__DeprecatedKt$takeWhile$1(ReceiveChannel<? extends E> receiveChannel, Function2<? super E, ? super Continuation<? super Boolean>, ? extends Object> function2, Continuation<? super ChannelsKt__DeprecatedKt$takeWhile$1> continuation) {
|
||||
super(2, continuation);
|
||||
this.$this_takeWhile = receiveChannel;
|
||||
this.$predicate = function2;
|
||||
}
|
||||
|
||||
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
||||
public final Continuation<Unit> create(Object obj, Continuation<?> continuation) {
|
||||
ChannelsKt__DeprecatedKt$takeWhile$1 channelsKt__DeprecatedKt$takeWhile$1 = new ChannelsKt__DeprecatedKt$takeWhile$1(this.$this_takeWhile, this.$predicate, continuation);
|
||||
channelsKt__DeprecatedKt$takeWhile$1.L$0 = obj;
|
||||
return channelsKt__DeprecatedKt$takeWhile$1;
|
||||
}
|
||||
|
||||
@Override // kotlin.jvm.functions.Function2
|
||||
public final Object invoke(ProducerScope<? super E> producerScope, Continuation<? super Unit> continuation) {
|
||||
return ((ChannelsKt__DeprecatedKt$takeWhile$1) create(producerScope, continuation)).invokeSuspend(Unit.INSTANCE);
|
||||
}
|
||||
|
||||
/* JADX WARN: Multi-variable type inference failed */
|
||||
/* JADX WARN: Removed duplicated region for block: B:10:0x0067 A[RETURN] */
|
||||
/* JADX WARN: Removed duplicated region for block: B:12:0x0068 */
|
||||
/* JADX WARN: Removed duplicated region for block: B:15:0x0076 */
|
||||
/* JADX WARN: Removed duplicated region for block: B:21:0x0098 */
|
||||
/* JADX WARN: Removed duplicated region for block: B:23:0x009b */
|
||||
/* JADX WARN: Removed duplicated region for block: B:27:0x00b3 */
|
||||
/* JADX WARN: Unsupported multi-entry loop pattern (BACK_EDGE: B:26:0x00ae -> B:8:0x0058). Please report as a decompilation issue!!! */
|
||||
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
||||
/*
|
||||
Code decompiled incorrectly, please refer to instructions dump.
|
||||
To view partially-correct add '--show-bad-code' argument
|
||||
*/
|
||||
public final java.lang.Object invokeSuspend(java.lang.Object r11) {
|
||||
/*
|
||||
Method dump skipped, instructions count: 182
|
||||
To view this dump add '--comments-level debug' option
|
||||
*/
|
||||
throw new UnsupportedOperationException("Method not decompiled: kotlinx.coroutines.channels.ChannelsKt__DeprecatedKt$takeWhile$1.invokeSuspend(java.lang.Object):java.lang.Object");
|
||||
}
|
||||
}
|
@ -0,0 +1,30 @@
|
||||
package kotlinx.coroutines.channels;
|
||||
|
||||
import kotlin.Metadata;
|
||||
import kotlin.coroutines.Continuation;
|
||||
import kotlin.coroutines.jvm.internal.ContinuationImpl;
|
||||
import kotlin.coroutines.jvm.internal.DebugMetadata;
|
||||
import kotlinx.coroutines.channels.SendChannel;
|
||||
|
||||
/* compiled from: Deprecated.kt */
|
||||
@Metadata(k = 3, mv = {1, 8, 0}, xi = 48)
|
||||
@DebugMetadata(c = "kotlinx.coroutines.channels.ChannelsKt__DeprecatedKt", f = "Deprecated.kt", i = {0, 0, 1, 1}, l = {487, 278}, m = "toChannel", n = {"destination", "$this$consume$iv$iv", "destination", "$this$consume$iv$iv"}, s = {"L$0", "L$1", "L$0", "L$1"})
|
||||
/* loaded from: classes.dex */
|
||||
final class ChannelsKt__DeprecatedKt$toChannel$1<E, C extends SendChannel<? super E>> extends ContinuationImpl {
|
||||
Object L$0;
|
||||
Object L$1;
|
||||
Object L$2;
|
||||
int label;
|
||||
/* synthetic */ Object result;
|
||||
|
||||
ChannelsKt__DeprecatedKt$toChannel$1(Continuation<? super ChannelsKt__DeprecatedKt$toChannel$1> continuation) {
|
||||
super(continuation);
|
||||
}
|
||||
|
||||
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
||||
public final Object invokeSuspend(Object obj) {
|
||||
this.result = obj;
|
||||
this.label |= Integer.MIN_VALUE;
|
||||
return ChannelsKt.toChannel(null, null, this);
|
||||
}
|
||||
}
|
@ -0,0 +1,30 @@
|
||||
package kotlinx.coroutines.channels;
|
||||
|
||||
import java.util.Collection;
|
||||
import kotlin.Metadata;
|
||||
import kotlin.coroutines.Continuation;
|
||||
import kotlin.coroutines.jvm.internal.ContinuationImpl;
|
||||
import kotlin.coroutines.jvm.internal.DebugMetadata;
|
||||
|
||||
/* compiled from: Deprecated.kt */
|
||||
@Metadata(k = 3, mv = {1, 8, 0}, xi = 48)
|
||||
@DebugMetadata(c = "kotlinx.coroutines.channels.ChannelsKt__DeprecatedKt", f = "Deprecated.kt", i = {0, 0}, l = {487}, m = "toCollection", n = {"destination", "$this$consume$iv$iv"}, s = {"L$0", "L$1"})
|
||||
/* loaded from: classes.dex */
|
||||
final class ChannelsKt__DeprecatedKt$toCollection$1<E, C extends Collection<? super E>> extends ContinuationImpl {
|
||||
Object L$0;
|
||||
Object L$1;
|
||||
Object L$2;
|
||||
int label;
|
||||
/* synthetic */ Object result;
|
||||
|
||||
ChannelsKt__DeprecatedKt$toCollection$1(Continuation<? super ChannelsKt__DeprecatedKt$toCollection$1> continuation) {
|
||||
super(continuation);
|
||||
}
|
||||
|
||||
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
||||
public final Object invokeSuspend(Object obj) {
|
||||
this.result = obj;
|
||||
this.label |= Integer.MIN_VALUE;
|
||||
return ChannelsKt.toCollection(null, null, this);
|
||||
}
|
||||
}
|
@ -0,0 +1,30 @@
|
||||
package kotlinx.coroutines.channels;
|
||||
|
||||
import java.util.Map;
|
||||
import kotlin.Metadata;
|
||||
import kotlin.coroutines.Continuation;
|
||||
import kotlin.coroutines.jvm.internal.ContinuationImpl;
|
||||
import kotlin.coroutines.jvm.internal.DebugMetadata;
|
||||
|
||||
/* compiled from: Deprecated.kt */
|
||||
@Metadata(k = 3, mv = {1, 8, 0}, xi = 48)
|
||||
@DebugMetadata(c = "kotlinx.coroutines.channels.ChannelsKt__DeprecatedKt", f = "Deprecated.kt", i = {0, 0}, l = {487}, m = "toMap", n = {"destination", "$this$consume$iv$iv"}, s = {"L$0", "L$1"})
|
||||
/* loaded from: classes.dex */
|
||||
final class ChannelsKt__DeprecatedKt$toMap$2<K, V, M extends Map<? super K, ? super V>> extends ContinuationImpl {
|
||||
Object L$0;
|
||||
Object L$1;
|
||||
Object L$2;
|
||||
int label;
|
||||
/* synthetic */ Object result;
|
||||
|
||||
ChannelsKt__DeprecatedKt$toMap$2(Continuation<? super ChannelsKt__DeprecatedKt$toMap$2> continuation) {
|
||||
super(continuation);
|
||||
}
|
||||
|
||||
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
||||
public final Object invokeSuspend(Object obj) {
|
||||
this.result = obj;
|
||||
this.label |= Integer.MIN_VALUE;
|
||||
return ChannelsKt.toMap(null, null, this);
|
||||
}
|
||||
}
|
@ -0,0 +1,141 @@
|
||||
package kotlinx.coroutines.channels;
|
||||
|
||||
import kotlin.Metadata;
|
||||
import kotlin.Unit;
|
||||
import kotlin.collections.IndexedValue;
|
||||
import kotlin.coroutines.Continuation;
|
||||
import kotlin.coroutines.jvm.internal.DebugMetadata;
|
||||
import kotlin.coroutines.jvm.internal.SuspendLambda;
|
||||
import kotlin.jvm.functions.Function2;
|
||||
|
||||
/* JADX INFO: Add missing generic type declarations: [E] */
|
||||
/* compiled from: Deprecated.kt */
|
||||
@Metadata(d1 = {"\u0000\u0010\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0010\u0002\n\u0000\u0010\u0004\u001a\u00020\u0003\"\u0004\b\u0000\u0010\u0000*\u000e\u0012\n\u0012\b\u0012\u0004\u0012\u00028\u00000\u00020\u0001H\u008a@"}, d2 = {"E", "Lkotlinx/coroutines/channels/ProducerScope;", "Lkotlin/collections/IndexedValue;", "", "<anonymous>"}, k = 3, mv = {1, 8, 0})
|
||||
@DebugMetadata(c = "kotlinx.coroutines.channels.ChannelsKt__DeprecatedKt$withIndex$1", f = "Deprecated.kt", i = {0, 0, 1, 1}, l = {370, 371}, m = "invokeSuspend", n = {"$this$produce", "index", "$this$produce", "index"}, s = {"L$0", "I$0", "L$0", "I$0"})
|
||||
/* loaded from: classes.dex */
|
||||
final class ChannelsKt__DeprecatedKt$withIndex$1<E> extends SuspendLambda implements Function2<ProducerScope<? super IndexedValue<? extends E>>, Continuation<? super Unit>, Object> {
|
||||
final /* synthetic */ ReceiveChannel<E> $this_withIndex;
|
||||
int I$0;
|
||||
private /* synthetic */ Object L$0;
|
||||
Object L$1;
|
||||
int label;
|
||||
|
||||
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
||||
/* JADX WARN: Multi-variable type inference failed */
|
||||
ChannelsKt__DeprecatedKt$withIndex$1(ReceiveChannel<? extends E> receiveChannel, Continuation<? super ChannelsKt__DeprecatedKt$withIndex$1> continuation) {
|
||||
super(2, continuation);
|
||||
this.$this_withIndex = receiveChannel;
|
||||
}
|
||||
|
||||
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
||||
public final Continuation<Unit> create(Object obj, Continuation<?> continuation) {
|
||||
ChannelsKt__DeprecatedKt$withIndex$1 channelsKt__DeprecatedKt$withIndex$1 = new ChannelsKt__DeprecatedKt$withIndex$1(this.$this_withIndex, continuation);
|
||||
channelsKt__DeprecatedKt$withIndex$1.L$0 = obj;
|
||||
return channelsKt__DeprecatedKt$withIndex$1;
|
||||
}
|
||||
|
||||
@Override // kotlin.jvm.functions.Function2
|
||||
public final Object invoke(ProducerScope<? super IndexedValue<? extends E>> producerScope, Continuation<? super Unit> continuation) {
|
||||
return ((ChannelsKt__DeprecatedKt$withIndex$1) create(producerScope, continuation)).invokeSuspend(Unit.INSTANCE);
|
||||
}
|
||||
|
||||
/* JADX WARN: Removed duplicated region for block: B:13:0x0068 */
|
||||
/* JADX WARN: Removed duplicated region for block: B:17:0x008a */
|
||||
/* JADX WARN: Unsupported multi-entry loop pattern (BACK_EDGE: B:16:0x0085 -> B:6:0x0047). Please report as a decompilation issue!!! */
|
||||
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
||||
/*
|
||||
Code decompiled incorrectly, please refer to instructions dump.
|
||||
To view partially-correct add '--show-bad-code' argument
|
||||
*/
|
||||
public final java.lang.Object invokeSuspend(java.lang.Object r12) {
|
||||
/*
|
||||
r11 = this;
|
||||
java.lang.Object r0 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED()
|
||||
int r1 = r11.label
|
||||
r2 = 2
|
||||
r3 = 1
|
||||
if (r1 == 0) goto L38
|
||||
if (r1 == r3) goto L29
|
||||
if (r1 != r2) goto L21
|
||||
int r1 = r11.I$0
|
||||
java.lang.Object r4 = r11.L$1
|
||||
kotlinx.coroutines.channels.ChannelIterator r4 = (kotlinx.coroutines.channels.ChannelIterator) r4
|
||||
java.lang.Object r5 = r11.L$0
|
||||
kotlinx.coroutines.channels.ProducerScope r5 = (kotlinx.coroutines.channels.ProducerScope) r5
|
||||
kotlin.ResultKt.throwOnFailure(r12)
|
||||
r12 = r5
|
||||
r5 = r11
|
||||
r9 = r4
|
||||
r4 = r1
|
||||
r1 = r9
|
||||
goto L47
|
||||
L21:
|
||||
java.lang.IllegalStateException r12 = new java.lang.IllegalStateException
|
||||
java.lang.String r0 = "call to 'resume' before 'invoke' with coroutine"
|
||||
r12.<init>(r0)
|
||||
throw r12
|
||||
L29:
|
||||
int r1 = r11.I$0
|
||||
java.lang.Object r4 = r11.L$1
|
||||
kotlinx.coroutines.channels.ChannelIterator r4 = (kotlinx.coroutines.channels.ChannelIterator) r4
|
||||
java.lang.Object r5 = r11.L$0
|
||||
kotlinx.coroutines.channels.ProducerScope r5 = (kotlinx.coroutines.channels.ProducerScope) r5
|
||||
kotlin.ResultKt.throwOnFailure(r12)
|
||||
r6 = r11
|
||||
goto L60
|
||||
L38:
|
||||
kotlin.ResultKt.throwOnFailure(r12)
|
||||
java.lang.Object r12 = r11.L$0
|
||||
kotlinx.coroutines.channels.ProducerScope r12 = (kotlinx.coroutines.channels.ProducerScope) r12
|
||||
kotlinx.coroutines.channels.ReceiveChannel<E> r1 = r11.$this_withIndex
|
||||
kotlinx.coroutines.channels.ChannelIterator r1 = r1.iterator()
|
||||
r4 = 0
|
||||
r5 = r11
|
||||
L47:
|
||||
r6 = r5
|
||||
kotlin.coroutines.Continuation r6 = (kotlin.coroutines.Continuation) r6
|
||||
r5.L$0 = r12
|
||||
r5.L$1 = r1
|
||||
r5.I$0 = r4
|
||||
r5.label = r3
|
||||
java.lang.Object r6 = r1.hasNext(r6)
|
||||
if (r6 != r0) goto L59
|
||||
return r0
|
||||
L59:
|
||||
r9 = r5
|
||||
r5 = r12
|
||||
r12 = r6
|
||||
r6 = r9
|
||||
r10 = r4
|
||||
r4 = r1
|
||||
r1 = r10
|
||||
L60:
|
||||
java.lang.Boolean r12 = (java.lang.Boolean) r12
|
||||
boolean r12 = r12.booleanValue()
|
||||
if (r12 == 0) goto L8a
|
||||
java.lang.Object r12 = r4.next()
|
||||
kotlin.collections.IndexedValue r7 = new kotlin.collections.IndexedValue
|
||||
int r8 = r1 + 1
|
||||
r7.<init>(r1, r12)
|
||||
r12 = r6
|
||||
kotlin.coroutines.Continuation r12 = (kotlin.coroutines.Continuation) r12
|
||||
r6.L$0 = r5
|
||||
r6.L$1 = r4
|
||||
r6.I$0 = r8
|
||||
r6.label = r2
|
||||
java.lang.Object r12 = r5.send(r7, r12)
|
||||
if (r12 != r0) goto L85
|
||||
return r0
|
||||
L85:
|
||||
r1 = r4
|
||||
r12 = r5
|
||||
r5 = r6
|
||||
r4 = r8
|
||||
goto L47
|
||||
L8a:
|
||||
kotlin.Unit r12 = kotlin.Unit.INSTANCE
|
||||
return r12
|
||||
*/
|
||||
throw new UnsupportedOperationException("Method not decompiled: kotlinx.coroutines.channels.ChannelsKt__DeprecatedKt$withIndex$1.invokeSuspend(java.lang.Object):java.lang.Object");
|
||||
}
|
||||
}
|
@ -0,0 +1,68 @@
|
||||
package kotlinx.coroutines.channels;
|
||||
|
||||
import kotlin.Metadata;
|
||||
import kotlin.Unit;
|
||||
import kotlin.coroutines.Continuation;
|
||||
import kotlin.coroutines.jvm.internal.DebugMetadata;
|
||||
import kotlin.coroutines.jvm.internal.SuspendLambda;
|
||||
import kotlin.jvm.functions.Function2;
|
||||
|
||||
/* JADX INFO: Add missing generic type declarations: [V] */
|
||||
/* compiled from: Deprecated.kt */
|
||||
@Metadata(d1 = {"\u0000\u000e\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\u0010\u0002\n\u0000\u0010\u0005\u001a\u00020\u0004\"\u0004\b\u0000\u0010\u0000\"\u0004\b\u0001\u0010\u0001\"\u0004\b\u0002\u0010\u0002*\b\u0012\u0004\u0012\u00028\u00020\u0003H\u008a@"}, d2 = {"E", "R", "V", "Lkotlinx/coroutines/channels/ProducerScope;", "", "<anonymous>"}, k = 3, mv = {1, 8, 0})
|
||||
@DebugMetadata(c = "kotlinx.coroutines.channels.ChannelsKt__DeprecatedKt$zip$2", f = "Deprecated.kt", i = {0, 0, 0, 1, 1, 1, 1, 2, 2, 2}, l = {487, 469, 471}, m = "invokeSuspend", n = {"$this$produce", "otherIterator", "$this$consume$iv$iv", "$this$produce", "otherIterator", "$this$consume$iv$iv", "element1", "$this$produce", "otherIterator", "$this$consume$iv$iv"}, s = {"L$0", "L$1", "L$3", "L$0", "L$1", "L$3", "L$5", "L$0", "L$1", "L$3"})
|
||||
/* loaded from: classes.dex */
|
||||
final class ChannelsKt__DeprecatedKt$zip$2<V> extends SuspendLambda implements Function2<ProducerScope<? super V>, Continuation<? super Unit>, Object> {
|
||||
final /* synthetic */ ReceiveChannel<R> $other;
|
||||
final /* synthetic */ ReceiveChannel<E> $this_zip;
|
||||
final /* synthetic */ Function2<E, R, V> $transform;
|
||||
private /* synthetic */ Object L$0;
|
||||
Object L$1;
|
||||
Object L$2;
|
||||
Object L$3;
|
||||
Object L$4;
|
||||
Object L$5;
|
||||
int label;
|
||||
|
||||
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
||||
/* JADX WARN: Multi-variable type inference failed */
|
||||
ChannelsKt__DeprecatedKt$zip$2(ReceiveChannel<? extends R> receiveChannel, ReceiveChannel<? extends E> receiveChannel2, Function2<? super E, ? super R, ? extends V> function2, Continuation<? super ChannelsKt__DeprecatedKt$zip$2> continuation) {
|
||||
super(2, continuation);
|
||||
this.$other = receiveChannel;
|
||||
this.$this_zip = receiveChannel2;
|
||||
this.$transform = function2;
|
||||
}
|
||||
|
||||
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
||||
public final Continuation<Unit> create(Object obj, Continuation<?> continuation) {
|
||||
ChannelsKt__DeprecatedKt$zip$2 channelsKt__DeprecatedKt$zip$2 = new ChannelsKt__DeprecatedKt$zip$2(this.$other, this.$this_zip, this.$transform, continuation);
|
||||
channelsKt__DeprecatedKt$zip$2.L$0 = obj;
|
||||
return channelsKt__DeprecatedKt$zip$2;
|
||||
}
|
||||
|
||||
@Override // kotlin.jvm.functions.Function2
|
||||
public final Object invoke(ProducerScope<? super V> producerScope, Continuation<? super Unit> continuation) {
|
||||
return ((ChannelsKt__DeprecatedKt$zip$2) create(producerScope, continuation)).invokeSuspend(Unit.INSTANCE);
|
||||
}
|
||||
|
||||
/* JADX WARN: Removed duplicated region for block: B:13:0x00ab A[RETURN] */
|
||||
/* JADX WARN: Removed duplicated region for block: B:15:0x00ac */
|
||||
/* JADX WARN: Removed duplicated region for block: B:18:0x00bd A[Catch: all -> 0x005a, TRY_LEAVE, TryCatch #1 {all -> 0x005a, blocks: (B:16:0x00b5, B:18:0x00bd, B:39:0x0115, B:50:0x004e), top: B:49:0x004e }] */
|
||||
/* JADX WARN: Removed duplicated region for block: B:25:0x00e5 A[Catch: all -> 0x0112, TRY_LEAVE, TryCatch #0 {all -> 0x0112, blocks: (B:23:0x00dd, B:25:0x00e5), top: B:22:0x00dd }] */
|
||||
/* JADX WARN: Removed duplicated region for block: B:29:0x010a */
|
||||
/* JADX WARN: Removed duplicated region for block: B:39:0x0115 A[Catch: all -> 0x005a, TRY_ENTER, TRY_LEAVE, TryCatch #1 {all -> 0x005a, blocks: (B:16:0x00b5, B:18:0x00bd, B:39:0x0115, B:50:0x004e), top: B:49:0x004e }] */
|
||||
/* JADX WARN: Unsupported multi-entry loop pattern (BACK_EDGE: B:28:0x0102 -> B:10:0x0104). Please report as a decompilation issue!!! */
|
||||
/* JADX WARN: Unsupported multi-entry loop pattern (BACK_EDGE: B:29:0x010a -> B:11:0x0097). Please report as a decompilation issue!!! */
|
||||
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
||||
/*
|
||||
Code decompiled incorrectly, please refer to instructions dump.
|
||||
To view partially-correct add '--show-bad-code' argument
|
||||
*/
|
||||
public final java.lang.Object invokeSuspend(java.lang.Object r14) {
|
||||
/*
|
||||
Method dump skipped, instructions count: 292
|
||||
To view this dump add '--comments-level debug' option
|
||||
*/
|
||||
throw new UnsupportedOperationException("Method not decompiled: kotlinx.coroutines.channels.ChannelsKt__DeprecatedKt$zip$2.invokeSuspend(java.lang.Object):java.lang.Object");
|
||||
}
|
||||
}
|
File diff suppressed because one or more lines are too long
@ -0,0 +1,13 @@
|
||||
package kotlinx.coroutines.channels;
|
||||
|
||||
import java.util.NoSuchElementException;
|
||||
import kotlin.Metadata;
|
||||
|
||||
/* compiled from: Channel.kt */
|
||||
@Metadata(d1 = {"\u0000\u0016\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u000e\n\u0002\b\u0002\u0018\u00002\u00060\u0001j\u0002`\u0002B\u000f\u0012\b\u0010\u0003\u001a\u0004\u0018\u00010\u0004¢\u0006\u0002\u0010\u0005¨\u0006\u0006"}, d2 = {"Lkotlinx/coroutines/channels/ClosedReceiveChannelException;", "Ljava/util/NoSuchElementException;", "Lkotlin/NoSuchElementException;", "message", "", "(Ljava/lang/String;)V", "kotlinx-coroutines-core"}, k = 1, mv = {1, 8, 0}, xi = 48)
|
||||
/* loaded from: classes.dex */
|
||||
public final class ClosedReceiveChannelException extends NoSuchElementException {
|
||||
public ClosedReceiveChannelException(String str) {
|
||||
super(str);
|
||||
}
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
package kotlinx.coroutines.channels;
|
||||
|
||||
import kotlin.Metadata;
|
||||
|
||||
/* compiled from: Channel.kt */
|
||||
@Metadata(d1 = {"\u0000\u0016\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u000e\n\u0002\b\u0002\u0018\u00002\u00060\u0001j\u0002`\u0002B\u000f\u0012\b\u0010\u0003\u001a\u0004\u0018\u00010\u0004¢\u0006\u0002\u0010\u0005¨\u0006\u0006"}, d2 = {"Lkotlinx/coroutines/channels/ClosedSendChannelException;", "Ljava/lang/IllegalStateException;", "Lkotlin/IllegalStateException;", "message", "", "(Ljava/lang/String;)V", "kotlinx-coroutines-core"}, k = 1, mv = {1, 8, 0}, xi = 48)
|
||||
/* loaded from: classes.dex */
|
||||
public final class ClosedSendChannelException extends IllegalStateException {
|
||||
public ClosedSendChannelException(String str) {
|
||||
super(str);
|
||||
}
|
||||
}
|
@ -0,0 +1,93 @@
|
||||
package kotlinx.coroutines.channels;
|
||||
|
||||
import java.util.concurrent.CancellationException;
|
||||
import kotlin.Deprecated;
|
||||
import kotlin.DeprecationLevel;
|
||||
import kotlin.Metadata;
|
||||
import kotlin.ReplaceWith;
|
||||
import kotlin.Unit;
|
||||
import kotlin.coroutines.Continuation;
|
||||
import kotlin.jvm.functions.Function1;
|
||||
import kotlinx.coroutines.selects.SelectClause2;
|
||||
|
||||
/* compiled from: BroadcastChannel.kt */
|
||||
@Deprecated(level = DeprecationLevel.WARNING, message = "ConflatedBroadcastChannel is deprecated in the favour of SharedFlow and is no longer supported")
|
||||
@Metadata(d1 = {"\u0000Z\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\u000b\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\b\n\u0002\u0010\u0003\n\u0002\u0010\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0003\b\u0007\u0018\u0000*\u0004\b\u0000\u0010\u00012\b\u0012\u0004\u0012\u0002H\u00010\u0002B\u0007\b\u0016¢\u0006\u0002\u0010\u0003B\u000f\b\u0016\u0012\u0006\u0010\u0004\u001a\u00028\u0000¢\u0006\u0002\u0010\u0005B\u0015\b\u0002\u0012\f\u0010\u0006\u001a\b\u0012\u0004\u0012\u00028\u00000\u0007¢\u0006\u0002\u0010\bJ\u0015\u0010\u0015\u001a\u00020\n2\n\b\u0002\u0010\u0016\u001a\u0004\u0018\u00010\u0017H\u0097\u0001J\u001b\u0010\u0015\u001a\u00020\u00182\u0010\b\u0002\u0010\u0016\u001a\n\u0018\u00010\u0019j\u0004\u0018\u0001`\u001aH\u0096\u0001J\u0013\u0010\u001b\u001a\u00020\n2\b\u0010\u0016\u001a\u0004\u0018\u00010\u0017H\u0096\u0001J.\u0010\u001c\u001a\u00020\u00182#\u0010\u001d\u001a\u001f\u0012\u0015\u0012\u0013\u0018\u00010\u0017¢\u0006\f\b\u001f\u0012\b\b \u0012\u0004\b\b(\u0016\u0012\u0004\u0012\u00020\u00180\u001eH\u0096\u0001J\u0016\u0010!\u001a\u00020\n2\u0006\u0010\"\u001a\u00028\u0000H\u0097\u0001¢\u0006\u0002\u0010#J\u000f\u0010$\u001a\b\u0012\u0004\u0012\u00028\u00000%H\u0096\u0001J\u0019\u0010&\u001a\u00020\u00182\u0006\u0010\"\u001a\u00028\u0000H\u0096Aø\u0001\u0000¢\u0006\u0002\u0010'J'\u0010(\u001a\b\u0012\u0004\u0012\u00020\u00180)2\u0006\u0010\"\u001a\u00028\u0000H\u0096\u0001ø\u0001\u0001ø\u0001\u0002ø\u0001\u0000¢\u0006\u0004\b*\u0010+R\u0014\u0010\u0006\u001a\b\u0012\u0004\u0012\u00028\u00000\u0007X\u0082\u0004¢\u0006\u0002\n\u0000R\u0014\u0010\t\u001a\u00020\n8\u0016X\u0097\u0005¢\u0006\u0006\u001a\u0004\b\t\u0010\u000bR$\u0010\f\u001a\u0014\u0012\u0004\u0012\u00028\u0000\u0012\n\u0012\b\u0012\u0004\u0012\u00028\u00000\u000e0\rX\u0096\u0005¢\u0006\u0006\u001a\u0004\b\u000f\u0010\u0010R\u0011\u0010\u0004\u001a\u00028\u00008F¢\u0006\u0006\u001a\u0004\b\u0011\u0010\u0012R\u0013\u0010\u0013\u001a\u0004\u0018\u00018\u00008F¢\u0006\u0006\u001a\u0004\b\u0014\u0010\u0012\u0082\u0002\u000f\n\u0002\b\u0019\n\u0002\b!\n\u0005\b¡\u001e0\u0001¨\u0006,"}, d2 = {"Lkotlinx/coroutines/channels/ConflatedBroadcastChannel;", "E", "Lkotlinx/coroutines/channels/BroadcastChannel;", "()V", "value", "(Ljava/lang/Object;)V", "broadcast", "Lkotlinx/coroutines/channels/BroadcastChannelImpl;", "(Lkotlinx/coroutines/channels/BroadcastChannelImpl;)V", "isClosedForSend", "", "()Z", "onSend", "Lkotlinx/coroutines/selects/SelectClause2;", "Lkotlinx/coroutines/channels/SendChannel;", "getOnSend", "()Lkotlinx/coroutines/selects/SelectClause2;", "getValue", "()Ljava/lang/Object;", "valueOrNull", "getValueOrNull", "cancel", "cause", "", "", "Ljava/util/concurrent/CancellationException;", "Lkotlinx/coroutines/CancellationException;", "close", "invokeOnClose", "handler", "Lkotlin/Function1;", "Lkotlin/ParameterName;", "name", "offer", "element", "(Ljava/lang/Object;)Z", "openSubscription", "Lkotlinx/coroutines/channels/ReceiveChannel;", "send", "(Ljava/lang/Object;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;", "trySend", "Lkotlinx/coroutines/channels/ChannelResult;", "trySend-JP2dKIU", "(Ljava/lang/Object;)Ljava/lang/Object;", "kotlinx-coroutines-core"}, k = 1, mv = {1, 8, 0}, xi = 48)
|
||||
/* loaded from: classes.dex */
|
||||
public final class ConflatedBroadcastChannel<E> implements BroadcastChannel<E> {
|
||||
private final BroadcastChannelImpl<E> broadcast;
|
||||
|
||||
@Override // kotlinx.coroutines.channels.BroadcastChannel
|
||||
public void cancel(CancellationException cause) {
|
||||
this.broadcast.cancel(cause);
|
||||
}
|
||||
|
||||
@Override // kotlinx.coroutines.channels.BroadcastChannel
|
||||
@Deprecated(level = DeprecationLevel.HIDDEN, message = "Binary compatibility only")
|
||||
public /* synthetic */ boolean cancel(Throwable cause) {
|
||||
return this.broadcast.cancel(cause);
|
||||
}
|
||||
|
||||
@Override // kotlinx.coroutines.channels.SendChannel
|
||||
public boolean close(Throwable cause) {
|
||||
return this.broadcast.close(cause);
|
||||
}
|
||||
|
||||
@Override // kotlinx.coroutines.channels.SendChannel
|
||||
public SelectClause2<E, SendChannel<E>> getOnSend() {
|
||||
return this.broadcast.getOnSend();
|
||||
}
|
||||
|
||||
@Override // kotlinx.coroutines.channels.SendChannel
|
||||
public void invokeOnClose(Function1<? super Throwable, Unit> handler) {
|
||||
this.broadcast.invokeOnClose(handler);
|
||||
}
|
||||
|
||||
@Override // kotlinx.coroutines.channels.SendChannel
|
||||
public boolean isClosedForSend() {
|
||||
return this.broadcast.isClosedForSend();
|
||||
}
|
||||
|
||||
@Override // kotlinx.coroutines.channels.SendChannel
|
||||
@Deprecated(level = DeprecationLevel.ERROR, message = "Deprecated in the favour of 'trySend' method", replaceWith = @ReplaceWith(expression = "trySend(element).isSuccess", imports = {}))
|
||||
public boolean offer(E element) {
|
||||
return this.broadcast.offer(element);
|
||||
}
|
||||
|
||||
@Override // kotlinx.coroutines.channels.BroadcastChannel
|
||||
public ReceiveChannel<E> openSubscription() {
|
||||
return this.broadcast.openSubscription();
|
||||
}
|
||||
|
||||
@Override // kotlinx.coroutines.channels.SendChannel
|
||||
public Object send(E e, Continuation<? super Unit> continuation) {
|
||||
return this.broadcast.send(e, continuation);
|
||||
}
|
||||
|
||||
@Override // kotlinx.coroutines.channels.SendChannel
|
||||
/* renamed from: trySend-JP2dKIU */
|
||||
public Object mo1852trySendJP2dKIU(E element) {
|
||||
return this.broadcast.mo1852trySendJP2dKIU(element);
|
||||
}
|
||||
|
||||
private ConflatedBroadcastChannel(BroadcastChannelImpl<E> broadcastChannelImpl) {
|
||||
this.broadcast = broadcastChannelImpl;
|
||||
}
|
||||
|
||||
public ConflatedBroadcastChannel() {
|
||||
this(new BroadcastChannelImpl(-1));
|
||||
}
|
||||
|
||||
public ConflatedBroadcastChannel(E e) {
|
||||
this();
|
||||
mo1852trySendJP2dKIU(e);
|
||||
}
|
||||
|
||||
public final E getValue() {
|
||||
return this.broadcast.getValue();
|
||||
}
|
||||
|
||||
public final E getValueOrNull() {
|
||||
return this.broadcast.getValueOrNull();
|
||||
}
|
||||
}
|
@ -0,0 +1,181 @@
|
||||
package kotlinx.coroutines.channels;
|
||||
|
||||
import kotlin.ExceptionsKt;
|
||||
import kotlin.Metadata;
|
||||
import kotlin.Unit;
|
||||
import kotlin.coroutines.Continuation;
|
||||
import kotlin.coroutines.jvm.internal.Boxing;
|
||||
import kotlin.jvm.functions.Function1;
|
||||
import kotlin.jvm.internal.DefaultConstructorMarker;
|
||||
import kotlin.jvm.internal.Reflection;
|
||||
import kotlinx.coroutines.Waiter;
|
||||
import kotlinx.coroutines.channels.ChannelResult;
|
||||
import kotlinx.coroutines.internal.OnUndeliveredElementKt;
|
||||
import kotlinx.coroutines.internal.UndeliveredElementException;
|
||||
import kotlinx.coroutines.selects.SelectInstance;
|
||||
|
||||
/* compiled from: ConflatedBufferedChannel.kt */
|
||||
@Metadata(d1 = {"\u0000F\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\b\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0010\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\u000b\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0000\n\u0002\b\u0007\n\u0002\u0018\u0002\n\u0002\b\u000b\b\u0010\u0018\u0000*\u0004\b\u0000\u0010\u00012\b\u0012\u0004\u0012\u0002H\u00010\u0002B9\u0012\u0006\u0010\u0003\u001a\u00020\u0004\u0012\u0006\u0010\u0005\u001a\u00020\u0006\u0012\"\b\u0002\u0010\u0007\u001a\u001c\u0012\u0004\u0012\u00028\u0000\u0012\u0004\u0012\u00020\t\u0018\u00010\bj\n\u0012\u0004\u0012\u00028\u0000\u0018\u0001`\n¢\u0006\u0002\u0010\u000bJ\u001e\u0010\u000f\u001a\u00020\t2\n\u0010\u0010\u001a\u0006\u0012\u0002\b\u00030\u00112\b\u0010\u0012\u001a\u0004\u0018\u00010\u0013H\u0014J\u0019\u0010\u0014\u001a\u00020\t2\u0006\u0010\u0012\u001a\u00028\u0000H\u0096@ø\u0001\u0000¢\u0006\u0002\u0010\u0015J\u001b\u0010\u0016\u001a\u00020\r2\u0006\u0010\u0012\u001a\u00028\u0000H\u0090@ø\u0001\u0000¢\u0006\u0004\b\u0017\u0010\u0015J\r\u0010\u0018\u001a\u00020\rH\u0010¢\u0006\u0002\b\u0019J&\u0010\u001a\u001a\b\u0012\u0004\u0012\u00020\t0\u001b2\u0006\u0010\u0012\u001a\u00028\u0000H\u0016ø\u0001\u0001ø\u0001\u0002ø\u0001\u0000¢\u0006\u0004\b\u001c\u0010\u001dJ.\u0010\u001e\u001a\b\u0012\u0004\u0012\u00020\t0\u001b2\u0006\u0010\u0012\u001a\u00028\u00002\u0006\u0010\u001f\u001a\u00020\rH\u0002ø\u0001\u0001ø\u0001\u0002ø\u0001\u0000¢\u0006\u0004\b \u0010!J&\u0010\"\u001a\b\u0012\u0004\u0012\u00020\t0\u001b2\u0006\u0010\u0012\u001a\u00028\u0000H\u0002ø\u0001\u0001ø\u0001\u0002ø\u0001\u0000¢\u0006\u0004\b#\u0010\u001dJ.\u0010$\u001a\b\u0012\u0004\u0012\u00020\t0\u001b2\u0006\u0010\u0012\u001a\u00028\u00002\u0006\u0010\u001f\u001a\u00020\rH\u0002ø\u0001\u0001ø\u0001\u0002ø\u0001\u0000¢\u0006\u0004\b%\u0010!R\u000e\u0010\u0003\u001a\u00020\u0004X\u0082\u0004¢\u0006\u0002\n\u0000R\u0014\u0010\f\u001a\u00020\r8TX\u0094\u0004¢\u0006\u0006\u001a\u0004\b\f\u0010\u000eR\u000e\u0010\u0005\u001a\u00020\u0006X\u0082\u0004¢\u0006\u0002\n\u0000\u0082\u0002\u000f\n\u0002\b\u0019\n\u0002\b!\n\u0005\b¡\u001e0\u0001¨\u0006&"}, d2 = {"Lkotlinx/coroutines/channels/ConflatedBufferedChannel;", "E", "Lkotlinx/coroutines/channels/BufferedChannel;", "capacity", "", "onBufferOverflow", "Lkotlinx/coroutines/channels/BufferOverflow;", "onUndeliveredElement", "Lkotlin/Function1;", "", "Lkotlinx/coroutines/internal/OnUndeliveredElement;", "(ILkotlinx/coroutines/channels/BufferOverflow;Lkotlin/jvm/functions/Function1;)V", "isConflatedDropOldest", "", "()Z", "registerSelectForSend", "select", "Lkotlinx/coroutines/selects/SelectInstance;", "element", "", "send", "(Ljava/lang/Object;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;", "sendBroadcast", "sendBroadcast$kotlinx_coroutines_core", "shouldSendSuspend", "shouldSendSuspend$kotlinx_coroutines_core", "trySend", "Lkotlinx/coroutines/channels/ChannelResult;", "trySend-JP2dKIU", "(Ljava/lang/Object;)Ljava/lang/Object;", "trySendDropLatest", "isSendOp", "trySendDropLatest-Mj0NB7M", "(Ljava/lang/Object;Z)Ljava/lang/Object;", "trySendDropOldest", "trySendDropOldest-JP2dKIU", "trySendImpl", "trySendImpl-Mj0NB7M", "kotlinx-coroutines-core"}, k = 1, mv = {1, 8, 0}, xi = 48)
|
||||
/* loaded from: classes.dex */
|
||||
public class ConflatedBufferedChannel<E> extends BufferedChannel<E> {
|
||||
private final int capacity;
|
||||
private final BufferOverflow onBufferOverflow;
|
||||
|
||||
@Override // kotlinx.coroutines.channels.BufferedChannel, kotlinx.coroutines.channels.SendChannel
|
||||
public Object send(E e, Continuation<? super Unit> continuation) {
|
||||
return send$suspendImpl((ConflatedBufferedChannel) this, (Object) e, continuation);
|
||||
}
|
||||
|
||||
@Override // kotlinx.coroutines.channels.BufferedChannel
|
||||
public Object sendBroadcast$kotlinx_coroutines_core(E e, Continuation<? super Boolean> continuation) {
|
||||
return sendBroadcast$suspendImpl((ConflatedBufferedChannel) this, (Object) e, continuation);
|
||||
}
|
||||
|
||||
@Override // kotlinx.coroutines.channels.BufferedChannel
|
||||
public boolean shouldSendSuspend$kotlinx_coroutines_core() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public /* synthetic */ ConflatedBufferedChannel(int i, BufferOverflow bufferOverflow, Function1 function1, int i2, DefaultConstructorMarker defaultConstructorMarker) {
|
||||
this(i, bufferOverflow, (i2 & 4) != 0 ? null : function1);
|
||||
}
|
||||
|
||||
public ConflatedBufferedChannel(int i, BufferOverflow bufferOverflow, Function1<? super E, Unit> function1) {
|
||||
super(i, function1);
|
||||
this.capacity = i;
|
||||
this.onBufferOverflow = bufferOverflow;
|
||||
if (bufferOverflow == BufferOverflow.SUSPEND) {
|
||||
throw new IllegalArgumentException(("This implementation does not support suspension for senders, use " + Reflection.getOrCreateKotlinClass(BufferedChannel.class).getSimpleName() + " instead").toString());
|
||||
}
|
||||
if (i >= 1) {
|
||||
return;
|
||||
}
|
||||
throw new IllegalArgumentException(("Buffered channel capacity must be at least 1, but " + i + " was specified").toString());
|
||||
}
|
||||
|
||||
@Override // kotlinx.coroutines.channels.BufferedChannel
|
||||
protected boolean isConflatedDropOldest() {
|
||||
return this.onBufferOverflow == BufferOverflow.DROP_OLDEST;
|
||||
}
|
||||
|
||||
static /* synthetic */ <E> Object send$suspendImpl(ConflatedBufferedChannel<E> conflatedBufferedChannel, E e, Continuation<? super Unit> continuation) {
|
||||
UndeliveredElementException callUndeliveredElementCatchingException$default;
|
||||
Object m1880trySendImplMj0NB7M = conflatedBufferedChannel.m1880trySendImplMj0NB7M(e, true);
|
||||
if (m1880trySendImplMj0NB7M instanceof ChannelResult.Closed) {
|
||||
ChannelResult.m1866exceptionOrNullimpl(m1880trySendImplMj0NB7M);
|
||||
Function1<E, Unit> function1 = conflatedBufferedChannel.onUndeliveredElement;
|
||||
if (function1 != null && (callUndeliveredElementCatchingException$default = OnUndeliveredElementKt.callUndeliveredElementCatchingException$default(function1, e, null, 2, null)) != null) {
|
||||
ExceptionsKt.addSuppressed(callUndeliveredElementCatchingException$default, conflatedBufferedChannel.getSendException());
|
||||
throw callUndeliveredElementCatchingException$default;
|
||||
}
|
||||
throw conflatedBufferedChannel.getSendException();
|
||||
}
|
||||
return Unit.INSTANCE;
|
||||
}
|
||||
|
||||
static /* synthetic */ <E> Object sendBroadcast$suspendImpl(ConflatedBufferedChannel<E> conflatedBufferedChannel, E e, Continuation<? super Boolean> continuation) {
|
||||
Object m1880trySendImplMj0NB7M = conflatedBufferedChannel.m1880trySendImplMj0NB7M(e, true);
|
||||
if (!(m1880trySendImplMj0NB7M instanceof ChannelResult.Failed)) {
|
||||
return Boxing.boxBoolean(true);
|
||||
}
|
||||
return Boxing.boxBoolean(false);
|
||||
}
|
||||
|
||||
@Override // kotlinx.coroutines.channels.BufferedChannel, kotlinx.coroutines.channels.SendChannel
|
||||
/* renamed from: trySend-JP2dKIU */
|
||||
public Object mo1852trySendJP2dKIU(E element) {
|
||||
return m1880trySendImplMj0NB7M(element, false);
|
||||
}
|
||||
|
||||
/* renamed from: trySendImpl-Mj0NB7M, reason: not valid java name */
|
||||
private final Object m1880trySendImplMj0NB7M(E element, boolean isSendOp) {
|
||||
return this.onBufferOverflow == BufferOverflow.DROP_LATEST ? m1878trySendDropLatestMj0NB7M(element, isSendOp) : m1879trySendDropOldestJP2dKIU(element);
|
||||
}
|
||||
|
||||
/* renamed from: trySendDropLatest-Mj0NB7M, reason: not valid java name */
|
||||
private final Object m1878trySendDropLatestMj0NB7M(E element, boolean isSendOp) {
|
||||
Function1<E, Unit> function1;
|
||||
UndeliveredElementException callUndeliveredElementCatchingException$default;
|
||||
Object mo1852trySendJP2dKIU = super.mo1852trySendJP2dKIU(element);
|
||||
if (ChannelResult.m1872isSuccessimpl(mo1852trySendJP2dKIU) || ChannelResult.m1870isClosedimpl(mo1852trySendJP2dKIU)) {
|
||||
return mo1852trySendJP2dKIU;
|
||||
}
|
||||
if (isSendOp && (function1 = this.onUndeliveredElement) != null && (callUndeliveredElementCatchingException$default = OnUndeliveredElementKt.callUndeliveredElementCatchingException$default(function1, element, null, 2, null)) != null) {
|
||||
throw callUndeliveredElementCatchingException$default;
|
||||
}
|
||||
return ChannelResult.INSTANCE.m1877successJP2dKIU(Unit.INSTANCE);
|
||||
}
|
||||
|
||||
/* renamed from: trySendDropOldest-JP2dKIU, reason: not valid java name */
|
||||
private final Object m1879trySendDropOldestJP2dKIU(E element) {
|
||||
ChannelSegment channelSegment;
|
||||
Object obj = BufferedChannelKt.BUFFERED;
|
||||
ConflatedBufferedChannel<E> conflatedBufferedChannel = this;
|
||||
ChannelSegment channelSegment2 = (ChannelSegment) BufferedChannel.sendSegment$FU.get(conflatedBufferedChannel);
|
||||
while (true) {
|
||||
long andIncrement = BufferedChannel.sendersAndCloseStatus$FU.getAndIncrement(conflatedBufferedChannel);
|
||||
long j = andIncrement & 1152921504606846975L;
|
||||
boolean isClosedForSend0 = conflatedBufferedChannel.isClosedForSend0(andIncrement);
|
||||
long j2 = j / BufferedChannelKt.SEGMENT_SIZE;
|
||||
int i = (int) (j % BufferedChannelKt.SEGMENT_SIZE);
|
||||
if (channelSegment2.id != j2) {
|
||||
ChannelSegment findSegmentSend = conflatedBufferedChannel.findSegmentSend(j2, channelSegment2);
|
||||
if (findSegmentSend != null) {
|
||||
channelSegment = findSegmentSend;
|
||||
} else if (isClosedForSend0) {
|
||||
return ChannelResult.INSTANCE.m1875closedJP2dKIU(getSendException());
|
||||
}
|
||||
} else {
|
||||
channelSegment = channelSegment2;
|
||||
}
|
||||
int updateCellSend = conflatedBufferedChannel.updateCellSend(channelSegment, i, element, j, obj, isClosedForSend0);
|
||||
if (updateCellSend == 0) {
|
||||
channelSegment.cleanPrev();
|
||||
return ChannelResult.INSTANCE.m1877successJP2dKIU(Unit.INSTANCE);
|
||||
}
|
||||
if (updateCellSend == 1) {
|
||||
return ChannelResult.INSTANCE.m1877successJP2dKIU(Unit.INSTANCE);
|
||||
}
|
||||
if (updateCellSend == 2) {
|
||||
if (isClosedForSend0) {
|
||||
channelSegment.onSlotCleaned();
|
||||
return ChannelResult.INSTANCE.m1875closedJP2dKIU(getSendException());
|
||||
}
|
||||
Waiter waiter = obj instanceof Waiter ? (Waiter) obj : null;
|
||||
if (waiter != null) {
|
||||
conflatedBufferedChannel.prepareSenderForSuspension(waiter, channelSegment, i);
|
||||
}
|
||||
dropFirstElementUntilTheSpecifiedCellIsInTheBuffer((channelSegment.id * BufferedChannelKt.SEGMENT_SIZE) + i);
|
||||
return ChannelResult.INSTANCE.m1877successJP2dKIU(Unit.INSTANCE);
|
||||
}
|
||||
if (updateCellSend == 3) {
|
||||
throw new IllegalStateException("unexpected".toString());
|
||||
}
|
||||
if (updateCellSend == 4) {
|
||||
if (j < conflatedBufferedChannel.getReceiversCounter$kotlinx_coroutines_core()) {
|
||||
channelSegment.cleanPrev();
|
||||
}
|
||||
return ChannelResult.INSTANCE.m1875closedJP2dKIU(getSendException());
|
||||
}
|
||||
if (updateCellSend == 5) {
|
||||
channelSegment.cleanPrev();
|
||||
}
|
||||
channelSegment2 = channelSegment;
|
||||
}
|
||||
}
|
||||
|
||||
/* JADX WARN: Multi-variable type inference failed */
|
||||
@Override // kotlinx.coroutines.channels.BufferedChannel
|
||||
protected void registerSelectForSend(SelectInstance<?> select, Object element) {
|
||||
Object mo1852trySendJP2dKIU = mo1852trySendJP2dKIU(element);
|
||||
if (!(mo1852trySendJP2dKIU instanceof ChannelResult.Failed)) {
|
||||
select.selectInRegistrationPhase(Unit.INSTANCE);
|
||||
} else {
|
||||
if (!(mo1852trySendJP2dKIU instanceof ChannelResult.Closed)) {
|
||||
throw new IllegalStateException("unreachable".toString());
|
||||
}
|
||||
ChannelResult.m1866exceptionOrNullimpl(mo1852trySendJP2dKIU);
|
||||
select.selectInRegistrationPhase(BufferedChannelKt.getCHANNEL_CLOSED());
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,29 @@
|
||||
package kotlinx.coroutines.channels;
|
||||
|
||||
import kotlin.Metadata;
|
||||
import kotlin.Unit;
|
||||
import kotlin.jvm.functions.Function3;
|
||||
import kotlin.jvm.internal.FunctionReferenceImpl;
|
||||
import kotlinx.coroutines.selects.SelectInstance;
|
||||
|
||||
/* compiled from: Actor.kt */
|
||||
@Metadata(k = 3, mv = {1, 8, 0}, xi = 48)
|
||||
/* loaded from: classes.dex */
|
||||
/* synthetic */ class LazyActorCoroutine$onSend$1 extends FunctionReferenceImpl implements Function3<LazyActorCoroutine<?>, SelectInstance<?>, Object, Unit> {
|
||||
public static final LazyActorCoroutine$onSend$1 INSTANCE = new LazyActorCoroutine$onSend$1();
|
||||
|
||||
LazyActorCoroutine$onSend$1() {
|
||||
super(3, LazyActorCoroutine.class, "onSendRegFunction", "onSendRegFunction(Lkotlinx/coroutines/selects/SelectInstance;Ljava/lang/Object;)V", 0);
|
||||
}
|
||||
|
||||
@Override // kotlin.jvm.functions.Function3
|
||||
public /* bridge */ /* synthetic */ Unit invoke(LazyActorCoroutine<?> lazyActorCoroutine, SelectInstance<?> selectInstance, Object obj) {
|
||||
invoke2(lazyActorCoroutine, selectInstance, obj);
|
||||
return Unit.INSTANCE;
|
||||
}
|
||||
|
||||
/* renamed from: invoke, reason: avoid collision after fix types in other method */
|
||||
public final void invoke2(LazyActorCoroutine<?> lazyActorCoroutine, SelectInstance<?> selectInstance, Object obj) {
|
||||
lazyActorCoroutine.onSendRegFunction(selectInstance, obj);
|
||||
}
|
||||
}
|
@ -0,0 +1,79 @@
|
||||
package kotlinx.coroutines.channels;
|
||||
|
||||
import kotlin.Deprecated;
|
||||
import kotlin.DeprecationLevel;
|
||||
import kotlin.Metadata;
|
||||
import kotlin.ReplaceWith;
|
||||
import kotlin.Unit;
|
||||
import kotlin.coroutines.Continuation;
|
||||
import kotlin.coroutines.CoroutineContext;
|
||||
import kotlin.coroutines.intrinsics.IntrinsicsKt;
|
||||
import kotlin.jvm.functions.Function2;
|
||||
import kotlin.jvm.functions.Function3;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
import kotlin.jvm.internal.TypeIntrinsics;
|
||||
import kotlinx.coroutines.intrinsics.CancellableKt;
|
||||
import kotlinx.coroutines.selects.SelectClause2;
|
||||
import kotlinx.coroutines.selects.SelectClause2Impl;
|
||||
import kotlinx.coroutines.selects.SelectInstance;
|
||||
|
||||
/* compiled from: Actor.kt */
|
||||
@Metadata(d1 = {"\u0000^\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0010\u0002\n\u0002\u0010\u0000\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0010\u000b\n\u0000\n\u0002\u0010\u0003\n\u0002\b\u0005\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0002\b\u0003\b\u0002\u0018\u0000*\u0004\b\u0000\u0010\u00012\b\u0012\u0004\u0012\u0002H\u00010\u0002BM\u0012\u0006\u0010\u0003\u001a\u00020\u0004\u0012\f\u0010\u0005\u001a\b\u0012\u0004\u0012\u00028\u00000\u0006\u0012-\u0010\u0007\u001a)\b\u0001\u0012\n\u0012\b\u0012\u0004\u0012\u00028\u00000\t\u0012\n\u0012\b\u0012\u0004\u0012\u00020\u000b0\n\u0012\u0006\u0012\u0004\u0018\u00010\f0\b¢\u0006\u0002\b\rø\u0001\u0000¢\u0006\u0002\u0010\u000eJ\u0012\u0010\u0017\u001a\u00020\u00182\b\u0010\u0019\u001a\u0004\u0018\u00010\u001aH\u0016J\u0015\u0010\u001b\u001a\u00020\u00182\u0006\u0010\u001c\u001a\u00028\u0000H\u0017¢\u0006\u0002\u0010\u001dJ\u001e\u0010\u001e\u001a\u00020\u000b2\n\u0010\u001f\u001a\u0006\u0012\u0002\b\u00030 2\b\u0010\u001c\u001a\u0004\u0018\u00010\fH\u0002J\b\u0010!\u001a\u00020\u000bH\u0014J\u0019\u0010\"\u001a\u00020\u000b2\u0006\u0010\u001c\u001a\u00028\u0000H\u0096@ø\u0001\u0000¢\u0006\u0002\u0010#J&\u0010$\u001a\b\u0012\u0004\u0012\u00020\u000b0%2\u0006\u0010\u001c\u001a\u00028\u0000H\u0016ø\u0001\u0001ø\u0001\u0002ø\u0001\u0000¢\u0006\u0004\b&\u0010'R\u0014\u0010\u000f\u001a\b\u0012\u0004\u0012\u00020\u000b0\nX\u0082\u000e¢\u0006\u0002\n\u0000R,\u0010\u0010\u001a\u0014\u0012\u0004\u0012\u00028\u0000\u0012\n\u0012\b\u0012\u0004\u0012\u00028\u00000\u00120\u00118VX\u0096\u0004¢\u0006\f\u0012\u0004\b\u0013\u0010\u0014\u001a\u0004\b\u0015\u0010\u0016\u0082\u0002\u000f\n\u0002\b\u0019\n\u0002\b!\n\u0005\b¡\u001e0\u0001¨\u0006("}, d2 = {"Lkotlinx/coroutines/channels/LazyActorCoroutine;", "E", "Lkotlinx/coroutines/channels/ActorCoroutine;", "parentContext", "Lkotlin/coroutines/CoroutineContext;", "channel", "Lkotlinx/coroutines/channels/Channel;", "block", "Lkotlin/Function2;", "Lkotlinx/coroutines/channels/ActorScope;", "Lkotlin/coroutines/Continuation;", "", "", "Lkotlin/ExtensionFunctionType;", "(Lkotlin/coroutines/CoroutineContext;Lkotlinx/coroutines/channels/Channel;Lkotlin/jvm/functions/Function2;)V", "continuation", "onSend", "Lkotlinx/coroutines/selects/SelectClause2;", "Lkotlinx/coroutines/channels/SendChannel;", "getOnSend$annotations", "()V", "getOnSend", "()Lkotlinx/coroutines/selects/SelectClause2;", "close", "", "cause", "", "offer", "element", "(Ljava/lang/Object;)Z", "onSendRegFunction", "select", "Lkotlinx/coroutines/selects/SelectInstance;", "onStart", "send", "(Ljava/lang/Object;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;", "trySend", "Lkotlinx/coroutines/channels/ChannelResult;", "trySend-JP2dKIU", "(Ljava/lang/Object;)Ljava/lang/Object;", "kotlinx-coroutines-core"}, k = 1, mv = {1, 8, 0}, xi = 48)
|
||||
/* loaded from: classes.dex */
|
||||
final class LazyActorCoroutine<E> extends ActorCoroutine<E> {
|
||||
private Continuation<? super Unit> continuation;
|
||||
|
||||
public static /* synthetic */ void getOnSend$annotations() {
|
||||
}
|
||||
|
||||
public LazyActorCoroutine(CoroutineContext coroutineContext, Channel<E> channel, Function2<? super ActorScope<E>, ? super Continuation<? super Unit>, ? extends Object> function2) {
|
||||
super(coroutineContext, channel, false);
|
||||
this.continuation = IntrinsicsKt.createCoroutineUnintercepted(function2, this, this);
|
||||
}
|
||||
|
||||
@Override // kotlinx.coroutines.JobSupport
|
||||
protected void onStart() {
|
||||
CancellableKt.startCoroutineCancellable(this.continuation, this);
|
||||
}
|
||||
|
||||
@Override // kotlinx.coroutines.channels.ChannelCoroutine, kotlinx.coroutines.channels.SendChannel
|
||||
public Object send(E e, Continuation<? super Unit> continuation) {
|
||||
start();
|
||||
Object send = super.send(e, continuation);
|
||||
return send == IntrinsicsKt.getCOROUTINE_SUSPENDED() ? send : Unit.INSTANCE;
|
||||
}
|
||||
|
||||
@Override // kotlinx.coroutines.channels.ChannelCoroutine, kotlinx.coroutines.channels.SendChannel
|
||||
@Deprecated(level = DeprecationLevel.ERROR, message = "Deprecated in the favour of 'trySend' method", replaceWith = @ReplaceWith(expression = "trySend(element).isSuccess", imports = {}))
|
||||
public boolean offer(E element) {
|
||||
start();
|
||||
return super.offer(element);
|
||||
}
|
||||
|
||||
@Override // kotlinx.coroutines.channels.ChannelCoroutine, kotlinx.coroutines.channels.SendChannel
|
||||
/* renamed from: trySend-JP2dKIU */
|
||||
public Object mo1852trySendJP2dKIU(E element) {
|
||||
start();
|
||||
return super.mo1852trySendJP2dKIU(element);
|
||||
}
|
||||
|
||||
@Override // kotlinx.coroutines.channels.ChannelCoroutine, kotlinx.coroutines.channels.SendChannel
|
||||
public boolean close(Throwable cause) {
|
||||
boolean close = super.close(cause);
|
||||
start();
|
||||
return close;
|
||||
}
|
||||
|
||||
@Override // kotlinx.coroutines.channels.ChannelCoroutine, kotlinx.coroutines.channels.SendChannel
|
||||
public SelectClause2<E, SendChannel<E>> getOnSend() {
|
||||
LazyActorCoroutine$onSend$1 lazyActorCoroutine$onSend$1 = LazyActorCoroutine$onSend$1.INSTANCE;
|
||||
Intrinsics.checkNotNull(lazyActorCoroutine$onSend$1, "null cannot be cast to non-null type kotlin.Function3<@[ParameterName(name = 'clauseObject')] kotlin.Any, @[ParameterName(name = 'select')] kotlinx.coroutines.selects.SelectInstance<*>, @[ParameterName(name = 'param')] kotlin.Any?, kotlin.Unit>{ kotlinx.coroutines.selects.SelectKt.RegistrationFunction }");
|
||||
return new SelectClause2Impl(this, (Function3) TypeIntrinsics.beforeCheckcastToFunctionOfArity(lazyActorCoroutine$onSend$1, 3), super.getOnSend().getProcessResFunc(), null, 8, null);
|
||||
}
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: private */
|
||||
public final void onSendRegFunction(SelectInstance<?> select, Object element) {
|
||||
onStart();
|
||||
super.getOnSend().getRegFunc().invoke(this, select, element);
|
||||
}
|
||||
}
|
@ -0,0 +1,33 @@
|
||||
package kotlinx.coroutines.channels;
|
||||
|
||||
import kotlin.Metadata;
|
||||
import kotlin.Unit;
|
||||
import kotlin.coroutines.Continuation;
|
||||
import kotlin.coroutines.CoroutineContext;
|
||||
import kotlin.coroutines.intrinsics.IntrinsicsKt;
|
||||
import kotlin.jvm.functions.Function2;
|
||||
import kotlinx.coroutines.intrinsics.CancellableKt;
|
||||
|
||||
/* compiled from: Broadcast.kt */
|
||||
@Metadata(d1 = {"\u0000:\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0010\u0002\n\u0002\u0010\u0000\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0000\b\u0002\u0018\u0000*\u0004\b\u0000\u0010\u00012\b\u0012\u0004\u0012\u0002H\u00010\u0002BM\u0012\u0006\u0010\u0003\u001a\u00020\u0004\u0012\f\u0010\u0005\u001a\b\u0012\u0004\u0012\u00028\u00000\u0006\u0012-\u0010\u0007\u001a)\b\u0001\u0012\n\u0012\b\u0012\u0004\u0012\u00028\u00000\t\u0012\n\u0012\b\u0012\u0004\u0012\u00020\u000b0\n\u0012\u0006\u0012\u0004\u0018\u00010\f0\b¢\u0006\u0002\b\rø\u0001\u0000¢\u0006\u0002\u0010\u000eJ\b\u0010\u0010\u001a\u00020\u000bH\u0014J\u000e\u0010\u0011\u001a\b\u0012\u0004\u0012\u00028\u00000\u0012H\u0016R\u0014\u0010\u000f\u001a\b\u0012\u0004\u0012\u00020\u000b0\nX\u0082\u0004¢\u0006\u0002\n\u0000\u0082\u0002\u0004\n\u0002\b\u0019¨\u0006\u0013"}, d2 = {"Lkotlinx/coroutines/channels/LazyBroadcastCoroutine;", "E", "Lkotlinx/coroutines/channels/BroadcastCoroutine;", "parentContext", "Lkotlin/coroutines/CoroutineContext;", "channel", "Lkotlinx/coroutines/channels/BroadcastChannel;", "block", "Lkotlin/Function2;", "Lkotlinx/coroutines/channels/ProducerScope;", "Lkotlin/coroutines/Continuation;", "", "", "Lkotlin/ExtensionFunctionType;", "(Lkotlin/coroutines/CoroutineContext;Lkotlinx/coroutines/channels/BroadcastChannel;Lkotlin/jvm/functions/Function2;)V", "continuation", "onStart", "openSubscription", "Lkotlinx/coroutines/channels/ReceiveChannel;", "kotlinx-coroutines-core"}, k = 1, mv = {1, 8, 0}, xi = 48)
|
||||
/* loaded from: classes.dex */
|
||||
final class LazyBroadcastCoroutine<E> extends BroadcastCoroutine<E> {
|
||||
private final Continuation<Unit> continuation;
|
||||
|
||||
public LazyBroadcastCoroutine(CoroutineContext coroutineContext, BroadcastChannel<E> broadcastChannel, Function2<? super ProducerScope<? super E>, ? super Continuation<? super Unit>, ? extends Object> function2) {
|
||||
super(coroutineContext, broadcastChannel, false);
|
||||
this.continuation = IntrinsicsKt.createCoroutineUnintercepted(function2, this, this);
|
||||
}
|
||||
|
||||
@Override // kotlinx.coroutines.channels.BroadcastCoroutine, kotlinx.coroutines.channels.BroadcastChannel
|
||||
public ReceiveChannel<E> openSubscription() {
|
||||
ReceiveChannel<E> openSubscription = get_channel().openSubscription();
|
||||
start();
|
||||
return openSubscription;
|
||||
}
|
||||
|
||||
@Override // kotlinx.coroutines.JobSupport
|
||||
protected void onStart() {
|
||||
CancellableKt.startCoroutineCancellable(this.continuation, this);
|
||||
}
|
||||
}
|
@ -0,0 +1,28 @@
|
||||
package kotlinx.coroutines.channels;
|
||||
|
||||
import kotlin.Metadata;
|
||||
import kotlin.coroutines.Continuation;
|
||||
import kotlin.coroutines.jvm.internal.ContinuationImpl;
|
||||
import kotlin.coroutines.jvm.internal.DebugMetadata;
|
||||
|
||||
/* compiled from: Produce.kt */
|
||||
@Metadata(k = 3, mv = {1, 8, 0}, xi = 48)
|
||||
@DebugMetadata(c = "kotlinx.coroutines.channels.ProduceKt", f = "Produce.kt", i = {0, 0}, l = {153}, m = "awaitClose", n = {"$this$awaitClose", "block"}, s = {"L$0", "L$1"})
|
||||
/* loaded from: classes.dex */
|
||||
final class ProduceKt$awaitClose$1 extends ContinuationImpl {
|
||||
Object L$0;
|
||||
Object L$1;
|
||||
int label;
|
||||
/* synthetic */ Object result;
|
||||
|
||||
ProduceKt$awaitClose$1(Continuation<? super ProduceKt$awaitClose$1> continuation) {
|
||||
super(continuation);
|
||||
}
|
||||
|
||||
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
||||
public final Object invokeSuspend(Object obj) {
|
||||
this.result = obj;
|
||||
this.label |= Integer.MIN_VALUE;
|
||||
return ProduceKt.awaitClose(null, null, this);
|
||||
}
|
||||
}
|
190
02-Easy5/E5/sources/kotlinx/coroutines/channels/ProduceKt.java
Normal file
190
02-Easy5/E5/sources/kotlinx/coroutines/channels/ProduceKt.java
Normal file
@ -0,0 +1,190 @@
|
||||
package kotlinx.coroutines.channels;
|
||||
|
||||
import kotlin.Metadata;
|
||||
import kotlin.Unit;
|
||||
import kotlin.coroutines.Continuation;
|
||||
import kotlin.coroutines.CoroutineContext;
|
||||
import kotlin.coroutines.EmptyCoroutineContext;
|
||||
import kotlin.jvm.functions.Function0;
|
||||
import kotlin.jvm.functions.Function1;
|
||||
import kotlin.jvm.functions.Function2;
|
||||
import kotlinx.coroutines.CoroutineContextKt;
|
||||
import kotlinx.coroutines.CoroutineScope;
|
||||
import kotlinx.coroutines.CoroutineStart;
|
||||
|
||||
/* compiled from: Produce.kt */
|
||||
@Metadata(d1 = {"\u0000b\n\u0000\n\u0002\u0010\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\b\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0010\u0003\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0003\u001a)\u0010\u0000\u001a\u00020\u0001*\u0006\u0012\u0002\b\u00030\u00022\u000e\b\u0002\u0010\u0003\u001a\b\u0012\u0004\u0012\u00020\u00010\u0004H\u0086@ø\u0001\u0000¢\u0006\u0002\u0010\u0005\u001a\u009e\u0001\u0010\u0006\u001a\b\u0012\u0004\u0012\u0002H\b0\u0007\"\u0004\b\u0000\u0010\b*\u00020\t2\b\b\u0002\u0010\n\u001a\u00020\u000b2\b\b\u0002\u0010\f\u001a\u00020\r2\b\b\u0002\u0010\u000e\u001a\u00020\u000f2-\b\u0002\u0010\u0010\u001a'\u0012\u0015\u0012\u0013\u0018\u00010\u0012¢\u0006\f\b\u0013\u0012\b\b\u0014\u0012\u0004\b\b(\u0015\u0012\u0004\u0012\u00020\u0001\u0018\u00010\u0011j\u0004\u0018\u0001`\u00162/\b\u0001\u0010\u0003\u001a)\b\u0001\u0012\n\u0012\b\u0012\u0004\u0012\u0002H\b0\u0002\u0012\n\u0012\b\u0012\u0004\u0012\u00020\u00010\u0018\u0012\u0006\u0012\u0004\u0018\u00010\u00190\u0017¢\u0006\u0002\b\u001aH\u0007ø\u0001\u0000¢\u0006\u0002\u0010\u001b\u001a¨\u0001\u0010\u0006\u001a\b\u0012\u0004\u0012\u0002H\b0\u0007\"\u0004\b\u0000\u0010\b*\u00020\t2\b\b\u0002\u0010\n\u001a\u00020\u000b2\b\b\u0002\u0010\f\u001a\u00020\r2\b\b\u0002\u0010\u001c\u001a\u00020\u001d2\b\b\u0002\u0010\u000e\u001a\u00020\u000f2-\b\u0002\u0010\u0010\u001a'\u0012\u0015\u0012\u0013\u0018\u00010\u0012¢\u0006\f\b\u0013\u0012\b\b\u0014\u0012\u0004\b\b(\u0015\u0012\u0004\u0012\u00020\u0001\u0018\u00010\u0011j\u0004\u0018\u0001`\u00162/\b\u0001\u0010\u0003\u001a)\b\u0001\u0012\n\u0012\b\u0012\u0004\u0012\u0002H\b0\u0002\u0012\n\u0012\b\u0012\u0004\u0012\u00020\u00010\u0018\u0012\u0006\u0012\u0004\u0018\u00010\u00190\u0017¢\u0006\u0002\b\u001aH\u0000ø\u0001\u0000¢\u0006\u0002\u0010\u001e\u001ae\u0010\u0006\u001a\b\u0012\u0004\u0012\u0002H\b0\u0007\"\u0004\b\u0000\u0010\b*\u00020\t2\b\b\u0002\u0010\n\u001a\u00020\u000b2\b\b\u0002\u0010\f\u001a\u00020\r2/\b\u0001\u0010\u0003\u001a)\b\u0001\u0012\n\u0012\b\u0012\u0004\u0012\u0002H\b0\u0002\u0012\n\u0012\b\u0012\u0004\u0012\u00020\u00010\u0018\u0012\u0006\u0012\u0004\u0018\u00010\u00190\u0017¢\u0006\u0002\b\u001aH\u0007ø\u0001\u0000¢\u0006\u0002\u0010\u001f\u0082\u0002\u0004\n\u0002\b\u0019¨\u0006 "}, d2 = {"awaitClose", "", "Lkotlinx/coroutines/channels/ProducerScope;", "block", "Lkotlin/Function0;", "(Lkotlinx/coroutines/channels/ProducerScope;Lkotlin/jvm/functions/Function0;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;", "produce", "Lkotlinx/coroutines/channels/ReceiveChannel;", "E", "Lkotlinx/coroutines/CoroutineScope;", "context", "Lkotlin/coroutines/CoroutineContext;", "capacity", "", "start", "Lkotlinx/coroutines/CoroutineStart;", "onCompletion", "Lkotlin/Function1;", "", "Lkotlin/ParameterName;", "name", "cause", "Lkotlinx/coroutines/CompletionHandler;", "Lkotlin/Function2;", "Lkotlin/coroutines/Continuation;", "", "Lkotlin/ExtensionFunctionType;", "(Lkotlinx/coroutines/CoroutineScope;Lkotlin/coroutines/CoroutineContext;ILkotlinx/coroutines/CoroutineStart;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/channels/ReceiveChannel;", "onBufferOverflow", "Lkotlinx/coroutines/channels/BufferOverflow;", "(Lkotlinx/coroutines/CoroutineScope;Lkotlin/coroutines/CoroutineContext;ILkotlinx/coroutines/channels/BufferOverflow;Lkotlinx/coroutines/CoroutineStart;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/channels/ReceiveChannel;", "(Lkotlinx/coroutines/CoroutineScope;Lkotlin/coroutines/CoroutineContext;ILkotlin/jvm/functions/Function2;)Lkotlinx/coroutines/channels/ReceiveChannel;", "kotlinx-coroutines-core"}, k = 2, mv = {1, 8, 0}, xi = 48)
|
||||
/* loaded from: classes.dex */
|
||||
public final class ProduceKt {
|
||||
/* JADX WARN: Removed duplicated region for block: B:17:0x003d */
|
||||
/* JADX WARN: Removed duplicated region for block: B:9:0x0024 */
|
||||
/*
|
||||
Code decompiled incorrectly, please refer to instructions dump.
|
||||
To view partially-correct add '--show-bad-code' argument
|
||||
*/
|
||||
public static final java.lang.Object awaitClose(kotlinx.coroutines.channels.ProducerScope<?> r4, kotlin.jvm.functions.Function0<kotlin.Unit> r5, kotlin.coroutines.Continuation<? super kotlin.Unit> r6) {
|
||||
/*
|
||||
boolean r0 = r6 instanceof kotlinx.coroutines.channels.ProduceKt$awaitClose$1
|
||||
if (r0 == 0) goto L14
|
||||
r0 = r6
|
||||
kotlinx.coroutines.channels.ProduceKt$awaitClose$1 r0 = (kotlinx.coroutines.channels.ProduceKt$awaitClose$1) r0
|
||||
int r1 = r0.label
|
||||
r2 = -2147483648(0xffffffff80000000, float:-0.0)
|
||||
r1 = r1 & r2
|
||||
if (r1 == 0) goto L14
|
||||
int r6 = r0.label
|
||||
int r6 = r6 - r2
|
||||
r0.label = r6
|
||||
goto L19
|
||||
L14:
|
||||
kotlinx.coroutines.channels.ProduceKt$awaitClose$1 r0 = new kotlinx.coroutines.channels.ProduceKt$awaitClose$1
|
||||
r0.<init>(r6)
|
||||
L19:
|
||||
java.lang.Object r6 = r0.result
|
||||
java.lang.Object r1 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED()
|
||||
int r2 = r0.label
|
||||
r3 = 1
|
||||
if (r2 == 0) goto L3d
|
||||
if (r2 != r3) goto L35
|
||||
java.lang.Object r4 = r0.L$1
|
||||
r5 = r4
|
||||
kotlin.jvm.functions.Function0 r5 = (kotlin.jvm.functions.Function0) r5
|
||||
java.lang.Object r4 = r0.L$0
|
||||
kotlinx.coroutines.channels.ProducerScope r4 = (kotlinx.coroutines.channels.ProducerScope) r4
|
||||
kotlin.ResultKt.throwOnFailure(r6) // Catch: java.lang.Throwable -> L33
|
||||
goto L82
|
||||
L33:
|
||||
r4 = move-exception
|
||||
goto L88
|
||||
L35:
|
||||
java.lang.IllegalStateException r4 = new java.lang.IllegalStateException
|
||||
java.lang.String r5 = "call to 'resume' before 'invoke' with coroutine"
|
||||
r4.<init>(r5)
|
||||
throw r4
|
||||
L3d:
|
||||
kotlin.ResultKt.throwOnFailure(r6)
|
||||
kotlin.coroutines.CoroutineContext r6 = r0.get$context()
|
||||
kotlinx.coroutines.Job$Key r2 = kotlinx.coroutines.Job.INSTANCE
|
||||
kotlin.coroutines.CoroutineContext$Key r2 = (kotlin.coroutines.CoroutineContext.Key) r2
|
||||
kotlin.coroutines.CoroutineContext$Element r6 = r6.get(r2)
|
||||
if (r6 != r4) goto L8c
|
||||
r0.L$0 = r4 // Catch: java.lang.Throwable -> L33
|
||||
r0.L$1 = r5 // Catch: java.lang.Throwable -> L33
|
||||
r0.label = r3 // Catch: java.lang.Throwable -> L33
|
||||
r6 = r0
|
||||
kotlin.coroutines.Continuation r6 = (kotlin.coroutines.Continuation) r6 // Catch: java.lang.Throwable -> L33
|
||||
kotlinx.coroutines.CancellableContinuationImpl r2 = new kotlinx.coroutines.CancellableContinuationImpl // Catch: java.lang.Throwable -> L33
|
||||
kotlin.coroutines.Continuation r6 = kotlin.coroutines.intrinsics.IntrinsicsKt.intercepted(r6) // Catch: java.lang.Throwable -> L33
|
||||
r2.<init>(r6, r3) // Catch: java.lang.Throwable -> L33
|
||||
r2.initCancellability() // Catch: java.lang.Throwable -> L33
|
||||
r6 = r2
|
||||
kotlinx.coroutines.CancellableContinuation r6 = (kotlinx.coroutines.CancellableContinuation) r6 // Catch: java.lang.Throwable -> L33
|
||||
kotlinx.coroutines.channels.ProduceKt$awaitClose$4$1 r3 = new kotlinx.coroutines.channels.ProduceKt$awaitClose$4$1 // Catch: java.lang.Throwable -> L33
|
||||
r3.<init>() // Catch: java.lang.Throwable -> L33
|
||||
kotlin.jvm.functions.Function1 r3 = (kotlin.jvm.functions.Function1) r3 // Catch: java.lang.Throwable -> L33
|
||||
r4.invokeOnClose(r3) // Catch: java.lang.Throwable -> L33
|
||||
java.lang.Object r4 = r2.getResult() // Catch: java.lang.Throwable -> L33
|
||||
java.lang.Object r6 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED() // Catch: java.lang.Throwable -> L33
|
||||
if (r4 != r6) goto L7f
|
||||
kotlin.coroutines.Continuation r0 = (kotlin.coroutines.Continuation) r0 // Catch: java.lang.Throwable -> L33
|
||||
kotlin.coroutines.jvm.internal.DebugProbesKt.probeCoroutineSuspended(r0) // Catch: java.lang.Throwable -> L33
|
||||
L7f:
|
||||
if (r4 != r1) goto L82
|
||||
return r1
|
||||
L82:
|
||||
r5.invoke()
|
||||
kotlin.Unit r4 = kotlin.Unit.INSTANCE
|
||||
return r4
|
||||
L88:
|
||||
r5.invoke()
|
||||
throw r4
|
||||
L8c:
|
||||
java.lang.IllegalStateException r4 = new java.lang.IllegalStateException
|
||||
java.lang.String r5 = "awaitClose() can only be invoked from the producer context"
|
||||
java.lang.String r5 = r5.toString()
|
||||
r4.<init>(r5)
|
||||
throw r4
|
||||
*/
|
||||
throw new UnsupportedOperationException("Method not decompiled: kotlinx.coroutines.channels.ProduceKt.awaitClose(kotlinx.coroutines.channels.ProducerScope, kotlin.jvm.functions.Function0, kotlin.coroutines.Continuation):java.lang.Object");
|
||||
}
|
||||
|
||||
public static /* synthetic */ Object awaitClose$default(ProducerScope producerScope, Function0 function0, Continuation continuation, int i, Object obj) {
|
||||
if ((i & 1) != 0) {
|
||||
function0 = new Function0<Unit>() { // from class: kotlinx.coroutines.channels.ProduceKt$awaitClose$2
|
||||
/* renamed from: invoke, reason: avoid collision after fix types in other method */
|
||||
public final void invoke2() {
|
||||
}
|
||||
|
||||
@Override // kotlin.jvm.functions.Function0
|
||||
public /* bridge */ /* synthetic */ Unit invoke() {
|
||||
invoke2();
|
||||
return Unit.INSTANCE;
|
||||
}
|
||||
};
|
||||
}
|
||||
return awaitClose(producerScope, function0, continuation);
|
||||
}
|
||||
|
||||
public static /* synthetic */ ReceiveChannel produce$default(CoroutineScope coroutineScope, CoroutineContext coroutineContext, int i, Function2 function2, int i2, Object obj) {
|
||||
if ((i2 & 1) != 0) {
|
||||
coroutineContext = EmptyCoroutineContext.INSTANCE;
|
||||
}
|
||||
if ((i2 & 2) != 0) {
|
||||
i = 0;
|
||||
}
|
||||
return produce(coroutineScope, coroutineContext, i, function2);
|
||||
}
|
||||
|
||||
public static final <E> ReceiveChannel<E> produce(CoroutineScope coroutineScope, CoroutineContext coroutineContext, int i, Function2<? super ProducerScope<? super E>, ? super Continuation<? super Unit>, ? extends Object> function2) {
|
||||
return produce(coroutineScope, coroutineContext, i, BufferOverflow.SUSPEND, CoroutineStart.DEFAULT, null, function2);
|
||||
}
|
||||
|
||||
public static /* synthetic */ ReceiveChannel produce$default(CoroutineScope coroutineScope, CoroutineContext coroutineContext, int i, CoroutineStart coroutineStart, Function1 function1, Function2 function2, int i2, Object obj) {
|
||||
if ((i2 & 1) != 0) {
|
||||
coroutineContext = EmptyCoroutineContext.INSTANCE;
|
||||
}
|
||||
CoroutineContext coroutineContext2 = coroutineContext;
|
||||
int i3 = (i2 & 2) != 0 ? 0 : i;
|
||||
if ((i2 & 4) != 0) {
|
||||
coroutineStart = CoroutineStart.DEFAULT;
|
||||
}
|
||||
CoroutineStart coroutineStart2 = coroutineStart;
|
||||
if ((i2 & 8) != 0) {
|
||||
function1 = null;
|
||||
}
|
||||
return produce(coroutineScope, coroutineContext2, i3, coroutineStart2, function1, function2);
|
||||
}
|
||||
|
||||
public static final <E> ReceiveChannel<E> produce(CoroutineScope coroutineScope, CoroutineContext coroutineContext, int i, CoroutineStart coroutineStart, Function1<? super Throwable, Unit> function1, Function2<? super ProducerScope<? super E>, ? super Continuation<? super Unit>, ? extends Object> function2) {
|
||||
return produce(coroutineScope, coroutineContext, i, BufferOverflow.SUSPEND, coroutineStart, function1, function2);
|
||||
}
|
||||
|
||||
public static /* synthetic */ ReceiveChannel produce$default(CoroutineScope coroutineScope, CoroutineContext coroutineContext, int i, BufferOverflow bufferOverflow, CoroutineStart coroutineStart, Function1 function1, Function2 function2, int i2, Object obj) {
|
||||
if ((i2 & 1) != 0) {
|
||||
coroutineContext = EmptyCoroutineContext.INSTANCE;
|
||||
}
|
||||
CoroutineContext coroutineContext2 = coroutineContext;
|
||||
int i3 = (i2 & 2) != 0 ? 0 : i;
|
||||
if ((i2 & 4) != 0) {
|
||||
bufferOverflow = BufferOverflow.SUSPEND;
|
||||
}
|
||||
BufferOverflow bufferOverflow2 = bufferOverflow;
|
||||
if ((i2 & 8) != 0) {
|
||||
coroutineStart = CoroutineStart.DEFAULT;
|
||||
}
|
||||
CoroutineStart coroutineStart2 = coroutineStart;
|
||||
if ((i2 & 16) != 0) {
|
||||
function1 = null;
|
||||
}
|
||||
return produce(coroutineScope, coroutineContext2, i3, bufferOverflow2, coroutineStart2, function1, function2);
|
||||
}
|
||||
|
||||
public static final <E> ReceiveChannel<E> produce(CoroutineScope coroutineScope, CoroutineContext coroutineContext, int i, BufferOverflow bufferOverflow, CoroutineStart coroutineStart, Function1<? super Throwable, Unit> function1, Function2<? super ProducerScope<? super E>, ? super Continuation<? super Unit>, ? extends Object> function2) {
|
||||
ProducerCoroutine producerCoroutine = new ProducerCoroutine(CoroutineContextKt.newCoroutineContext(coroutineScope, coroutineContext), ChannelKt.Channel$default(i, bufferOverflow, null, 4, null));
|
||||
if (function1 != null) {
|
||||
producerCoroutine.invokeOnCompletion(function1);
|
||||
}
|
||||
producerCoroutine.start(coroutineStart, producerCoroutine, function2);
|
||||
return producerCoroutine;
|
||||
}
|
||||
}
|
@ -0,0 +1,35 @@
|
||||
package kotlinx.coroutines.channels;
|
||||
|
||||
import kotlin.Metadata;
|
||||
import kotlin.Unit;
|
||||
import kotlin.coroutines.CoroutineContext;
|
||||
import kotlinx.coroutines.CoroutineExceptionHandlerKt;
|
||||
import kotlinx.coroutines.channels.SendChannel;
|
||||
|
||||
/* compiled from: Produce.kt */
|
||||
@Metadata(d1 = {"\u00004\n\u0002\u0018\u0002\n\u0000\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\u000b\n\u0002\b\u0002\n\u0002\u0010\u0002\n\u0000\n\u0002\u0010\u0003\n\u0002\b\u0005\b\u0002\u0018\u0000*\u0004\b\u0000\u0010\u00012\b\u0012\u0004\u0012\u0002H\u00010\u00022\b\u0012\u0004\u0012\u0002H\u00010\u0003B\u001b\u0012\u0006\u0010\u0004\u001a\u00020\u0005\u0012\f\u0010\u0006\u001a\b\u0012\u0004\u0012\u00028\u00000\u0007¢\u0006\u0002\u0010\bJ\u0018\u0010\f\u001a\u00020\r2\u0006\u0010\u000e\u001a\u00020\u000f2\u0006\u0010\u0010\u001a\u00020\nH\u0014J\u0015\u0010\u0011\u001a\u00020\r2\u0006\u0010\u0012\u001a\u00020\rH\u0014¢\u0006\u0002\u0010\u0013R\u0014\u0010\t\u001a\u00020\n8VX\u0096\u0004¢\u0006\u0006\u001a\u0004\b\t\u0010\u000b¨\u0006\u0014"}, d2 = {"Lkotlinx/coroutines/channels/ProducerCoroutine;", "E", "Lkotlinx/coroutines/channels/ChannelCoroutine;", "Lkotlinx/coroutines/channels/ProducerScope;", "parentContext", "Lkotlin/coroutines/CoroutineContext;", "channel", "Lkotlinx/coroutines/channels/Channel;", "(Lkotlin/coroutines/CoroutineContext;Lkotlinx/coroutines/channels/Channel;)V", "isActive", "", "()Z", "onCancelled", "", "cause", "", "handled", "onCompleted", "value", "(Lkotlin/Unit;)V", "kotlinx-coroutines-core"}, k = 1, mv = {1, 8, 0}, xi = 48)
|
||||
/* loaded from: classes.dex */
|
||||
final class ProducerCoroutine<E> extends ChannelCoroutine<E> implements ProducerScope<E> {
|
||||
public ProducerCoroutine(CoroutineContext coroutineContext, Channel<E> channel) {
|
||||
super(coroutineContext, channel, true, true);
|
||||
}
|
||||
|
||||
@Override // kotlinx.coroutines.AbstractCoroutine, kotlinx.coroutines.JobSupport, kotlinx.coroutines.Job
|
||||
public boolean isActive() {
|
||||
return super.isActive();
|
||||
}
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: protected */
|
||||
@Override // kotlinx.coroutines.AbstractCoroutine
|
||||
public void onCompleted(Unit value) {
|
||||
SendChannel.DefaultImpls.close$default(get_channel(), null, 1, null);
|
||||
}
|
||||
|
||||
@Override // kotlinx.coroutines.AbstractCoroutine
|
||||
protected void onCancelled(Throwable cause, boolean handled) {
|
||||
if (get_channel().close(cause) || handled) {
|
||||
return;
|
||||
}
|
||||
CoroutineExceptionHandlerKt.handleCoroutineException(getContext(), cause);
|
||||
}
|
||||
}
|
@ -0,0 +1,24 @@
|
||||
package kotlinx.coroutines.channels;
|
||||
|
||||
import kotlin.Deprecated;
|
||||
import kotlin.DeprecationLevel;
|
||||
import kotlin.Metadata;
|
||||
import kotlin.ReplaceWith;
|
||||
import kotlinx.coroutines.CoroutineScope;
|
||||
import kotlinx.coroutines.channels.SendChannel;
|
||||
|
||||
/* compiled from: Produce.kt */
|
||||
@Metadata(d1 = {"\u0000\u0012\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0004\bf\u0018\u0000*\u0006\b\u0000\u0010\u0001 \u00002\u00020\u00022\b\u0012\u0004\u0012\u0002H\u00010\u0003R\u0018\u0010\u0004\u001a\b\u0012\u0004\u0012\u00028\u00000\u0003X¦\u0004¢\u0006\u0006\u001a\u0004\b\u0005\u0010\u0006¨\u0006\u0007"}, d2 = {"Lkotlinx/coroutines/channels/ProducerScope;", "E", "Lkotlinx/coroutines/CoroutineScope;", "Lkotlinx/coroutines/channels/SendChannel;", "channel", "getChannel", "()Lkotlinx/coroutines/channels/SendChannel;", "kotlinx-coroutines-core"}, k = 1, mv = {1, 8, 0}, xi = 48)
|
||||
/* loaded from: classes.dex */
|
||||
public interface ProducerScope<E> extends CoroutineScope, SendChannel<E> {
|
||||
SendChannel<E> getChannel();
|
||||
|
||||
/* compiled from: Produce.kt */
|
||||
@Metadata(k = 3, mv = {1, 8, 0}, xi = 48)
|
||||
public static final class DefaultImpls {
|
||||
@Deprecated(level = DeprecationLevel.ERROR, message = "Deprecated in the favour of 'trySend' method", replaceWith = @ReplaceWith(expression = "trySend(element).isSuccess", imports = {}))
|
||||
public static <E> boolean offer(ProducerScope<? super E> producerScope, E e) {
|
||||
return SendChannel.DefaultImpls.offer(producerScope, e);
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,23 @@
|
||||
package kotlinx.coroutines.channels;
|
||||
|
||||
import kotlin.Metadata;
|
||||
import kotlinx.coroutines.CancellableContinuationImpl;
|
||||
import kotlinx.coroutines.Waiter;
|
||||
import kotlinx.coroutines.internal.Segment;
|
||||
|
||||
/* compiled from: BufferedChannel.kt */
|
||||
@Metadata(d1 = {"\u0000*\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\b\n\u0000\b\u0002\u0018\u0000*\u0004\b\u0000\u0010\u00012\u00020\u0002B\u001c\u0012\u0012\u0010\u0003\u001a\u000e\u0012\n\u0012\b\u0012\u0004\u0012\u00028\u00000\u00050\u0004ø\u0001\u0000¢\u0006\u0002\u0010\u0006J\u001d\u0010\u0007\u001a\u00020\b2\n\u0010\t\u001a\u0006\u0012\u0002\b\u00030\n2\u0006\u0010\u000b\u001a\u00020\fH\u0096\u0001R\u001f\u0010\u0003\u001a\u000e\u0012\n\u0012\b\u0012\u0004\u0012\u00028\u00000\u00050\u00048\u0006X\u0087\u0004ø\u0001\u0000¢\u0006\u0002\n\u0000\u0082\u0002\u0004\n\u0002\b\u0019¨\u0006\r"}, d2 = {"Lkotlinx/coroutines/channels/ReceiveCatching;", "E", "Lkotlinx/coroutines/Waiter;", "cont", "Lkotlinx/coroutines/CancellableContinuationImpl;", "Lkotlinx/coroutines/channels/ChannelResult;", "(Lkotlinx/coroutines/CancellableContinuationImpl;)V", "invokeOnCancellation", "", "segment", "Lkotlinx/coroutines/internal/Segment;", "index", "", "kotlinx-coroutines-core"}, k = 1, mv = {1, 8, 0}, xi = 48)
|
||||
/* loaded from: classes.dex */
|
||||
final class ReceiveCatching<E> implements Waiter {
|
||||
public final CancellableContinuationImpl<ChannelResult<? extends E>> cont;
|
||||
|
||||
@Override // kotlinx.coroutines.Waiter
|
||||
public void invokeOnCancellation(Segment<?> segment, int index) {
|
||||
this.cont.invokeOnCancellation(segment, index);
|
||||
}
|
||||
|
||||
/* JADX WARN: Multi-variable type inference failed */
|
||||
public ReceiveCatching(CancellableContinuationImpl<? super ChannelResult<? extends E>> cancellableContinuationImpl) {
|
||||
this.cont = cancellableContinuationImpl;
|
||||
}
|
||||
}
|
@ -0,0 +1,27 @@
|
||||
package kotlinx.coroutines.channels;
|
||||
|
||||
import kotlin.Metadata;
|
||||
import kotlin.coroutines.Continuation;
|
||||
import kotlin.coroutines.jvm.internal.ContinuationImpl;
|
||||
import kotlin.coroutines.jvm.internal.DebugMetadata;
|
||||
import kotlinx.coroutines.channels.ReceiveChannel;
|
||||
|
||||
/* compiled from: Channel.kt */
|
||||
@Metadata(k = 3, mv = {1, 8, 0}, xi = 48)
|
||||
@DebugMetadata(c = "kotlinx.coroutines.channels.ReceiveChannel$DefaultImpls", f = "Channel.kt", i = {}, l = {372}, m = "receiveOrNull", n = {}, s = {})
|
||||
/* loaded from: classes.dex */
|
||||
final class ReceiveChannel$receiveOrNull$1<E> extends ContinuationImpl {
|
||||
int label;
|
||||
/* synthetic */ Object result;
|
||||
|
||||
ReceiveChannel$receiveOrNull$1(Continuation<? super ReceiveChannel$receiveOrNull$1> continuation) {
|
||||
super(continuation);
|
||||
}
|
||||
|
||||
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
||||
public final Object invokeSuspend(Object obj) {
|
||||
this.result = obj;
|
||||
this.label |= Integer.MIN_VALUE;
|
||||
return ReceiveChannel.DefaultImpls.receiveOrNull(null, this);
|
||||
}
|
||||
}
|
@ -0,0 +1,155 @@
|
||||
package kotlinx.coroutines.channels;
|
||||
|
||||
import java.util.concurrent.CancellationException;
|
||||
import kotlin.Deprecated;
|
||||
import kotlin.DeprecationLevel;
|
||||
import kotlin.Metadata;
|
||||
import kotlin.ReplaceWith;
|
||||
import kotlin.coroutines.Continuation;
|
||||
import kotlin.jvm.internal.Intrinsics;
|
||||
import kotlinx.coroutines.internal.StackTraceRecoveryKt;
|
||||
import kotlinx.coroutines.selects.SelectClause1;
|
||||
|
||||
/* compiled from: Channel.kt */
|
||||
@Metadata(d1 = {"\u0000@\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0000\n\u0000\n\u0002\u0010\u000b\n\u0002\b\u0006\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0010\u0002\n\u0000\n\u0002\u0010\u0003\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\n\bf\u0018\u0000*\u0006\b\u0000\u0010\u0001 \u00012\u00020\u0002J\b\u0010\u0014\u001a\u00020\u0015H\u0017J\u0014\u0010\u0014\u001a\u00020\u00042\n\b\u0002\u0010\u0016\u001a\u0004\u0018\u00010\u0017H'J\u001a\u0010\u0014\u001a\u00020\u00152\u0010\b\u0002\u0010\u0016\u001a\n\u0018\u00010\u0018j\u0004\u0018\u0001`\u0019H&J\u000f\u0010\u001a\u001a\b\u0012\u0004\u0012\u00028\u00000\u001bH¦\u0002J\u000f\u0010\u001c\u001a\u0004\u0018\u00018\u0000H\u0017¢\u0006\u0002\u0010\u001dJ\u0011\u0010\u001e\u001a\u00028\u0000H¦@ø\u0001\u0000¢\u0006\u0002\u0010\u001fJ\"\u0010 \u001a\b\u0012\u0004\u0012\u00028\u00000\u000fH¦@ø\u0001\u0001ø\u0001\u0002ø\u0001\u0000ø\u0001\u0000¢\u0006\u0004\b!\u0010\u001fJ\u0013\u0010\"\u001a\u0004\u0018\u00018\u0000H\u0097@ø\u0001\u0000¢\u0006\u0002\u0010\u001fJ\u001e\u0010#\u001a\b\u0012\u0004\u0012\u00028\u00000\u000fH&ø\u0001\u0001ø\u0001\u0002ø\u0001\u0000¢\u0006\u0004\b$\u0010\u001dR\u001a\u0010\u0003\u001a\u00020\u00048&X§\u0004¢\u0006\f\u0012\u0004\b\u0005\u0010\u0006\u001a\u0004\b\u0003\u0010\u0007R\u001a\u0010\b\u001a\u00020\u00048&X§\u0004¢\u0006\f\u0012\u0004\b\t\u0010\u0006\u001a\u0004\b\b\u0010\u0007R\u0018\u0010\n\u001a\b\u0012\u0004\u0012\u00028\u00000\u000bX¦\u0004¢\u0006\u0006\u001a\u0004\b\f\u0010\rR!\u0010\u000e\u001a\u000e\u0012\n\u0012\b\u0012\u0004\u0012\u00028\u00000\u000f0\u000bX¦\u0004ø\u0001\u0000¢\u0006\u0006\u001a\u0004\b\u0010\u0010\rR\"\u0010\u0011\u001a\n\u0012\u0006\u0012\u0004\u0018\u00018\u00000\u000b8VX\u0097\u0004¢\u0006\f\u0012\u0004\b\u0012\u0010\u0006\u001a\u0004\b\u0013\u0010\r\u0082\u0002\u000f\n\u0002\b\u0019\n\u0002\b!\n\u0005\b¡\u001e0\u0001¨\u0006%"}, d2 = {"Lkotlinx/coroutines/channels/ReceiveChannel;", "E", "", "isClosedForReceive", "", "isClosedForReceive$annotations", "()V", "()Z", "isEmpty", "isEmpty$annotations", "onReceive", "Lkotlinx/coroutines/selects/SelectClause1;", "getOnReceive", "()Lkotlinx/coroutines/selects/SelectClause1;", "onReceiveCatching", "Lkotlinx/coroutines/channels/ChannelResult;", "getOnReceiveCatching", "onReceiveOrNull", "getOnReceiveOrNull$annotations", "getOnReceiveOrNull", "cancel", "", "cause", "", "Ljava/util/concurrent/CancellationException;", "Lkotlinx/coroutines/CancellationException;", "iterator", "Lkotlinx/coroutines/channels/ChannelIterator;", "poll", "()Ljava/lang/Object;", "receive", "(Lkotlin/coroutines/Continuation;)Ljava/lang/Object;", "receiveCatching", "receiveCatching-JP2dKIU", "receiveOrNull", "tryReceive", "tryReceive-PtdJZtk", "kotlinx-coroutines-core"}, k = 1, mv = {1, 8, 0}, xi = 48)
|
||||
/* loaded from: classes.dex */
|
||||
public interface ReceiveChannel<E> {
|
||||
@Deprecated(level = DeprecationLevel.HIDDEN, message = "Since 1.2.0, binary compatibility with versions <= 1.1.x")
|
||||
/* synthetic */ void cancel();
|
||||
|
||||
void cancel(CancellationException cause);
|
||||
|
||||
@Deprecated(level = DeprecationLevel.HIDDEN, message = "Since 1.2.0, binary compatibility with versions <= 1.1.x")
|
||||
/* synthetic */ boolean cancel(Throwable cause);
|
||||
|
||||
SelectClause1<E> getOnReceive();
|
||||
|
||||
SelectClause1<ChannelResult<E>> getOnReceiveCatching();
|
||||
|
||||
SelectClause1<E> getOnReceiveOrNull();
|
||||
|
||||
boolean isClosedForReceive();
|
||||
|
||||
boolean isEmpty();
|
||||
|
||||
ChannelIterator<E> iterator();
|
||||
|
||||
@Deprecated(level = DeprecationLevel.ERROR, message = "Deprecated in the favour of 'tryReceive'. Please note that the provided replacement does not rethrow channel's close cause as 'poll' did, for the precise replacement please refer to the 'poll' documentation", replaceWith = @ReplaceWith(expression = "tryReceive().getOrNull()", imports = {}))
|
||||
E poll();
|
||||
|
||||
Object receive(Continuation<? super E> continuation);
|
||||
|
||||
/* renamed from: receiveCatching-JP2dKIU */
|
||||
Object mo1856receiveCatchingJP2dKIU(Continuation<? super ChannelResult<? extends E>> continuation);
|
||||
|
||||
@Deprecated(level = DeprecationLevel.ERROR, message = "Deprecated in favor of 'receiveCatching'. Please note that the provided replacement does not rethrow channel's close cause as 'receiveOrNull' did, for the detailed replacement please refer to the 'receiveOrNull' documentation", replaceWith = @ReplaceWith(expression = "receiveCatching().getOrNull()", imports = {}))
|
||||
Object receiveOrNull(Continuation<? super E> continuation);
|
||||
|
||||
/* renamed from: tryReceive-PtdJZtk */
|
||||
Object mo1857tryReceivePtdJZtk();
|
||||
|
||||
/* compiled from: Channel.kt */
|
||||
@Metadata(k = 3, mv = {1, 8, 0}, xi = 48)
|
||||
public static final class DefaultImpls {
|
||||
@Deprecated(level = DeprecationLevel.ERROR, message = "Deprecated in favor of onReceiveCatching extension", replaceWith = @ReplaceWith(expression = "onReceiveCatching", imports = {}))
|
||||
public static /* synthetic */ void getOnReceiveOrNull$annotations() {
|
||||
}
|
||||
|
||||
public static /* synthetic */ void isClosedForReceive$annotations() {
|
||||
}
|
||||
|
||||
public static /* synthetic */ void isEmpty$annotations() {
|
||||
}
|
||||
|
||||
public static /* synthetic */ void cancel$default(ReceiveChannel receiveChannel, CancellationException cancellationException, int i, Object obj) {
|
||||
if (obj != null) {
|
||||
throw new UnsupportedOperationException("Super calls with default arguments not supported in this target, function: cancel");
|
||||
}
|
||||
if ((i & 1) != 0) {
|
||||
cancellationException = null;
|
||||
}
|
||||
receiveChannel.cancel(cancellationException);
|
||||
}
|
||||
|
||||
public static /* synthetic */ boolean cancel$default(ReceiveChannel receiveChannel, Throwable th, int i, Object obj) {
|
||||
if (obj != null) {
|
||||
throw new UnsupportedOperationException("Super calls with default arguments not supported in this target, function: cancel");
|
||||
}
|
||||
if ((i & 1) != 0) {
|
||||
th = null;
|
||||
}
|
||||
return receiveChannel.cancel(th);
|
||||
}
|
||||
|
||||
@Deprecated(level = DeprecationLevel.ERROR, message = "Deprecated in the favour of 'tryReceive'. Please note that the provided replacement does not rethrow channel's close cause as 'poll' did, for the precise replacement please refer to the 'poll' documentation", replaceWith = @ReplaceWith(expression = "tryReceive().getOrNull()", imports = {}))
|
||||
public static <E> E poll(ReceiveChannel<? extends E> receiveChannel) {
|
||||
Object mo1857tryReceivePtdJZtk = receiveChannel.mo1857tryReceivePtdJZtk();
|
||||
if (ChannelResult.m1872isSuccessimpl(mo1857tryReceivePtdJZtk)) {
|
||||
return (E) ChannelResult.m1868getOrThrowimpl(mo1857tryReceivePtdJZtk);
|
||||
}
|
||||
Throwable m1866exceptionOrNullimpl = ChannelResult.m1866exceptionOrNullimpl(mo1857tryReceivePtdJZtk);
|
||||
if (m1866exceptionOrNullimpl == null) {
|
||||
return null;
|
||||
}
|
||||
throw StackTraceRecoveryKt.recoverStackTrace(m1866exceptionOrNullimpl);
|
||||
}
|
||||
|
||||
/* JADX WARN: Removed duplicated region for block: B:15:0x0038 */
|
||||
/* JADX WARN: Removed duplicated region for block: B:8:0x0024 */
|
||||
@kotlin.Deprecated(level = kotlin.DeprecationLevel.ERROR, message = "Deprecated in favor of 'receiveCatching'. Please note that the provided replacement does not rethrow channel's close cause as 'receiveOrNull' did, for the detailed replacement please refer to the 'receiveOrNull' documentation", replaceWith = @kotlin.ReplaceWith(expression = "receiveCatching().getOrNull()", imports = {}))
|
||||
/*
|
||||
Code decompiled incorrectly, please refer to instructions dump.
|
||||
To view partially-correct add '--show-bad-code' argument
|
||||
*/
|
||||
public static <E> java.lang.Object receiveOrNull(kotlinx.coroutines.channels.ReceiveChannel<? extends E> r4, kotlin.coroutines.Continuation<? super E> r5) {
|
||||
/*
|
||||
boolean r0 = r5 instanceof kotlinx.coroutines.channels.ReceiveChannel$receiveOrNull$1
|
||||
if (r0 == 0) goto L14
|
||||
r0 = r5
|
||||
kotlinx.coroutines.channels.ReceiveChannel$receiveOrNull$1 r0 = (kotlinx.coroutines.channels.ReceiveChannel$receiveOrNull$1) r0
|
||||
int r1 = r0.label
|
||||
r2 = -2147483648(0xffffffff80000000, float:-0.0)
|
||||
r1 = r1 & r2
|
||||
if (r1 == 0) goto L14
|
||||
int r5 = r0.label
|
||||
int r5 = r5 - r2
|
||||
r0.label = r5
|
||||
goto L19
|
||||
L14:
|
||||
kotlinx.coroutines.channels.ReceiveChannel$receiveOrNull$1 r0 = new kotlinx.coroutines.channels.ReceiveChannel$receiveOrNull$1
|
||||
r0.<init>(r5)
|
||||
L19:
|
||||
java.lang.Object r5 = r0.result
|
||||
java.lang.Object r1 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED()
|
||||
int r2 = r0.label
|
||||
r3 = 1
|
||||
if (r2 == 0) goto L38
|
||||
if (r2 != r3) goto L30
|
||||
kotlin.ResultKt.throwOnFailure(r5)
|
||||
kotlinx.coroutines.channels.ChannelResult r5 = (kotlinx.coroutines.channels.ChannelResult) r5
|
||||
java.lang.Object r4 = r5.getHolder()
|
||||
goto L44
|
||||
L30:
|
||||
java.lang.IllegalStateException r4 = new java.lang.IllegalStateException
|
||||
java.lang.String r5 = "call to 'resume' before 'invoke' with coroutine"
|
||||
r4.<init>(r5)
|
||||
throw r4
|
||||
L38:
|
||||
kotlin.ResultKt.throwOnFailure(r5)
|
||||
r0.label = r3
|
||||
java.lang.Object r4 = r4.mo1856receiveCatchingJP2dKIU(r0)
|
||||
if (r4 != r1) goto L44
|
||||
return r1
|
||||
L44:
|
||||
java.lang.Object r4 = kotlinx.coroutines.channels.ChannelResult.m1867getOrNullimpl(r4)
|
||||
return r4
|
||||
*/
|
||||
throw new UnsupportedOperationException("Method not decompiled: kotlinx.coroutines.channels.ReceiveChannel.DefaultImpls.receiveOrNull(kotlinx.coroutines.channels.ReceiveChannel, kotlin.coroutines.Continuation):java.lang.Object");
|
||||
}
|
||||
|
||||
public static <E> SelectClause1<E> getOnReceiveOrNull(ReceiveChannel<? extends E> receiveChannel) {
|
||||
Intrinsics.checkNotNull(receiveChannel, "null cannot be cast to non-null type kotlinx.coroutines.channels.BufferedChannel<E of kotlinx.coroutines.channels.ReceiveChannel>");
|
||||
return ((BufferedChannel) receiveChannel).getOnReceiveOrNull();
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,63 @@
|
||||
package kotlinx.coroutines.channels;
|
||||
|
||||
import kotlin.Deprecated;
|
||||
import kotlin.DeprecationLevel;
|
||||
import kotlin.Metadata;
|
||||
import kotlin.ReplaceWith;
|
||||
import kotlin.Unit;
|
||||
import kotlin.coroutines.Continuation;
|
||||
import kotlin.jvm.functions.Function1;
|
||||
import kotlinx.coroutines.internal.StackTraceRecoveryKt;
|
||||
import kotlinx.coroutines.selects.SelectClause2;
|
||||
|
||||
/* compiled from: Channel.kt */
|
||||
@Metadata(d1 = {"\u0000<\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0000\n\u0000\n\u0002\u0010\u000b\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0010\u0003\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0007\n\u0002\u0018\u0002\n\u0002\b\u0003\bf\u0018\u0000*\u0006\b\u0000\u0010\u0001 \u00002\u00020\u0002J\u0014\u0010\f\u001a\u00020\u00042\n\b\u0002\u0010\r\u001a\u0004\u0018\u00010\u000eH&J-\u0010\u000f\u001a\u00020\u00102#\u0010\u0011\u001a\u001f\u0012\u0015\u0012\u0013\u0018\u00010\u000e¢\u0006\f\b\u0013\u0012\b\b\u0014\u0012\u0004\b\b(\r\u0012\u0004\u0012\u00020\u00100\u0012H&J\u0015\u0010\u0015\u001a\u00020\u00042\u0006\u0010\u0016\u001a\u00028\u0000H\u0017¢\u0006\u0002\u0010\u0017J\u0019\u0010\u0018\u001a\u00020\u00102\u0006\u0010\u0016\u001a\u00028\u0000H¦@ø\u0001\u0000¢\u0006\u0002\u0010\u0019J&\u0010\u001a\u001a\b\u0012\u0004\u0012\u00020\u00100\u001b2\u0006\u0010\u0016\u001a\u00028\u0000H&ø\u0001\u0001ø\u0001\u0002ø\u0001\u0000¢\u0006\u0004\b\u001c\u0010\u001dR\u001a\u0010\u0003\u001a\u00020\u00048&X§\u0004¢\u0006\f\u0012\u0004\b\u0005\u0010\u0006\u001a\u0004\b\u0003\u0010\u0007R$\u0010\b\u001a\u0014\u0012\u0004\u0012\u00028\u0000\u0012\n\u0012\b\u0012\u0004\u0012\u00028\u00000\u00000\tX¦\u0004¢\u0006\u0006\u001a\u0004\b\n\u0010\u000b\u0082\u0002\u000f\n\u0002\b\u0019\n\u0002\b!\n\u0005\b¡\u001e0\u0001¨\u0006\u001e"}, d2 = {"Lkotlinx/coroutines/channels/SendChannel;", "E", "", "isClosedForSend", "", "isClosedForSend$annotations", "()V", "()Z", "onSend", "Lkotlinx/coroutines/selects/SelectClause2;", "getOnSend", "()Lkotlinx/coroutines/selects/SelectClause2;", "close", "cause", "", "invokeOnClose", "", "handler", "Lkotlin/Function1;", "Lkotlin/ParameterName;", "name", "offer", "element", "(Ljava/lang/Object;)Z", "send", "(Ljava/lang/Object;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;", "trySend", "Lkotlinx/coroutines/channels/ChannelResult;", "trySend-JP2dKIU", "(Ljava/lang/Object;)Ljava/lang/Object;", "kotlinx-coroutines-core"}, k = 1, mv = {1, 8, 0}, xi = 48)
|
||||
/* loaded from: classes.dex */
|
||||
public interface SendChannel<E> {
|
||||
boolean close(Throwable cause);
|
||||
|
||||
SelectClause2<E, SendChannel<E>> getOnSend();
|
||||
|
||||
void invokeOnClose(Function1<? super Throwable, Unit> handler);
|
||||
|
||||
boolean isClosedForSend();
|
||||
|
||||
@Deprecated(level = DeprecationLevel.ERROR, message = "Deprecated in the favour of 'trySend' method", replaceWith = @ReplaceWith(expression = "trySend(element).isSuccess", imports = {}))
|
||||
boolean offer(E element);
|
||||
|
||||
Object send(E e, Continuation<? super Unit> continuation);
|
||||
|
||||
/* renamed from: trySend-JP2dKIU */
|
||||
Object mo1852trySendJP2dKIU(E element);
|
||||
|
||||
/* compiled from: Channel.kt */
|
||||
@Metadata(k = 3, mv = {1, 8, 0}, xi = 48)
|
||||
public static final class DefaultImpls {
|
||||
public static /* synthetic */ void isClosedForSend$annotations() {
|
||||
}
|
||||
|
||||
public static /* synthetic */ boolean close$default(SendChannel sendChannel, Throwable th, int i, Object obj) {
|
||||
if (obj != null) {
|
||||
throw new UnsupportedOperationException("Super calls with default arguments not supported in this target, function: close");
|
||||
}
|
||||
if ((i & 1) != 0) {
|
||||
th = null;
|
||||
}
|
||||
return sendChannel.close(th);
|
||||
}
|
||||
|
||||
/* JADX WARN: Multi-variable type inference failed */
|
||||
@Deprecated(level = DeprecationLevel.ERROR, message = "Deprecated in the favour of 'trySend' method", replaceWith = @ReplaceWith(expression = "trySend(element).isSuccess", imports = {}))
|
||||
public static <E> boolean offer(SendChannel<? super E> sendChannel, E e) {
|
||||
Object mo1852trySendJP2dKIU = sendChannel.mo1852trySendJP2dKIU(e);
|
||||
if (ChannelResult.m1872isSuccessimpl(mo1852trySendJP2dKIU)) {
|
||||
return true;
|
||||
}
|
||||
Throwable m1866exceptionOrNullimpl = ChannelResult.m1866exceptionOrNullimpl(mo1852trySendJP2dKIU);
|
||||
if (m1866exceptionOrNullimpl == null) {
|
||||
return false;
|
||||
}
|
||||
throw StackTraceRecoveryKt.recoverStackTrace(m1866exceptionOrNullimpl);
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,30 @@
|
||||
package kotlinx.coroutines.channels;
|
||||
|
||||
import kotlin.Metadata;
|
||||
import kotlin.coroutines.Continuation;
|
||||
import kotlin.coroutines.jvm.internal.ContinuationImpl;
|
||||
import kotlin.coroutines.jvm.internal.DebugMetadata;
|
||||
|
||||
/* compiled from: TickerChannels.kt */
|
||||
@Metadata(k = 3, mv = {1, 8, 0}, xi = 48)
|
||||
@DebugMetadata(c = "kotlinx.coroutines.channels.TickerChannelsKt", f = "TickerChannels.kt", i = {0, 0, 1, 1, 2, 2}, l = {106, 108, 109}, m = "fixedDelayTicker", n = {"channel", "delayMillis", "channel", "delayMillis", "channel", "delayMillis"}, s = {"L$0", "J$0", "L$0", "J$0", "L$0", "J$0"})
|
||||
/* loaded from: classes.dex */
|
||||
final class TickerChannelsKt$fixedDelayTicker$1 extends ContinuationImpl {
|
||||
long J$0;
|
||||
Object L$0;
|
||||
int label;
|
||||
/* synthetic */ Object result;
|
||||
|
||||
TickerChannelsKt$fixedDelayTicker$1(Continuation<? super TickerChannelsKt$fixedDelayTicker$1> continuation) {
|
||||
super(continuation);
|
||||
}
|
||||
|
||||
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
||||
public final Object invokeSuspend(Object obj) {
|
||||
Object fixedDelayTicker;
|
||||
this.result = obj;
|
||||
this.label |= Integer.MIN_VALUE;
|
||||
fixedDelayTicker = TickerChannelsKt.fixedDelayTicker(0L, 0L, null, this);
|
||||
return fixedDelayTicker;
|
||||
}
|
||||
}
|
@ -0,0 +1,31 @@
|
||||
package kotlinx.coroutines.channels;
|
||||
|
||||
import kotlin.Metadata;
|
||||
import kotlin.coroutines.Continuation;
|
||||
import kotlin.coroutines.jvm.internal.ContinuationImpl;
|
||||
import kotlin.coroutines.jvm.internal.DebugMetadata;
|
||||
|
||||
/* compiled from: TickerChannels.kt */
|
||||
@Metadata(k = 3, mv = {1, 8, 0}, xi = 48)
|
||||
@DebugMetadata(c = "kotlinx.coroutines.channels.TickerChannelsKt", f = "TickerChannels.kt", i = {0, 0, 0, 1, 1, 1, 2, 2, 2, 3, 3, 3}, l = {84, 88, 94, 96}, m = "fixedPeriodTicker", n = {"channel", "delayMillis", "deadline", "channel", "deadline", "delayNs", "channel", "deadline", "delayNs", "channel", "deadline", "delayNs"}, s = {"L$0", "J$0", "J$1", "L$0", "J$0", "J$1", "L$0", "J$0", "J$1", "L$0", "J$0", "J$1"})
|
||||
/* loaded from: classes.dex */
|
||||
final class TickerChannelsKt$fixedPeriodTicker$1 extends ContinuationImpl {
|
||||
long J$0;
|
||||
long J$1;
|
||||
Object L$0;
|
||||
int label;
|
||||
/* synthetic */ Object result;
|
||||
|
||||
TickerChannelsKt$fixedPeriodTicker$1(Continuation<? super TickerChannelsKt$fixedPeriodTicker$1> continuation) {
|
||||
super(continuation);
|
||||
}
|
||||
|
||||
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
||||
public final Object invokeSuspend(Object obj) {
|
||||
Object fixedPeriodTicker;
|
||||
this.result = obj;
|
||||
this.label |= Integer.MIN_VALUE;
|
||||
fixedPeriodTicker = TickerChannelsKt.fixedPeriodTicker(0L, 0L, null, this);
|
||||
return fixedPeriodTicker;
|
||||
}
|
||||
}
|
@ -0,0 +1,93 @@
|
||||
package kotlinx.coroutines.channels;
|
||||
|
||||
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.SuspendLambda;
|
||||
import kotlin.jvm.functions.Function2;
|
||||
|
||||
/* compiled from: TickerChannels.kt */
|
||||
@Metadata(d1 = {"\u0000\n\n\u0002\u0018\u0002\n\u0002\u0010\u0002\n\u0000\u0010\u0002\u001a\u00020\u0001*\b\u0012\u0004\u0012\u00020\u00010\u0000H\u008a@"}, d2 = {"Lkotlinx/coroutines/channels/ProducerScope;", "", "<anonymous>"}, k = 3, mv = {1, 8, 0})
|
||||
@DebugMetadata(c = "kotlinx.coroutines.channels.TickerChannelsKt$ticker$3", f = "TickerChannels.kt", i = {}, l = {72, 73}, m = "invokeSuspend", n = {}, s = {})
|
||||
/* loaded from: classes.dex */
|
||||
final class TickerChannelsKt$ticker$3 extends SuspendLambda implements Function2<ProducerScope<? super Unit>, Continuation<? super Unit>, Object> {
|
||||
final /* synthetic */ long $delayMillis;
|
||||
final /* synthetic */ long $initialDelayMillis;
|
||||
final /* synthetic */ TickerMode $mode;
|
||||
private /* synthetic */ Object L$0;
|
||||
int label;
|
||||
|
||||
/* compiled from: TickerChannels.kt */
|
||||
@Metadata(k = 3, mv = {1, 8, 0}, xi = 48)
|
||||
public /* synthetic */ class WhenMappings {
|
||||
public static final /* synthetic */ int[] $EnumSwitchMapping$0;
|
||||
|
||||
static {
|
||||
int[] iArr = new int[TickerMode.values().length];
|
||||
try {
|
||||
iArr[TickerMode.FIXED_PERIOD.ordinal()] = 1;
|
||||
} catch (NoSuchFieldError unused) {
|
||||
}
|
||||
try {
|
||||
iArr[TickerMode.FIXED_DELAY.ordinal()] = 2;
|
||||
} catch (NoSuchFieldError unused2) {
|
||||
}
|
||||
$EnumSwitchMapping$0 = iArr;
|
||||
}
|
||||
}
|
||||
|
||||
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
||||
TickerChannelsKt$ticker$3(TickerMode tickerMode, long j, long j2, Continuation<? super TickerChannelsKt$ticker$3> continuation) {
|
||||
super(2, continuation);
|
||||
this.$mode = tickerMode;
|
||||
this.$delayMillis = j;
|
||||
this.$initialDelayMillis = j2;
|
||||
}
|
||||
|
||||
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
||||
public final Continuation<Unit> create(Object obj, Continuation<?> continuation) {
|
||||
TickerChannelsKt$ticker$3 tickerChannelsKt$ticker$3 = new TickerChannelsKt$ticker$3(this.$mode, this.$delayMillis, this.$initialDelayMillis, continuation);
|
||||
tickerChannelsKt$ticker$3.L$0 = obj;
|
||||
return tickerChannelsKt$ticker$3;
|
||||
}
|
||||
|
||||
@Override // kotlin.jvm.functions.Function2
|
||||
public final Object invoke(ProducerScope<? super Unit> producerScope, Continuation<? super Unit> continuation) {
|
||||
return ((TickerChannelsKt$ticker$3) create(producerScope, continuation)).invokeSuspend(Unit.INSTANCE);
|
||||
}
|
||||
|
||||
@Override // kotlin.coroutines.jvm.internal.BaseContinuationImpl
|
||||
public final Object invokeSuspend(Object obj) {
|
||||
Object fixedPeriodTicker;
|
||||
Object fixedDelayTicker;
|
||||
Object coroutine_suspended = IntrinsicsKt.getCOROUTINE_SUSPENDED();
|
||||
int i = this.label;
|
||||
if (i == 0) {
|
||||
ResultKt.throwOnFailure(obj);
|
||||
ProducerScope producerScope = (ProducerScope) this.L$0;
|
||||
int i2 = WhenMappings.$EnumSwitchMapping$0[this.$mode.ordinal()];
|
||||
if (i2 == 1) {
|
||||
this.label = 1;
|
||||
fixedPeriodTicker = TickerChannelsKt.fixedPeriodTicker(this.$delayMillis, this.$initialDelayMillis, producerScope.getChannel(), this);
|
||||
if (fixedPeriodTicker == coroutine_suspended) {
|
||||
return coroutine_suspended;
|
||||
}
|
||||
} else if (i2 == 2) {
|
||||
this.label = 2;
|
||||
fixedDelayTicker = TickerChannelsKt.fixedDelayTicker(this.$delayMillis, this.$initialDelayMillis, producerScope.getChannel(), this);
|
||||
if (fixedDelayTicker == coroutine_suspended) {
|
||||
return coroutine_suspended;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (i != 1 && i != 2) {
|
||||
throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
|
||||
}
|
||||
ResultKt.throwOnFailure(obj);
|
||||
}
|
||||
return Unit.INSTANCE;
|
||||
}
|
||||
}
|
@ -0,0 +1,151 @@
|
||||
package kotlinx.coroutines.channels;
|
||||
|
||||
import kotlin.Metadata;
|
||||
import kotlin.Unit;
|
||||
import kotlin.coroutines.CoroutineContext;
|
||||
import kotlin.coroutines.EmptyCoroutineContext;
|
||||
import kotlinx.coroutines.Dispatchers;
|
||||
import kotlinx.coroutines.GlobalScope;
|
||||
|
||||
/* compiled from: TickerChannels.kt */
|
||||
@Metadata(d1 = {"\u0000*\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0010\t\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\u001a/\u0010\u0000\u001a\u00020\u00012\u0006\u0010\u0002\u001a\u00020\u00032\u0006\u0010\u0004\u001a\u00020\u00032\f\u0010\u0005\u001a\b\u0012\u0004\u0012\u00020\u00010\u0006H\u0082@ø\u0001\u0000¢\u0006\u0002\u0010\u0007\u001a/\u0010\b\u001a\u00020\u00012\u0006\u0010\u0002\u001a\u00020\u00032\u0006\u0010\u0004\u001a\u00020\u00032\f\u0010\u0005\u001a\b\u0012\u0004\u0012\u00020\u00010\u0006H\u0082@ø\u0001\u0000¢\u0006\u0002\u0010\u0007\u001a4\u0010\t\u001a\b\u0012\u0004\u0012\u00020\u00010\n2\u0006\u0010\u0002\u001a\u00020\u00032\b\b\u0002\u0010\u0004\u001a\u00020\u00032\b\b\u0002\u0010\u000b\u001a\u00020\f2\b\b\u0002\u0010\r\u001a\u00020\u000eH\u0007\u0082\u0002\u0004\n\u0002\b\u0019¨\u0006\u000f"}, d2 = {"fixedDelayTicker", "", "delayMillis", "", "initialDelayMillis", "channel", "Lkotlinx/coroutines/channels/SendChannel;", "(JJLkotlinx/coroutines/channels/SendChannel;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;", "fixedPeriodTicker", "ticker", "Lkotlinx/coroutines/channels/ReceiveChannel;", "context", "Lkotlin/coroutines/CoroutineContext;", "mode", "Lkotlinx/coroutines/channels/TickerMode;", "kotlinx-coroutines-core"}, k = 2, mv = {1, 8, 0}, xi = 48)
|
||||
/* loaded from: classes.dex */
|
||||
public final class TickerChannelsKt {
|
||||
public static /* synthetic */ ReceiveChannel ticker$default(long j, long j2, CoroutineContext coroutineContext, TickerMode tickerMode, int i, Object obj) {
|
||||
if ((i & 2) != 0) {
|
||||
j2 = j;
|
||||
}
|
||||
if ((i & 4) != 0) {
|
||||
coroutineContext = EmptyCoroutineContext.INSTANCE;
|
||||
}
|
||||
if ((i & 8) != 0) {
|
||||
tickerMode = TickerMode.FIXED_PERIOD;
|
||||
}
|
||||
return ticker(j, j2, coroutineContext, tickerMode);
|
||||
}
|
||||
|
||||
public static final ReceiveChannel<Unit> ticker(long j, long j2, CoroutineContext coroutineContext, TickerMode tickerMode) {
|
||||
if (j < 0) {
|
||||
throw new IllegalArgumentException(("Expected non-negative delay, but has " + j + " ms").toString());
|
||||
}
|
||||
if (j2 < 0) {
|
||||
throw new IllegalArgumentException(("Expected non-negative initial delay, but has " + j2 + " ms").toString());
|
||||
}
|
||||
return ProduceKt.produce(GlobalScope.INSTANCE, Dispatchers.getUnconfined().plus(coroutineContext), 0, new TickerChannelsKt$ticker$3(tickerMode, j, j2, null));
|
||||
}
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: private */
|
||||
/* JADX WARN: Removed duplicated region for block: B:17:0x00b6 A[RETURN] */
|
||||
/* JADX WARN: Removed duplicated region for block: B:19:0x00b7 */
|
||||
/* JADX WARN: Removed duplicated region for block: B:22:0x00c3 */
|
||||
/* JADX WARN: Removed duplicated region for block: B:32:0x010f A[RETURN] */
|
||||
/* JADX WARN: Removed duplicated region for block: B:33:0x00c8 */
|
||||
/* JADX WARN: Removed duplicated region for block: B:40:0x0074 */
|
||||
/* JADX WARN: Removed duplicated region for block: B:8:0x0029 */
|
||||
/* JADX WARN: Unsupported multi-entry loop pattern (BACK_EDGE: B:28:0x00f4 -> B:13:0x0053). Please report as a decompilation issue!!! */
|
||||
/* JADX WARN: Unsupported multi-entry loop pattern (BACK_EDGE: B:31:0x010d -> B:13:0x0053). Please report as a decompilation issue!!! */
|
||||
/*
|
||||
Code decompiled incorrectly, please refer to instructions dump.
|
||||
To view partially-correct add '--show-bad-code' argument
|
||||
*/
|
||||
public static final java.lang.Object fixedPeriodTicker(long r18, long r20, kotlinx.coroutines.channels.SendChannel<? super kotlin.Unit> r22, kotlin.coroutines.Continuation<? super kotlin.Unit> r23) {
|
||||
/*
|
||||
Method dump skipped, instructions count: 272
|
||||
To view this dump add '--comments-level debug' option
|
||||
*/
|
||||
throw new UnsupportedOperationException("Method not decompiled: kotlinx.coroutines.channels.TickerChannelsKt.fixedPeriodTicker(long, long, kotlinx.coroutines.channels.SendChannel, kotlin.coroutines.Continuation):java.lang.Object");
|
||||
}
|
||||
|
||||
/* JADX INFO: Access modifiers changed from: private */
|
||||
/* JADX WARN: Removed duplicated region for block: B:15:0x0072 A[RETURN] */
|
||||
/* JADX WARN: Removed duplicated region for block: B:17:0x0073 */
|
||||
/* JADX WARN: Removed duplicated region for block: B:20:0x0080 A[RETURN] */
|
||||
/* JADX WARN: Removed duplicated region for block: B:25:0x0054 */
|
||||
/* JADX WARN: Removed duplicated region for block: B:8:0x0026 */
|
||||
/* JADX WARN: Unsupported multi-entry loop pattern (BACK_EDGE: B:19:0x007e -> B:12:0x0035). Please report as a decompilation issue!!! */
|
||||
/*
|
||||
Code decompiled incorrectly, please refer to instructions dump.
|
||||
To view partially-correct add '--show-bad-code' argument
|
||||
*/
|
||||
public static final java.lang.Object fixedDelayTicker(long r6, long r8, kotlinx.coroutines.channels.SendChannel<? super kotlin.Unit> r10, kotlin.coroutines.Continuation<? super kotlin.Unit> r11) {
|
||||
/*
|
||||
boolean r0 = r11 instanceof kotlinx.coroutines.channels.TickerChannelsKt$fixedDelayTicker$1
|
||||
if (r0 == 0) goto L14
|
||||
r0 = r11
|
||||
kotlinx.coroutines.channels.TickerChannelsKt$fixedDelayTicker$1 r0 = (kotlinx.coroutines.channels.TickerChannelsKt$fixedDelayTicker$1) r0
|
||||
int r1 = r0.label
|
||||
r2 = -2147483648(0xffffffff80000000, float:-0.0)
|
||||
r1 = r1 & r2
|
||||
if (r1 == 0) goto L14
|
||||
int r11 = r0.label
|
||||
int r11 = r11 - r2
|
||||
r0.label = r11
|
||||
goto L19
|
||||
L14:
|
||||
kotlinx.coroutines.channels.TickerChannelsKt$fixedDelayTicker$1 r0 = new kotlinx.coroutines.channels.TickerChannelsKt$fixedDelayTicker$1
|
||||
r0.<init>(r11)
|
||||
L19:
|
||||
java.lang.Object r11 = r0.result
|
||||
java.lang.Object r1 = kotlin.coroutines.intrinsics.IntrinsicsKt.getCOROUTINE_SUSPENDED()
|
||||
int r2 = r0.label
|
||||
r3 = 3
|
||||
r4 = 2
|
||||
r5 = 1
|
||||
if (r2 == 0) goto L54
|
||||
if (r2 == r5) goto L49
|
||||
if (r2 == r4) goto L3f
|
||||
if (r2 != r3) goto L37
|
||||
long r6 = r0.J$0
|
||||
java.lang.Object r8 = r0.L$0
|
||||
kotlinx.coroutines.channels.SendChannel r8 = (kotlinx.coroutines.channels.SendChannel) r8
|
||||
kotlin.ResultKt.throwOnFailure(r11)
|
||||
L35:
|
||||
r10 = r8
|
||||
goto L64
|
||||
L37:
|
||||
java.lang.IllegalStateException r6 = new java.lang.IllegalStateException
|
||||
java.lang.String r7 = "call to 'resume' before 'invoke' with coroutine"
|
||||
r6.<init>(r7)
|
||||
throw r6
|
||||
L3f:
|
||||
long r6 = r0.J$0
|
||||
java.lang.Object r8 = r0.L$0
|
||||
kotlinx.coroutines.channels.SendChannel r8 = (kotlinx.coroutines.channels.SendChannel) r8
|
||||
kotlin.ResultKt.throwOnFailure(r11)
|
||||
goto L74
|
||||
L49:
|
||||
long r6 = r0.J$0
|
||||
java.lang.Object r8 = r0.L$0
|
||||
r10 = r8
|
||||
kotlinx.coroutines.channels.SendChannel r10 = (kotlinx.coroutines.channels.SendChannel) r10
|
||||
kotlin.ResultKt.throwOnFailure(r11)
|
||||
goto L64
|
||||
L54:
|
||||
kotlin.ResultKt.throwOnFailure(r11)
|
||||
r0.L$0 = r10
|
||||
r0.J$0 = r6
|
||||
r0.label = r5
|
||||
java.lang.Object r8 = kotlinx.coroutines.DelayKt.delay(r8, r0)
|
||||
if (r8 != r1) goto L64
|
||||
return r1
|
||||
L64:
|
||||
kotlin.Unit r8 = kotlin.Unit.INSTANCE
|
||||
r0.L$0 = r10
|
||||
r0.J$0 = r6
|
||||
r0.label = r4
|
||||
java.lang.Object r8 = r10.send(r8, r0)
|
||||
if (r8 != r1) goto L73
|
||||
return r1
|
||||
L73:
|
||||
r8 = r10
|
||||
L74:
|
||||
r0.L$0 = r8
|
||||
r0.J$0 = r6
|
||||
r0.label = r3
|
||||
java.lang.Object r9 = kotlinx.coroutines.DelayKt.delay(r6, r0)
|
||||
if (r9 != r1) goto L35
|
||||
return r1
|
||||
*/
|
||||
throw new UnsupportedOperationException("Method not decompiled: kotlinx.coroutines.channels.TickerChannelsKt.fixedDelayTicker(long, long, kotlinx.coroutines.channels.SendChannel, kotlin.coroutines.Continuation):java.lang.Object");
|
||||
}
|
||||
}
|
@ -0,0 +1,11 @@
|
||||
package kotlinx.coroutines.channels;
|
||||
|
||||
import kotlin.Metadata;
|
||||
|
||||
/* compiled from: TickerChannels.kt */
|
||||
@Metadata(d1 = {"\u0000\f\n\u0002\u0018\u0002\n\u0002\u0010\u0010\n\u0002\b\u0004\b\u0087\u0001\u0018\u00002\b\u0012\u0004\u0012\u00020\u00000\u0001B\u0007\b\u0002¢\u0006\u0002\u0010\u0002j\u0002\b\u0003j\u0002\b\u0004¨\u0006\u0005"}, d2 = {"Lkotlinx/coroutines/channels/TickerMode;", "", "(Ljava/lang/String;I)V", "FIXED_PERIOD", "FIXED_DELAY", "kotlinx-coroutines-core"}, k = 1, mv = {1, 8, 0}, xi = 48)
|
||||
/* loaded from: classes.dex */
|
||||
public enum TickerMode {
|
||||
FIXED_PERIOD,
|
||||
FIXED_DELAY
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
package kotlinx.coroutines.channels;
|
||||
|
||||
import kotlin.Metadata;
|
||||
import kotlinx.coroutines.Waiter;
|
||||
|
||||
/* compiled from: BufferedChannel.kt */
|
||||
@Metadata(d1 = {"\u0000\u0018\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\u000e\n\u0000\b\u0002\u0018\u00002\u00020\u0001B\r\u0012\u0006\u0010\u0002\u001a\u00020\u0003¢\u0006\u0002\u0010\u0004J\b\u0010\u0005\u001a\u00020\u0006H\u0016R\u0010\u0010\u0002\u001a\u00020\u00038\u0006X\u0087\u0004¢\u0006\u0002\n\u0000¨\u0006\u0007"}, d2 = {"Lkotlinx/coroutines/channels/WaiterEB;", "", "waiter", "Lkotlinx/coroutines/Waiter;", "(Lkotlinx/coroutines/Waiter;)V", "toString", "", "kotlinx-coroutines-core"}, k = 1, mv = {1, 8, 0}, xi = 48)
|
||||
/* loaded from: classes.dex */
|
||||
final class WaiterEB {
|
||||
public final Waiter waiter;
|
||||
|
||||
public WaiterEB(Waiter waiter) {
|
||||
this.waiter = waiter;
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return "WaiterEB(" + this.waiter + ')';
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user