320 lines
10 KiB
Smali
320 lines
10 KiB
Smali
.class public final Lkotlinx/coroutines/flow/CallbackFlowBuilder;
|
|
.super Lkotlinx/coroutines/flow/d;
|
|
.source "Builders.kt"
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"<T:",
|
|
"Ljava/lang/Object;",
|
|
">",
|
|
"Lkotlinx/coroutines/flow/d<",
|
|
"TT;>;"
|
|
}
|
|
.end annotation
|
|
|
|
.annotation runtime Lkotlin/Metadata;
|
|
bv = {}
|
|
d1 = {
|
|
"\u0000D\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0008\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0008\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\u0018\u0002\n\u0002\u0008\u0004\u0008\u0002\u0018\u0000*\u0004\u0008\u0000\u0010\u00012\u0008\u0012\u0004\u0012\u00028\u00000\u0002BW\u0012-\u0010\u0014\u001a)\u0008\u0001\u0012\n\u0012\u0008\u0012\u0004\u0012\u00028\u00000\u0003\u0012\n\u0012\u0008\u0012\u0004\u0012\u00020\u00050\u0011\u0012\u0006\u0012\u0004\u0018\u00010\u00120\u0010\u00a2\u0006\u0002\u0008\u0013\u0012\u0008\u0008\u0002\u0010\t\u001a\u00020\u0008\u0012\u0008\u0008\u0002\u0010\u000b\u001a\u00020\n\u0012\u0008\u0008\u0002\u0010\r\u001a\u00020\u000c\u00f8\u0001\u0000\u00a2\u0006\u0004\u0008\u0015\u0010\u0016J!\u0010\u0006\u001a\u00020\u00052\u000c\u0010\u0004\u001a\u0008\u0012\u0004\u0012\u00028\u00000\u0003H\u0094@\u00f8\u0001\u0000\u00a2\u0006\u0004\u0008\u0006\u0010\u0007J&\u0010\u000f\u001a\u0008\u0012\u0004\u0012\u00028\u00000\u000e2\u0006\u0010\t\u001a\u00020\u00082\u0006\u0010\u000b\u001a\u00020\n2\u0006\u0010\r\u001a\u00020\u000cH\u0014\u0082\u0002\u0004\n\u0002\u0008\u0019\u00a8\u0006\u0017"
|
|
}
|
|
d2 = {
|
|
"Lkotlinx/coroutines/flow/CallbackFlowBuilder;",
|
|
"T",
|
|
"Lkotlinx/coroutines/flow/d;",
|
|
"Lkotlinx/coroutines/channels/x;",
|
|
"scope",
|
|
"Lkotlin/d1;",
|
|
"j",
|
|
"(Lkotlinx/coroutines/channels/x;Lkotlin/coroutines/c;)Ljava/lang/Object;",
|
|
"Lkotlin/coroutines/CoroutineContext;",
|
|
"context",
|
|
"",
|
|
"capacity",
|
|
"Lkotlinx/coroutines/channels/BufferOverflow;",
|
|
"onBufferOverflow",
|
|
"Lkotlinx/coroutines/flow/internal/ChannelFlow;",
|
|
"k",
|
|
"Lkotlin/Function2;",
|
|
"Lkotlin/coroutines/c;",
|
|
"",
|
|
"Lkotlin/ExtensionFunctionType;",
|
|
"block",
|
|
"<init>",
|
|
"(Lej/p;Lkotlin/coroutines/CoroutineContext;ILkotlinx/coroutines/channels/BufferOverflow;)V",
|
|
"kotlinx-coroutines-core"
|
|
}
|
|
k = 0x1
|
|
mv = {
|
|
0x1,
|
|
0x4,
|
|
0x0
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# instance fields
|
|
.field public final e:Lej/p;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Lej/p<",
|
|
"Lkotlinx/coroutines/channels/x<",
|
|
"-TT;>;",
|
|
"Lkotlin/coroutines/c<",
|
|
"-",
|
|
"Lkotlin/d1;",
|
|
">;",
|
|
"Ljava/lang/Object;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(Lej/p;Lkotlin/coroutines/CoroutineContext;ILkotlinx/coroutines/channels/BufferOverflow;)V
|
|
.locals 0
|
|
.param p1 # Lej/p;
|
|
.annotation build Lorg/jetbrains/annotations/NotNull;
|
|
.end annotation
|
|
.end param
|
|
.param p2 # Lkotlin/coroutines/CoroutineContext;
|
|
.annotation build Lorg/jetbrains/annotations/NotNull;
|
|
.end annotation
|
|
.end param
|
|
.param p4 # Lkotlinx/coroutines/channels/BufferOverflow;
|
|
.annotation build Lorg/jetbrains/annotations/NotNull;
|
|
.end annotation
|
|
.end param
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Lej/p<",
|
|
"-",
|
|
"Lkotlinx/coroutines/channels/x<",
|
|
"-TT;>;-",
|
|
"Lkotlin/coroutines/c<",
|
|
"-",
|
|
"Lkotlin/d1;",
|
|
">;+",
|
|
"Ljava/lang/Object;",
|
|
">;",
|
|
"Lkotlin/coroutines/CoroutineContext;",
|
|
"I",
|
|
"Lkotlinx/coroutines/channels/BufferOverflow;",
|
|
")V"
|
|
}
|
|
.end annotation
|
|
|
|
.line 3
|
|
invoke-direct {p0, p1, p2, p3, p4}, Lkotlinx/coroutines/flow/d;-><init>(Lej/p;Lkotlin/coroutines/CoroutineContext;ILkotlinx/coroutines/channels/BufferOverflow;)V
|
|
|
|
iput-object p1, p0, Lkotlinx/coroutines/flow/CallbackFlowBuilder;->e:Lej/p;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public synthetic constructor <init>(Lej/p;Lkotlin/coroutines/CoroutineContext;ILkotlinx/coroutines/channels/BufferOverflow;ILkotlin/jvm/internal/u;)V
|
|
.locals 0
|
|
|
|
and-int/lit8 p6, p5, 0x2
|
|
|
|
if-eqz p6, :cond_0
|
|
|
|
.line 1
|
|
sget-object p2, Lkotlin/coroutines/EmptyCoroutineContext;->INSTANCE:Lkotlin/coroutines/EmptyCoroutineContext;
|
|
|
|
:cond_0
|
|
and-int/lit8 p6, p5, 0x4
|
|
|
|
if-eqz p6, :cond_1
|
|
|
|
const/4 p3, -0x2
|
|
|
|
:cond_1
|
|
and-int/lit8 p5, p5, 0x8
|
|
|
|
if-eqz p5, :cond_2
|
|
|
|
.line 2
|
|
sget-object p4, Lkotlinx/coroutines/channels/BufferOverflow;->SUSPEND:Lkotlinx/coroutines/channels/BufferOverflow;
|
|
|
|
:cond_2
|
|
invoke-direct {p0, p1, p2, p3, p4}, Lkotlinx/coroutines/flow/CallbackFlowBuilder;-><init>(Lej/p;Lkotlin/coroutines/CoroutineContext;ILkotlinx/coroutines/channels/BufferOverflow;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public j(Lkotlinx/coroutines/channels/x;Lkotlin/coroutines/c;)Ljava/lang/Object;
|
|
.locals 4
|
|
.param p1 # Lkotlinx/coroutines/channels/x;
|
|
.annotation build Lorg/jetbrains/annotations/NotNull;
|
|
.end annotation
|
|
.end param
|
|
.param p2 # Lkotlin/coroutines/c;
|
|
.annotation build Lorg/jetbrains/annotations/NotNull;
|
|
.end annotation
|
|
.end param
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Lkotlinx/coroutines/channels/x<",
|
|
"-TT;>;",
|
|
"Lkotlin/coroutines/c<",
|
|
"-",
|
|
"Lkotlin/d1;",
|
|
">;)",
|
|
"Ljava/lang/Object;"
|
|
}
|
|
.end annotation
|
|
|
|
.annotation build Lorg/jetbrains/annotations/Nullable;
|
|
.end annotation
|
|
|
|
instance-of v0, p2, Lkotlinx/coroutines/flow/CallbackFlowBuilder$collectTo$1;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
move-object v0, p2
|
|
|
|
check-cast v0, Lkotlinx/coroutines/flow/CallbackFlowBuilder$collectTo$1;
|
|
|
|
iget v1, v0, Lkotlinx/coroutines/flow/CallbackFlowBuilder$collectTo$1;->label:I
|
|
|
|
const/high16 v2, -0x80000000
|
|
|
|
and-int v3, v1, v2
|
|
|
|
if-eqz v3, :cond_0
|
|
|
|
sub-int/2addr v1, v2
|
|
|
|
iput v1, v0, Lkotlinx/coroutines/flow/CallbackFlowBuilder$collectTo$1;->label:I
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
new-instance v0, Lkotlinx/coroutines/flow/CallbackFlowBuilder$collectTo$1;
|
|
|
|
invoke-direct {v0, p0, p2}, Lkotlinx/coroutines/flow/CallbackFlowBuilder$collectTo$1;-><init>(Lkotlinx/coroutines/flow/CallbackFlowBuilder;Lkotlin/coroutines/c;)V
|
|
|
|
:goto_0
|
|
iget-object p2, v0, Lkotlinx/coroutines/flow/CallbackFlowBuilder$collectTo$1;->result:Ljava/lang/Object;
|
|
|
|
invoke-static {}, Lvi/b;->h()Ljava/lang/Object;
|
|
|
|
move-result-object v1
|
|
|
|
.line 1
|
|
iget v2, v0, Lkotlinx/coroutines/flow/CallbackFlowBuilder$collectTo$1;->label:I
|
|
|
|
const/4 v3, 0x1
|
|
|
|
if-eqz v2, :cond_2
|
|
|
|
if-ne v2, v3, :cond_1
|
|
|
|
iget-object p1, v0, Lkotlinx/coroutines/flow/CallbackFlowBuilder$collectTo$1;->L$1:Ljava/lang/Object;
|
|
|
|
check-cast p1, Lkotlinx/coroutines/channels/x;
|
|
|
|
iget-object v0, v0, Lkotlinx/coroutines/flow/CallbackFlowBuilder$collectTo$1;->L$0:Ljava/lang/Object;
|
|
|
|
check-cast v0, Lkotlinx/coroutines/flow/CallbackFlowBuilder;
|
|
|
|
invoke-static {p2}, Lkotlin/d0;->n(Ljava/lang/Object;)V
|
|
|
|
goto :goto_1
|
|
|
|
.line 2
|
|
:cond_1
|
|
new-instance p1, Ljava/lang/IllegalStateException;
|
|
|
|
const-string p2, "call to \'resume\' before \'invoke\' with coroutine"
|
|
|
|
invoke-direct {p1, p2}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p1
|
|
|
|
.line 3
|
|
:cond_2
|
|
invoke-static {p2}, Lkotlin/d0;->n(Ljava/lang/Object;)V
|
|
|
|
.line 4
|
|
iput-object p0, v0, Lkotlinx/coroutines/flow/CallbackFlowBuilder$collectTo$1;->L$0:Ljava/lang/Object;
|
|
|
|
iput-object p1, v0, Lkotlinx/coroutines/flow/CallbackFlowBuilder$collectTo$1;->L$1:Ljava/lang/Object;
|
|
|
|
iput v3, v0, Lkotlinx/coroutines/flow/CallbackFlowBuilder$collectTo$1;->label:I
|
|
|
|
invoke-super {p0, p1, v0}, Lkotlinx/coroutines/flow/d;->j(Lkotlinx/coroutines/channels/x;Lkotlin/coroutines/c;)Ljava/lang/Object;
|
|
|
|
move-result-object p2
|
|
|
|
if-ne p2, v1, :cond_3
|
|
|
|
return-object v1
|
|
|
|
.line 5
|
|
:cond_3
|
|
:goto_1
|
|
invoke-interface {p1}, Lkotlinx/coroutines/channels/d0;->F()Z
|
|
|
|
move-result p1
|
|
|
|
if-eqz p1, :cond_4
|
|
|
|
.line 6
|
|
sget-object p1, Lkotlin/d1;->a:Lkotlin/d1;
|
|
|
|
return-object p1
|
|
|
|
.line 7
|
|
:cond_4
|
|
new-instance p1, Ljava/lang/IllegalStateException;
|
|
|
|
const-string p2, "\'awaitClose { yourCallbackOrListener.cancel() }\' should be used in the end of callbackFlow block.\nOtherwise, a callback/listener may leak in case of external cancellation.\nSee callbackFlow API documentation for the details."
|
|
|
|
invoke-direct {p1, p2}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method public k(Lkotlin/coroutines/CoroutineContext;ILkotlinx/coroutines/channels/BufferOverflow;)Lkotlinx/coroutines/flow/internal/ChannelFlow;
|
|
.locals 2
|
|
.param p1 # Lkotlin/coroutines/CoroutineContext;
|
|
.annotation build Lorg/jetbrains/annotations/NotNull;
|
|
.end annotation
|
|
.end param
|
|
.param p3 # Lkotlinx/coroutines/channels/BufferOverflow;
|
|
.annotation build Lorg/jetbrains/annotations/NotNull;
|
|
.end annotation
|
|
.end param
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Lkotlin/coroutines/CoroutineContext;",
|
|
"I",
|
|
"Lkotlinx/coroutines/channels/BufferOverflow;",
|
|
")",
|
|
"Lkotlinx/coroutines/flow/internal/ChannelFlow<",
|
|
"TT;>;"
|
|
}
|
|
.end annotation
|
|
|
|
.annotation build Lorg/jetbrains/annotations/NotNull;
|
|
.end annotation
|
|
|
|
.line 1
|
|
new-instance v0, Lkotlinx/coroutines/flow/CallbackFlowBuilder;
|
|
|
|
iget-object v1, p0, Lkotlinx/coroutines/flow/CallbackFlowBuilder;->e:Lej/p;
|
|
|
|
invoke-direct {v0, v1, p1, p2, p3}, Lkotlinx/coroutines/flow/CallbackFlowBuilder;-><init>(Lej/p;Lkotlin/coroutines/CoroutineContext;ILkotlinx/coroutines/channels/BufferOverflow;)V
|
|
|
|
return-object v0
|
|
.end method
|