tmap/smali_classes5/io/reactivex/internal/operators/flowable/FlowableWithLatestFromMany$WithLatestFromSubscriber.smali
2022-06-10 21:38:30 +09:00

567 lines
18 KiB
Smali

.class final Lio/reactivex/internal/operators/flowable/FlowableWithLatestFromMany$WithLatestFromSubscriber;
.super Ljava/util/concurrent/atomic/AtomicInteger;
.source "FlowableWithLatestFromMany.java"
# interfaces
.implements Lrh/a;
.implements Lok/e;
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lio/reactivex/internal/operators/flowable/FlowableWithLatestFromMany;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x19
name = "WithLatestFromSubscriber"
.end annotation
.annotation system Ldalvik/annotation/Signature;
value = {
"<T:",
"Ljava/lang/Object;",
"R:",
"Ljava/lang/Object;",
">",
"Ljava/util/concurrent/atomic/AtomicInteger;",
"Lrh/a<",
"TT;>;",
"Lok/e;"
}
.end annotation
# static fields
.field private static final serialVersionUID:J = 0x15e3c5e57e438349L
# instance fields
.field public final combiner:Lph/o;
.annotation system Ldalvik/annotation/Signature;
value = {
"Lph/o<",
"-[",
"Ljava/lang/Object;",
"TR;>;"
}
.end annotation
.end field
.field public volatile done:Z
.field public final downstream:Lok/d;
.annotation system Ldalvik/annotation/Signature;
value = {
"Lok/d<",
"-TR;>;"
}
.end annotation
.end field
.field public final error:Lio/reactivex/internal/util/AtomicThrowable;
.field public final requested:Ljava/util/concurrent/atomic/AtomicLong;
.field public final subscribers:[Lio/reactivex/internal/operators/flowable/FlowableWithLatestFromMany$WithLatestInnerSubscriber;
.field public final upstream:Ljava/util/concurrent/atomic/AtomicReference;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/concurrent/atomic/AtomicReference<",
"Lok/e;",
">;"
}
.end annotation
.end field
.field public final values:Ljava/util/concurrent/atomic/AtomicReferenceArray;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/concurrent/atomic/AtomicReferenceArray<",
"Ljava/lang/Object;",
">;"
}
.end annotation
.end field
# direct methods
.method public constructor <init>(Lok/d;Lph/o;I)V
.locals 1
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Lok/d<",
"-TR;>;",
"Lph/o<",
"-[",
"Ljava/lang/Object;",
"TR;>;I)V"
}
.end annotation
.line 1
invoke-direct {p0}, Ljava/util/concurrent/atomic/AtomicInteger;-><init>()V
.line 2
iput-object p1, p0, Lio/reactivex/internal/operators/flowable/FlowableWithLatestFromMany$WithLatestFromSubscriber;->downstream:Lok/d;
.line 3
iput-object p2, p0, Lio/reactivex/internal/operators/flowable/FlowableWithLatestFromMany$WithLatestFromSubscriber;->combiner:Lph/o;
.line 4
new-array p1, p3, [Lio/reactivex/internal/operators/flowable/FlowableWithLatestFromMany$WithLatestInnerSubscriber;
const/4 p2, 0x0
:goto_0
if-ge p2, p3, :cond_0
.line 5
new-instance v0, Lio/reactivex/internal/operators/flowable/FlowableWithLatestFromMany$WithLatestInnerSubscriber;
invoke-direct {v0, p0, p2}, Lio/reactivex/internal/operators/flowable/FlowableWithLatestFromMany$WithLatestInnerSubscriber;-><init>(Lio/reactivex/internal/operators/flowable/FlowableWithLatestFromMany$WithLatestFromSubscriber;I)V
aput-object v0, p1, p2
add-int/lit8 p2, p2, 0x1
goto :goto_0
.line 6
:cond_0
iput-object p1, p0, Lio/reactivex/internal/operators/flowable/FlowableWithLatestFromMany$WithLatestFromSubscriber;->subscribers:[Lio/reactivex/internal/operators/flowable/FlowableWithLatestFromMany$WithLatestInnerSubscriber;
.line 7
new-instance p1, Ljava/util/concurrent/atomic/AtomicReferenceArray;
invoke-direct {p1, p3}, Ljava/util/concurrent/atomic/AtomicReferenceArray;-><init>(I)V
iput-object p1, p0, Lio/reactivex/internal/operators/flowable/FlowableWithLatestFromMany$WithLatestFromSubscriber;->values:Ljava/util/concurrent/atomic/AtomicReferenceArray;
.line 8
new-instance p1, Ljava/util/concurrent/atomic/AtomicReference;
invoke-direct {p1}, Ljava/util/concurrent/atomic/AtomicReference;-><init>()V
iput-object p1, p0, Lio/reactivex/internal/operators/flowable/FlowableWithLatestFromMany$WithLatestFromSubscriber;->upstream:Ljava/util/concurrent/atomic/AtomicReference;
.line 9
new-instance p1, Ljava/util/concurrent/atomic/AtomicLong;
invoke-direct {p1}, Ljava/util/concurrent/atomic/AtomicLong;-><init>()V
iput-object p1, p0, Lio/reactivex/internal/operators/flowable/FlowableWithLatestFromMany$WithLatestFromSubscriber;->requested:Ljava/util/concurrent/atomic/AtomicLong;
.line 10
new-instance p1, Lio/reactivex/internal/util/AtomicThrowable;
invoke-direct {p1}, Lio/reactivex/internal/util/AtomicThrowable;-><init>()V
iput-object p1, p0, Lio/reactivex/internal/operators/flowable/FlowableWithLatestFromMany$WithLatestFromSubscriber;->error:Lio/reactivex/internal/util/AtomicThrowable;
return-void
.end method
# virtual methods
.method public cancel()V
.locals 4
.line 1
iget-object v0, p0, Lio/reactivex/internal/operators/flowable/FlowableWithLatestFromMany$WithLatestFromSubscriber;->upstream:Ljava/util/concurrent/atomic/AtomicReference;
invoke-static {v0}, Lio/reactivex/internal/subscriptions/SubscriptionHelper;->cancel(Ljava/util/concurrent/atomic/AtomicReference;)Z
.line 2
iget-object v0, p0, Lio/reactivex/internal/operators/flowable/FlowableWithLatestFromMany$WithLatestFromSubscriber;->subscribers:[Lio/reactivex/internal/operators/flowable/FlowableWithLatestFromMany$WithLatestInnerSubscriber;
array-length v1, v0
const/4 v2, 0x0
:goto_0
if-ge v2, v1, :cond_0
aget-object v3, v0, v2
.line 3
invoke-virtual {v3}, Lio/reactivex/internal/operators/flowable/FlowableWithLatestFromMany$WithLatestInnerSubscriber;->dispose()V
add-int/lit8 v2, v2, 0x1
goto :goto_0
:cond_0
return-void
.end method
.method public cancelAllBut(I)V
.locals 3
.line 1
iget-object v0, p0, Lio/reactivex/internal/operators/flowable/FlowableWithLatestFromMany$WithLatestFromSubscriber;->subscribers:[Lio/reactivex/internal/operators/flowable/FlowableWithLatestFromMany$WithLatestInnerSubscriber;
const/4 v1, 0x0
.line 2
:goto_0
array-length v2, v0
if-ge v1, v2, :cond_1
if-eq v1, p1, :cond_0
.line 3
aget-object v2, v0, v1
invoke-virtual {v2}, Lio/reactivex/internal/operators/flowable/FlowableWithLatestFromMany$WithLatestInnerSubscriber;->dispose()V
:cond_0
add-int/lit8 v1, v1, 0x1
goto :goto_0
:cond_1
return-void
.end method
.method public innerComplete(IZ)V
.locals 0
if-nez p2, :cond_0
const/4 p2, 0x1
.line 1
iput-boolean p2, p0, Lio/reactivex/internal/operators/flowable/FlowableWithLatestFromMany$WithLatestFromSubscriber;->done:Z
.line 2
iget-object p2, p0, Lio/reactivex/internal/operators/flowable/FlowableWithLatestFromMany$WithLatestFromSubscriber;->upstream:Ljava/util/concurrent/atomic/AtomicReference;
invoke-static {p2}, Lio/reactivex/internal/subscriptions/SubscriptionHelper;->cancel(Ljava/util/concurrent/atomic/AtomicReference;)Z
.line 3
invoke-virtual {p0, p1}, Lio/reactivex/internal/operators/flowable/FlowableWithLatestFromMany$WithLatestFromSubscriber;->cancelAllBut(I)V
.line 4
iget-object p1, p0, Lio/reactivex/internal/operators/flowable/FlowableWithLatestFromMany$WithLatestFromSubscriber;->downstream:Lok/d;
iget-object p2, p0, Lio/reactivex/internal/operators/flowable/FlowableWithLatestFromMany$WithLatestFromSubscriber;->error:Lio/reactivex/internal/util/AtomicThrowable;
invoke-static {p1, p0, p2}, Lio/reactivex/internal/util/g;->b(Lok/d;Ljava/util/concurrent/atomic/AtomicInteger;Lio/reactivex/internal/util/AtomicThrowable;)V
:cond_0
return-void
.end method
.method public innerError(ILjava/lang/Throwable;)V
.locals 1
const/4 v0, 0x1
.line 1
iput-boolean v0, p0, Lio/reactivex/internal/operators/flowable/FlowableWithLatestFromMany$WithLatestFromSubscriber;->done:Z
.line 2
iget-object v0, p0, Lio/reactivex/internal/operators/flowable/FlowableWithLatestFromMany$WithLatestFromSubscriber;->upstream:Ljava/util/concurrent/atomic/AtomicReference;
invoke-static {v0}, Lio/reactivex/internal/subscriptions/SubscriptionHelper;->cancel(Ljava/util/concurrent/atomic/AtomicReference;)Z
.line 3
invoke-virtual {p0, p1}, Lio/reactivex/internal/operators/flowable/FlowableWithLatestFromMany$WithLatestFromSubscriber;->cancelAllBut(I)V
.line 4
iget-object p1, p0, Lio/reactivex/internal/operators/flowable/FlowableWithLatestFromMany$WithLatestFromSubscriber;->downstream:Lok/d;
iget-object v0, p0, Lio/reactivex/internal/operators/flowable/FlowableWithLatestFromMany$WithLatestFromSubscriber;->error:Lio/reactivex/internal/util/AtomicThrowable;
invoke-static {p1, p2, p0, v0}, Lio/reactivex/internal/util/g;->d(Lok/d;Ljava/lang/Throwable;Ljava/util/concurrent/atomic/AtomicInteger;Lio/reactivex/internal/util/AtomicThrowable;)V
return-void
.end method
.method public innerNext(ILjava/lang/Object;)V
.locals 1
.line 1
iget-object v0, p0, Lio/reactivex/internal/operators/flowable/FlowableWithLatestFromMany$WithLatestFromSubscriber;->values:Ljava/util/concurrent/atomic/AtomicReferenceArray;
invoke-virtual {v0, p1, p2}, Ljava/util/concurrent/atomic/AtomicReferenceArray;->set(ILjava/lang/Object;)V
return-void
.end method
.method public onComplete()V
.locals 2
.line 1
iget-boolean v0, p0, Lio/reactivex/internal/operators/flowable/FlowableWithLatestFromMany$WithLatestFromSubscriber;->done:Z
if-nez v0, :cond_0
const/4 v0, 0x1
.line 2
iput-boolean v0, p0, Lio/reactivex/internal/operators/flowable/FlowableWithLatestFromMany$WithLatestFromSubscriber;->done:Z
const/4 v0, -0x1
.line 3
invoke-virtual {p0, v0}, Lio/reactivex/internal/operators/flowable/FlowableWithLatestFromMany$WithLatestFromSubscriber;->cancelAllBut(I)V
.line 4
iget-object v0, p0, Lio/reactivex/internal/operators/flowable/FlowableWithLatestFromMany$WithLatestFromSubscriber;->downstream:Lok/d;
iget-object v1, p0, Lio/reactivex/internal/operators/flowable/FlowableWithLatestFromMany$WithLatestFromSubscriber;->error:Lio/reactivex/internal/util/AtomicThrowable;
invoke-static {v0, p0, v1}, Lio/reactivex/internal/util/g;->b(Lok/d;Ljava/util/concurrent/atomic/AtomicInteger;Lio/reactivex/internal/util/AtomicThrowable;)V
:cond_0
return-void
.end method
.method public onError(Ljava/lang/Throwable;)V
.locals 2
.line 1
iget-boolean v0, p0, Lio/reactivex/internal/operators/flowable/FlowableWithLatestFromMany$WithLatestFromSubscriber;->done:Z
if-eqz v0, :cond_0
.line 2
invoke-static {p1}, Lwh/a;->Y(Ljava/lang/Throwable;)V
return-void
:cond_0
const/4 v0, 0x1
.line 3
iput-boolean v0, p0, Lio/reactivex/internal/operators/flowable/FlowableWithLatestFromMany$WithLatestFromSubscriber;->done:Z
const/4 v0, -0x1
.line 4
invoke-virtual {p0, v0}, Lio/reactivex/internal/operators/flowable/FlowableWithLatestFromMany$WithLatestFromSubscriber;->cancelAllBut(I)V
.line 5
iget-object v0, p0, Lio/reactivex/internal/operators/flowable/FlowableWithLatestFromMany$WithLatestFromSubscriber;->downstream:Lok/d;
iget-object v1, p0, Lio/reactivex/internal/operators/flowable/FlowableWithLatestFromMany$WithLatestFromSubscriber;->error:Lio/reactivex/internal/util/AtomicThrowable;
invoke-static {v0, p1, p0, v1}, Lio/reactivex/internal/util/g;->d(Lok/d;Ljava/lang/Throwable;Ljava/util/concurrent/atomic/AtomicInteger;Lio/reactivex/internal/util/AtomicThrowable;)V
return-void
.end method
.method public onNext(Ljava/lang/Object;)V
.locals 2
.annotation system Ldalvik/annotation/Signature;
value = {
"(TT;)V"
}
.end annotation
.line 1
invoke-virtual {p0, p1}, Lio/reactivex/internal/operators/flowable/FlowableWithLatestFromMany$WithLatestFromSubscriber;->tryOnNext(Ljava/lang/Object;)Z
move-result p1
if-nez p1, :cond_0
iget-boolean p1, p0, Lio/reactivex/internal/operators/flowable/FlowableWithLatestFromMany$WithLatestFromSubscriber;->done:Z
if-nez p1, :cond_0
.line 2
iget-object p1, p0, Lio/reactivex/internal/operators/flowable/FlowableWithLatestFromMany$WithLatestFromSubscriber;->upstream:Ljava/util/concurrent/atomic/AtomicReference;
invoke-virtual {p1}, Ljava/util/concurrent/atomic/AtomicReference;->get()Ljava/lang/Object;
move-result-object p1
check-cast p1, Lok/e;
const-wide/16 v0, 0x1
invoke-interface {p1, v0, v1}, Lok/e;->request(J)V
:cond_0
return-void
.end method
.method public onSubscribe(Lok/e;)V
.locals 2
.line 1
iget-object v0, p0, Lio/reactivex/internal/operators/flowable/FlowableWithLatestFromMany$WithLatestFromSubscriber;->upstream:Ljava/util/concurrent/atomic/AtomicReference;
iget-object v1, p0, Lio/reactivex/internal/operators/flowable/FlowableWithLatestFromMany$WithLatestFromSubscriber;->requested:Ljava/util/concurrent/atomic/AtomicLong;
invoke-static {v0, v1, p1}, Lio/reactivex/internal/subscriptions/SubscriptionHelper;->deferredSetOnce(Ljava/util/concurrent/atomic/AtomicReference;Ljava/util/concurrent/atomic/AtomicLong;Lok/e;)Z
return-void
.end method
.method public request(J)V
.locals 2
.line 1
iget-object v0, p0, Lio/reactivex/internal/operators/flowable/FlowableWithLatestFromMany$WithLatestFromSubscriber;->upstream:Ljava/util/concurrent/atomic/AtomicReference;
iget-object v1, p0, Lio/reactivex/internal/operators/flowable/FlowableWithLatestFromMany$WithLatestFromSubscriber;->requested:Ljava/util/concurrent/atomic/AtomicLong;
invoke-static {v0, v1, p1, p2}, Lio/reactivex/internal/subscriptions/SubscriptionHelper;->deferredRequest(Ljava/util/concurrent/atomic/AtomicReference;Ljava/util/concurrent/atomic/AtomicLong;J)V
return-void
.end method
.method public subscribe([Lok/c;I)V
.locals 5
.annotation system Ldalvik/annotation/Signature;
value = {
"([",
"Lok/c<",
"*>;I)V"
}
.end annotation
.line 1
iget-object v0, p0, Lio/reactivex/internal/operators/flowable/FlowableWithLatestFromMany$WithLatestFromSubscriber;->subscribers:[Lio/reactivex/internal/operators/flowable/FlowableWithLatestFromMany$WithLatestInnerSubscriber;
.line 2
iget-object v1, p0, Lio/reactivex/internal/operators/flowable/FlowableWithLatestFromMany$WithLatestFromSubscriber;->upstream:Ljava/util/concurrent/atomic/AtomicReference;
const/4 v2, 0x0
:goto_0
if-ge v2, p2, :cond_1
.line 3
invoke-virtual {v1}, Ljava/util/concurrent/atomic/AtomicReference;->get()Ljava/lang/Object;
move-result-object v3
sget-object v4, Lio/reactivex/internal/subscriptions/SubscriptionHelper;->CANCELLED:Lio/reactivex/internal/subscriptions/SubscriptionHelper;
if-ne v3, v4, :cond_0
return-void
.line 4
:cond_0
aget-object v3, p1, v2
aget-object v4, v0, v2
invoke-interface {v3, v4}, Lok/c;->subscribe(Lok/d;)V
add-int/lit8 v2, v2, 0x1
goto :goto_0
:cond_1
return-void
.end method
.method public tryOnNext(Ljava/lang/Object;)Z
.locals 5
.annotation system Ldalvik/annotation/Signature;
value = {
"(TT;)Z"
}
.end annotation
.line 1
iget-boolean v0, p0, Lio/reactivex/internal/operators/flowable/FlowableWithLatestFromMany$WithLatestFromSubscriber;->done:Z
const/4 v1, 0x0
if-eqz v0, :cond_0
return v1
.line 2
:cond_0
iget-object v0, p0, Lio/reactivex/internal/operators/flowable/FlowableWithLatestFromMany$WithLatestFromSubscriber;->values:Ljava/util/concurrent/atomic/AtomicReferenceArray;
.line 3
invoke-virtual {v0}, Ljava/util/concurrent/atomic/AtomicReferenceArray;->length()I
move-result v2
add-int/lit8 v3, v2, 0x1
.line 4
new-array v3, v3, [Ljava/lang/Object;
.line 5
aput-object p1, v3, v1
move p1, v1
:goto_0
if-ge p1, v2, :cond_2
.line 6
invoke-virtual {v0, p1}, Ljava/util/concurrent/atomic/AtomicReferenceArray;->get(I)Ljava/lang/Object;
move-result-object v4
if-nez v4, :cond_1
return v1
:cond_1
add-int/lit8 p1, p1, 0x1
.line 7
aput-object v4, v3, p1
goto :goto_0
.line 8
:cond_2
:try_start_0
iget-object p1, p0, Lio/reactivex/internal/operators/flowable/FlowableWithLatestFromMany$WithLatestFromSubscriber;->combiner:Lph/o;
invoke-interface {p1, v3}, Lph/o;->apply(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object p1
const-string v0, "The combiner returned a null value"
invoke-static {p1, v0}, Lio/reactivex/internal/functions/a;->g(Ljava/lang/Object;Ljava/lang/String;)Ljava/lang/Object;
move-result-object p1
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
.line 9
iget-object v0, p0, Lio/reactivex/internal/operators/flowable/FlowableWithLatestFromMany$WithLatestFromSubscriber;->downstream:Lok/d;
iget-object v1, p0, Lio/reactivex/internal/operators/flowable/FlowableWithLatestFromMany$WithLatestFromSubscriber;->error:Lio/reactivex/internal/util/AtomicThrowable;
invoke-static {v0, p1, p0, v1}, Lio/reactivex/internal/util/g;->f(Lok/d;Ljava/lang/Object;Ljava/util/concurrent/atomic/AtomicInteger;Lio/reactivex/internal/util/AtomicThrowable;)V
const/4 p1, 0x1
return p1
:catchall_0
move-exception p1
.line 10
invoke-static {p1}, Lio/reactivex/exceptions/a;->b(Ljava/lang/Throwable;)V
.line 11
invoke-virtual {p0}, Lio/reactivex/internal/operators/flowable/FlowableWithLatestFromMany$WithLatestFromSubscriber;->cancel()V
.line 12
invoke-virtual {p0, p1}, Lio/reactivex/internal/operators/flowable/FlowableWithLatestFromMany$WithLatestFromSubscriber;->onError(Ljava/lang/Throwable;)V
return v1
.end method