438 lines
8.7 KiB
Smali
438 lines
8.7 KiB
Smali
.class final Lrx/internal/a/an$b;
|
|
.super Ljava/util/concurrent/atomic/AtomicLong;
|
|
.source "OperatorReplay.java"
|
|
|
|
# interfaces
|
|
.implements Lrx/Producer;
|
|
.implements Lrx/Subscription;
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/EnclosingClass;
|
|
value = Lrx/internal/a/an;
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/InnerClass;
|
|
accessFlags = 0x18
|
|
name = "b"
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"<T:",
|
|
"Ljava/lang/Object;",
|
|
">",
|
|
"Ljava/util/concurrent/atomic/AtomicLong;",
|
|
"Lrx/Producer;",
|
|
"Lrx/Subscription;"
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# static fields
|
|
.field private static final serialVersionUID:J = -0x3dcf6c3b2e70d8baL
|
|
|
|
|
|
# instance fields
|
|
.field child:Lrx/Subscriber;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Lrx/Subscriber<",
|
|
"-TT;>;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field emitting:Z
|
|
|
|
.field index:Ljava/lang/Object;
|
|
|
|
.field missed:Z
|
|
|
|
.field final parent:Lrx/internal/a/an$e;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Lrx/internal/a/an$e<",
|
|
"TT;>;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field final totalRequested:Ljava/util/concurrent/atomic/AtomicLong;
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(Lrx/internal/a/an$e;Lrx/Subscriber;)V
|
|
.locals 0
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Lrx/internal/a/an$e<",
|
|
"TT;>;",
|
|
"Lrx/Subscriber<",
|
|
"-TT;>;)V"
|
|
}
|
|
.end annotation
|
|
|
|
invoke-direct {p0}, Ljava/util/concurrent/atomic/AtomicLong;-><init>()V
|
|
|
|
iput-object p1, p0, Lrx/internal/a/an$b;->parent:Lrx/internal/a/an$e;
|
|
|
|
iput-object p2, p0, Lrx/internal/a/an$b;->child:Lrx/Subscriber;
|
|
|
|
new-instance p1, Ljava/util/concurrent/atomic/AtomicLong;
|
|
|
|
invoke-direct {p1}, Ljava/util/concurrent/atomic/AtomicLong;-><init>()V
|
|
|
|
iput-object p1, p0, Lrx/internal/a/an$b;->totalRequested:Ljava/util/concurrent/atomic/AtomicLong;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method final aH(J)V
|
|
.locals 7
|
|
|
|
:cond_0
|
|
iget-object v0, p0, Lrx/internal/a/an$b;->totalRequested:Ljava/util/concurrent/atomic/AtomicLong;
|
|
|
|
invoke-virtual {v0}, Ljava/util/concurrent/atomic/AtomicLong;->get()J
|
|
|
|
move-result-wide v0
|
|
|
|
add-long v2, v0, p1
|
|
|
|
const-wide/16 v4, 0x0
|
|
|
|
cmp-long v6, v2, v4
|
|
|
|
if-gez v6, :cond_1
|
|
|
|
const-wide v2, 0x7fffffffffffffffL
|
|
|
|
:cond_1
|
|
iget-object v4, p0, Lrx/internal/a/an$b;->totalRequested:Ljava/util/concurrent/atomic/AtomicLong;
|
|
|
|
invoke-virtual {v4, v0, v1, v2, v3}, Ljava/util/concurrent/atomic/AtomicLong;->compareAndSet(JJ)Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public final aI(J)J
|
|
.locals 7
|
|
|
|
const-wide/16 v0, 0x0
|
|
|
|
cmp-long v2, p1, v0
|
|
|
|
if-lez v2, :cond_3
|
|
|
|
:cond_0
|
|
invoke-virtual {p0}, Lrx/internal/a/an$b;->get()J
|
|
|
|
move-result-wide v2
|
|
|
|
const-wide/high16 v4, -0x8000000000000000L
|
|
|
|
cmp-long v6, v2, v4
|
|
|
|
if-nez v6, :cond_1
|
|
|
|
return-wide v4
|
|
|
|
:cond_1
|
|
sub-long v4, v2, p1
|
|
|
|
cmp-long v6, v4, v0
|
|
|
|
if-ltz v6, :cond_2
|
|
|
|
invoke-virtual {p0, v2, v3, v4, v5}, Lrx/internal/a/an$b;->compareAndSet(JJ)Z
|
|
|
|
move-result v2
|
|
|
|
if-eqz v2, :cond_0
|
|
|
|
return-wide v4
|
|
|
|
:cond_2
|
|
new-instance v0, Ljava/lang/IllegalStateException;
|
|
|
|
new-instance v1, Ljava/lang/StringBuilder;
|
|
|
|
const-string v4, "More produced ("
|
|
|
|
invoke-direct {v1, v4}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
|
|
|
|
invoke-virtual {v1, p1, p2}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;
|
|
|
|
const-string p1, ") than requested ("
|
|
|
|
invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v1, v2, v3}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;
|
|
|
|
const-string p1, ")"
|
|
|
|
invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-direct {v0, p1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
|
|
:cond_3
|
|
new-instance p1, Ljava/lang/IllegalArgumentException;
|
|
|
|
const-string p2, "Cant produce zero or less"
|
|
|
|
invoke-direct {p1, p2}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p1
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public final isUnsubscribed()Z
|
|
.locals 5
|
|
|
|
invoke-virtual {p0}, Lrx/internal/a/an$b;->get()J
|
|
|
|
move-result-wide v0
|
|
|
|
const-wide/high16 v2, -0x8000000000000000L
|
|
|
|
cmp-long v4, v0, v2
|
|
|
|
if-nez v4, :cond_0
|
|
|
|
const/4 v0, 0x1
|
|
|
|
return v0
|
|
|
|
:cond_0
|
|
const/4 v0, 0x0
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public final request(J)V
|
|
.locals 7
|
|
|
|
const-wide/16 v0, 0x0
|
|
|
|
cmp-long v2, p1, v0
|
|
|
|
if-gez v2, :cond_0
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
invoke-virtual {p0}, Lrx/internal/a/an$b;->get()J
|
|
|
|
move-result-wide v2
|
|
|
|
const-wide/high16 v4, -0x8000000000000000L
|
|
|
|
cmp-long v6, v2, v4
|
|
|
|
if-nez v6, :cond_1
|
|
|
|
return-void
|
|
|
|
:cond_1
|
|
cmp-long v4, v2, v0
|
|
|
|
if-ltz v4, :cond_2
|
|
|
|
cmp-long v4, p1, v0
|
|
|
|
if-nez v4, :cond_2
|
|
|
|
return-void
|
|
|
|
:cond_2
|
|
add-long v4, v2, p1
|
|
|
|
cmp-long v6, v4, v0
|
|
|
|
if-gez v6, :cond_3
|
|
|
|
const-wide v4, 0x7fffffffffffffffL
|
|
|
|
:cond_3
|
|
invoke-virtual {p0, v2, v3, v4, v5}, Lrx/internal/a/an$b;->compareAndSet(JJ)Z
|
|
|
|
move-result v2
|
|
|
|
if-eqz v2, :cond_0
|
|
|
|
invoke-virtual {p0, p1, p2}, Lrx/internal/a/an$b;->aH(J)V
|
|
|
|
iget-object p1, p0, Lrx/internal/a/an$b;->parent:Lrx/internal/a/an$e;
|
|
|
|
invoke-virtual {p1, p0}, Lrx/internal/a/an$e;->c(Lrx/internal/a/an$b;)V
|
|
|
|
iget-object p1, p0, Lrx/internal/a/an$b;->parent:Lrx/internal/a/an$e;
|
|
|
|
iget-object p1, p1, Lrx/internal/a/an$e;->bFO:Lrx/internal/a/an$d;
|
|
|
|
invoke-interface {p1, p0}, Lrx/internal/a/an$d;->a(Lrx/internal/a/an$b;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public final unsubscribe()V
|
|
.locals 8
|
|
|
|
invoke-virtual {p0}, Lrx/internal/a/an$b;->get()J
|
|
|
|
move-result-wide v0
|
|
|
|
const-wide/high16 v2, -0x8000000000000000L
|
|
|
|
cmp-long v4, v0, v2
|
|
|
|
if-eqz v4, :cond_6
|
|
|
|
invoke-virtual {p0, v2, v3}, Lrx/internal/a/an$b;->getAndSet(J)J
|
|
|
|
move-result-wide v0
|
|
|
|
cmp-long v4, v0, v2
|
|
|
|
if-eqz v4, :cond_6
|
|
|
|
iget-object v0, p0, Lrx/internal/a/an$b;->parent:Lrx/internal/a/an$e;
|
|
|
|
iget-boolean v1, v0, Lrx/internal/a/an$e;->terminated:Z
|
|
|
|
if-nez v1, :cond_5
|
|
|
|
iget-object v1, v0, Lrx/internal/a/an$e;->bFR:Lrx/internal/util/g;
|
|
|
|
monitor-enter v1
|
|
|
|
:try_start_0
|
|
iget-boolean v2, v0, Lrx/internal/a/an$e;->terminated:Z
|
|
|
|
if-eqz v2, :cond_0
|
|
|
|
monitor-exit v1
|
|
|
|
goto :goto_2
|
|
|
|
:cond_0
|
|
iget-object v2, v0, Lrx/internal/a/an$e;->bFR:Lrx/internal/util/g;
|
|
|
|
iget-object v3, v2, Lrx/internal/util/g;->bIY:[Ljava/lang/Object;
|
|
|
|
iget v4, v2, Lrx/internal/util/g;->mask:I
|
|
|
|
invoke-virtual {p0}, Ljava/lang/Object;->hashCode()I
|
|
|
|
move-result v5
|
|
|
|
invoke-static {v5}, Lrx/internal/util/g;->dI(I)I
|
|
|
|
move-result v5
|
|
|
|
and-int/2addr v5, v4
|
|
|
|
aget-object v6, v3, v5
|
|
|
|
const/4 v7, 0x1
|
|
|
|
if-eqz v6, :cond_2
|
|
|
|
invoke-virtual {v6, p0}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result v6
|
|
|
|
if-eqz v6, :cond_1
|
|
|
|
invoke-virtual {v2, v5, v3, v4}, Lrx/internal/util/g;->a(I[Ljava/lang/Object;I)Z
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
add-int/2addr v5, v7
|
|
|
|
and-int/2addr v5, v4
|
|
|
|
aget-object v6, v3, v5
|
|
|
|
if-eqz v6, :cond_2
|
|
|
|
invoke-virtual {v6, p0}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result v6
|
|
|
|
if-eqz v6, :cond_1
|
|
|
|
invoke-virtual {v2, v5, v3, v4}, Lrx/internal/util/g;->a(I[Ljava/lang/Object;I)Z
|
|
|
|
:cond_2
|
|
:goto_0
|
|
iget-object v2, v0, Lrx/internal/a/an$e;->bFR:Lrx/internal/util/g;
|
|
|
|
iget v2, v2, Lrx/internal/util/g;->size:I
|
|
|
|
if-nez v2, :cond_3
|
|
|
|
goto :goto_1
|
|
|
|
:cond_3
|
|
const/4 v7, 0x0
|
|
|
|
:goto_1
|
|
if-eqz v7, :cond_4
|
|
|
|
sget-object v2, Lrx/internal/a/an$e;->bFP:[Lrx/internal/a/an$b;
|
|
|
|
iput-object v2, v0, Lrx/internal/a/an$e;->bFS:[Lrx/internal/a/an$b;
|
|
|
|
:cond_4
|
|
iget-wide v2, v0, Lrx/internal/a/an$e;->bFT:J
|
|
|
|
const-wide/16 v4, 0x1
|
|
|
|
add-long/2addr v2, v4
|
|
|
|
iput-wide v2, v0, Lrx/internal/a/an$e;->bFT:J
|
|
|
|
monitor-exit v1
|
|
|
|
goto :goto_2
|
|
|
|
:catchall_0
|
|
move-exception v0
|
|
|
|
monitor-exit v1
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
throw v0
|
|
|
|
:cond_5
|
|
:goto_2
|
|
iget-object v0, p0, Lrx/internal/a/an$b;->parent:Lrx/internal/a/an$e;
|
|
|
|
invoke-virtual {v0, p0}, Lrx/internal/a/an$e;->c(Lrx/internal/a/an$b;)V
|
|
|
|
const/4 v0, 0x0
|
|
|
|
iput-object v0, p0, Lrx/internal/a/an$b;->child:Lrx/Subscriber;
|
|
|
|
:cond_6
|
|
return-void
|
|
.end method
|