2022-06-10 21:38:30 +09:00

522 lines
13 KiB
Smali

.class public final Lio/reactivex/internal/operators/maybe/MaybeCache;
.super Lkh/q;
.source "MaybeCache.java"
# interfaces
.implements Lkh/t;
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Lio/reactivex/internal/operators/maybe/MaybeCache$CacheDisposable;
}
.end annotation
.annotation system Ldalvik/annotation/Signature;
value = {
"<T:",
"Ljava/lang/Object;",
">",
"Lkh/q<",
"TT;>;",
"Lkh/t<",
"TT;>;"
}
.end annotation
# static fields
.field public static final e:[Lio/reactivex/internal/operators/maybe/MaybeCache$CacheDisposable;
.field public static final f:[Lio/reactivex/internal/operators/maybe/MaybeCache$CacheDisposable;
# instance fields
.field public final a:Ljava/util/concurrent/atomic/AtomicReference;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/concurrent/atomic/AtomicReference<",
"Lkh/w<",
"TT;>;>;"
}
.end annotation
.end field
.field public final b:Ljava/util/concurrent/atomic/AtomicReference;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/concurrent/atomic/AtomicReference<",
"[",
"Lio/reactivex/internal/operators/maybe/MaybeCache$CacheDisposable<",
"TT;>;>;"
}
.end annotation
.end field
.field public c:Ljava/lang/Object;
.annotation system Ldalvik/annotation/Signature;
value = {
"TT;"
}
.end annotation
.end field
.field public d:Ljava/lang/Throwable;
# direct methods
.method public static constructor <clinit>()V
.locals 2
const/4 v0, 0x0
new-array v1, v0, [Lio/reactivex/internal/operators/maybe/MaybeCache$CacheDisposable;
.line 1
sput-object v1, Lio/reactivex/internal/operators/maybe/MaybeCache;->e:[Lio/reactivex/internal/operators/maybe/MaybeCache$CacheDisposable;
new-array v0, v0, [Lio/reactivex/internal/operators/maybe/MaybeCache$CacheDisposable;
.line 2
sput-object v0, Lio/reactivex/internal/operators/maybe/MaybeCache;->f:[Lio/reactivex/internal/operators/maybe/MaybeCache$CacheDisposable;
return-void
.end method
.method public constructor <init>(Lkh/w;)V
.locals 1
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Lkh/w<",
"TT;>;)V"
}
.end annotation
.line 1
invoke-direct {p0}, Lkh/q;-><init>()V
.line 2
new-instance v0, Ljava/util/concurrent/atomic/AtomicReference;
invoke-direct {v0, p1}, Ljava/util/concurrent/atomic/AtomicReference;-><init>(Ljava/lang/Object;)V
iput-object v0, p0, Lio/reactivex/internal/operators/maybe/MaybeCache;->a:Ljava/util/concurrent/atomic/AtomicReference;
.line 3
new-instance p1, Ljava/util/concurrent/atomic/AtomicReference;
sget-object v0, Lio/reactivex/internal/operators/maybe/MaybeCache;->e:[Lio/reactivex/internal/operators/maybe/MaybeCache$CacheDisposable;
invoke-direct {p1, v0}, Ljava/util/concurrent/atomic/AtomicReference;-><init>(Ljava/lang/Object;)V
iput-object p1, p0, Lio/reactivex/internal/operators/maybe/MaybeCache;->b:Ljava/util/concurrent/atomic/AtomicReference;
return-void
.end method
# virtual methods
.method public d2(Lio/reactivex/internal/operators/maybe/MaybeCache$CacheDisposable;)Z
.locals 4
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Lio/reactivex/internal/operators/maybe/MaybeCache$CacheDisposable<",
"TT;>;)Z"
}
.end annotation
.line 1
:cond_0
iget-object v0, p0, Lio/reactivex/internal/operators/maybe/MaybeCache;->b:Ljava/util/concurrent/atomic/AtomicReference;
invoke-virtual {v0}, Ljava/util/concurrent/atomic/AtomicReference;->get()Ljava/lang/Object;
move-result-object v0
check-cast v0, [Lio/reactivex/internal/operators/maybe/MaybeCache$CacheDisposable;
.line 2
sget-object v1, Lio/reactivex/internal/operators/maybe/MaybeCache;->f:[Lio/reactivex/internal/operators/maybe/MaybeCache$CacheDisposable;
const/4 v2, 0x0
if-ne v0, v1, :cond_1
return v2
.line 3
:cond_1
array-length v1, v0
add-int/lit8 v3, v1, 0x1
.line 4
new-array v3, v3, [Lio/reactivex/internal/operators/maybe/MaybeCache$CacheDisposable;
.line 5
invoke-static {v0, v2, v3, v2, v1}, Ljava/lang/System;->arraycopy(Ljava/lang/Object;ILjava/lang/Object;II)V
.line 6
aput-object p1, v3, v1
.line 7
iget-object v1, p0, Lio/reactivex/internal/operators/maybe/MaybeCache;->b:Ljava/util/concurrent/atomic/AtomicReference;
invoke-virtual {v1, v0, v3}, Ljava/util/concurrent/atomic/AtomicReference;->compareAndSet(Ljava/lang/Object;Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_0
const/4 p1, 0x1
return p1
.end method
.method public e2(Lio/reactivex/internal/operators/maybe/MaybeCache$CacheDisposable;)V
.locals 6
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Lio/reactivex/internal/operators/maybe/MaybeCache$CacheDisposable<",
"TT;>;)V"
}
.end annotation
.line 1
:cond_0
iget-object v0, p0, Lio/reactivex/internal/operators/maybe/MaybeCache;->b:Ljava/util/concurrent/atomic/AtomicReference;
invoke-virtual {v0}, Ljava/util/concurrent/atomic/AtomicReference;->get()Ljava/lang/Object;
move-result-object v0
check-cast v0, [Lio/reactivex/internal/operators/maybe/MaybeCache$CacheDisposable;
.line 2
array-length v1, v0
if-nez v1, :cond_1
return-void
:cond_1
const/4 v2, -0x1
const/4 v3, 0x0
move v4, v3
:goto_0
if-ge v4, v1, :cond_3
.line 3
aget-object v5, v0, v4
if-ne v5, p1, :cond_2
move v2, v4
goto :goto_1
:cond_2
add-int/lit8 v4, v4, 0x1
goto :goto_0
:cond_3
:goto_1
if-gez v2, :cond_4
return-void
:cond_4
const/4 v4, 0x1
if-ne v1, v4, :cond_5
.line 4
sget-object v1, Lio/reactivex/internal/operators/maybe/MaybeCache;->e:[Lio/reactivex/internal/operators/maybe/MaybeCache$CacheDisposable;
goto :goto_2
:cond_5
add-int/lit8 v5, v1, -0x1
.line 5
new-array v5, v5, [Lio/reactivex/internal/operators/maybe/MaybeCache$CacheDisposable;
.line 6
invoke-static {v0, v3, v5, v3, v2}, Ljava/lang/System;->arraycopy(Ljava/lang/Object;ILjava/lang/Object;II)V
add-int/lit8 v3, v2, 0x1
sub-int/2addr v1, v2
sub-int/2addr v1, v4
.line 7
invoke-static {v0, v3, v5, v2, v1}, Ljava/lang/System;->arraycopy(Ljava/lang/Object;ILjava/lang/Object;II)V
move-object v1, v5
.line 8
:goto_2
iget-object v2, p0, Lio/reactivex/internal/operators/maybe/MaybeCache;->b:Ljava/util/concurrent/atomic/AtomicReference;
invoke-virtual {v2, v0, v1}, Ljava/util/concurrent/atomic/AtomicReference;->compareAndSet(Ljava/lang/Object;Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_0
return-void
.end method
.method public onComplete()V
.locals 5
.line 1
iget-object v0, p0, Lio/reactivex/internal/operators/maybe/MaybeCache;->b:Ljava/util/concurrent/atomic/AtomicReference;
sget-object v1, Lio/reactivex/internal/operators/maybe/MaybeCache;->f:[Lio/reactivex/internal/operators/maybe/MaybeCache$CacheDisposable;
invoke-virtual {v0, v1}, Ljava/util/concurrent/atomic/AtomicReference;->getAndSet(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v0
check-cast v0, [Lio/reactivex/internal/operators/maybe/MaybeCache$CacheDisposable;
array-length v1, v0
const/4 v2, 0x0
:goto_0
if-ge v2, v1, :cond_1
aget-object v3, v0, v2
.line 2
invoke-virtual {v3}, Lio/reactivex/internal/operators/maybe/MaybeCache$CacheDisposable;->isDisposed()Z
move-result v4
if-nez v4, :cond_0
.line 3
iget-object v3, v3, Lio/reactivex/internal/operators/maybe/MaybeCache$CacheDisposable;->downstream:Lkh/t;
invoke-interface {v3}, Lkh/t;->onComplete()V
:cond_0
add-int/lit8 v2, v2, 0x1
goto :goto_0
:cond_1
return-void
.end method
.method public onError(Ljava/lang/Throwable;)V
.locals 5
.line 1
iput-object p1, p0, Lio/reactivex/internal/operators/maybe/MaybeCache;->d:Ljava/lang/Throwable;
.line 2
iget-object v0, p0, Lio/reactivex/internal/operators/maybe/MaybeCache;->b:Ljava/util/concurrent/atomic/AtomicReference;
sget-object v1, Lio/reactivex/internal/operators/maybe/MaybeCache;->f:[Lio/reactivex/internal/operators/maybe/MaybeCache$CacheDisposable;
invoke-virtual {v0, v1}, Ljava/util/concurrent/atomic/AtomicReference;->getAndSet(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v0
check-cast v0, [Lio/reactivex/internal/operators/maybe/MaybeCache$CacheDisposable;
array-length v1, v0
const/4 v2, 0x0
:goto_0
if-ge v2, v1, :cond_1
aget-object v3, v0, v2
.line 3
invoke-virtual {v3}, Lio/reactivex/internal/operators/maybe/MaybeCache$CacheDisposable;->isDisposed()Z
move-result v4
if-nez v4, :cond_0
.line 4
iget-object v3, v3, Lio/reactivex/internal/operators/maybe/MaybeCache$CacheDisposable;->downstream:Lkh/t;
invoke-interface {v3, p1}, Lkh/t;->onError(Ljava/lang/Throwable;)V
:cond_0
add-int/lit8 v2, v2, 0x1
goto :goto_0
:cond_1
return-void
.end method
.method public onSubscribe(Lio/reactivex/disposables/b;)V
.locals 0
return-void
.end method
.method public onSuccess(Ljava/lang/Object;)V
.locals 5
.annotation system Ldalvik/annotation/Signature;
value = {
"(TT;)V"
}
.end annotation
.line 1
iput-object p1, p0, Lio/reactivex/internal/operators/maybe/MaybeCache;->c:Ljava/lang/Object;
.line 2
iget-object v0, p0, Lio/reactivex/internal/operators/maybe/MaybeCache;->b:Ljava/util/concurrent/atomic/AtomicReference;
sget-object v1, Lio/reactivex/internal/operators/maybe/MaybeCache;->f:[Lio/reactivex/internal/operators/maybe/MaybeCache$CacheDisposable;
invoke-virtual {v0, v1}, Ljava/util/concurrent/atomic/AtomicReference;->getAndSet(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v0
check-cast v0, [Lio/reactivex/internal/operators/maybe/MaybeCache$CacheDisposable;
array-length v1, v0
const/4 v2, 0x0
:goto_0
if-ge v2, v1, :cond_1
aget-object v3, v0, v2
.line 3
invoke-virtual {v3}, Lio/reactivex/internal/operators/maybe/MaybeCache$CacheDisposable;->isDisposed()Z
move-result v4
if-nez v4, :cond_0
.line 4
iget-object v3, v3, Lio/reactivex/internal/operators/maybe/MaybeCache$CacheDisposable;->downstream:Lkh/t;
invoke-interface {v3, p1}, Lkh/t;->onSuccess(Ljava/lang/Object;)V
:cond_0
add-int/lit8 v2, v2, 0x1
goto :goto_0
:cond_1
return-void
.end method
.method public p1(Lkh/t;)V
.locals 2
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Lkh/t<",
"-TT;>;)V"
}
.end annotation
.line 1
new-instance v0, Lio/reactivex/internal/operators/maybe/MaybeCache$CacheDisposable;
invoke-direct {v0, p1, p0}, Lio/reactivex/internal/operators/maybe/MaybeCache$CacheDisposable;-><init>(Lkh/t;Lio/reactivex/internal/operators/maybe/MaybeCache;)V
.line 2
invoke-interface {p1, v0}, Lkh/t;->onSubscribe(Lio/reactivex/disposables/b;)V
.line 3
invoke-virtual {p0, v0}, Lio/reactivex/internal/operators/maybe/MaybeCache;->d2(Lio/reactivex/internal/operators/maybe/MaybeCache$CacheDisposable;)Z
move-result v1
if-eqz v1, :cond_2
.line 4
invoke-virtual {v0}, Lio/reactivex/internal/operators/maybe/MaybeCache$CacheDisposable;->isDisposed()Z
move-result p1
if-eqz p1, :cond_0
.line 5
invoke-virtual {p0, v0}, Lio/reactivex/internal/operators/maybe/MaybeCache;->e2(Lio/reactivex/internal/operators/maybe/MaybeCache$CacheDisposable;)V
return-void
.line 6
:cond_0
iget-object p1, p0, Lio/reactivex/internal/operators/maybe/MaybeCache;->a:Ljava/util/concurrent/atomic/AtomicReference;
const/4 v0, 0x0
invoke-virtual {p1, v0}, Ljava/util/concurrent/atomic/AtomicReference;->getAndSet(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object p1
check-cast p1, Lkh/w;
if-eqz p1, :cond_1
.line 7
invoke-interface {p1, p0}, Lkh/w;->b(Lkh/t;)V
:cond_1
return-void
.line 8
:cond_2
invoke-virtual {v0}, Lio/reactivex/internal/operators/maybe/MaybeCache$CacheDisposable;->isDisposed()Z
move-result v0
if-nez v0, :cond_5
.line 9
iget-object v0, p0, Lio/reactivex/internal/operators/maybe/MaybeCache;->d:Ljava/lang/Throwable;
if-eqz v0, :cond_3
.line 10
invoke-interface {p1, v0}, Lkh/t;->onError(Ljava/lang/Throwable;)V
goto :goto_0
.line 11
:cond_3
iget-object v0, p0, Lio/reactivex/internal/operators/maybe/MaybeCache;->c:Ljava/lang/Object;
if-eqz v0, :cond_4
.line 12
invoke-interface {p1, v0}, Lkh/t;->onSuccess(Ljava/lang/Object;)V
goto :goto_0
.line 13
:cond_4
invoke-interface {p1}, Lkh/t;->onComplete()V
:cond_5
:goto_0
return-void
.end method