2020-11-14 03:19:56 +00:00
|
|
|
.class public final Ld0/t;
|
2020-11-12 02:11:44 +00:00
|
|
|
.super Ljava/lang/Object;
|
2020-11-14 03:19:56 +00:00
|
|
|
.source "SegmentPool.kt"
|
2020-11-12 02:11:44 +00:00
|
|
|
|
|
|
|
|
|
|
|
# static fields
|
2020-11-14 03:19:56 +00:00
|
|
|
.field public static final a:Ld0/s;
|
|
|
|
|
|
|
|
.field public static final b:I
|
|
|
|
|
|
|
|
.field public static final c:[Ljava/util/concurrent/atomic/AtomicReference;
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"[",
|
|
|
|
"Ljava/util/concurrent/atomic/AtomicReference<",
|
|
|
|
"Ld0/s;",
|
|
|
|
">;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
.end field
|
|
|
|
|
|
|
|
.field public static final d:Ld0/t;
|
2020-11-12 02:11:44 +00:00
|
|
|
|
|
|
|
|
|
|
|
# direct methods
|
|
|
|
.method public static constructor <clinit>()V
|
2020-11-14 03:19:56 +00:00
|
|
|
.locals 8
|
|
|
|
|
|
|
|
new-instance v0, Ld0/t;
|
|
|
|
|
|
|
|
invoke-direct {v0}, Ld0/t;-><init>()V
|
|
|
|
|
|
|
|
sput-object v0, Ld0/t;->d:Ld0/t;
|
2020-11-12 02:11:44 +00:00
|
|
|
|
|
|
|
new-instance v0, Ld0/s;
|
|
|
|
|
2020-11-14 03:19:56 +00:00
|
|
|
const/4 v7, 0x0
|
|
|
|
|
|
|
|
new-array v2, v7, [B
|
|
|
|
|
|
|
|
const/4 v3, 0x0
|
|
|
|
|
|
|
|
const/4 v4, 0x0
|
|
|
|
|
|
|
|
const/4 v5, 0x0
|
|
|
|
|
|
|
|
const/4 v6, 0x0
|
|
|
|
|
|
|
|
move-object v1, v0
|
|
|
|
|
|
|
|
invoke-direct/range {v1 .. v6}, Ld0/s;-><init>([BIIZZ)V
|
2020-11-13 01:15:36 +00:00
|
|
|
|
2020-11-14 03:19:56 +00:00
|
|
|
sput-object v0, Ld0/t;->a:Ld0/s;
|
|
|
|
|
|
|
|
invoke-static {}, Ljava/lang/Runtime;->getRuntime()Ljava/lang/Runtime;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Ljava/lang/Runtime;->availableProcessors()I
|
|
|
|
|
|
|
|
move-result v0
|
|
|
|
|
|
|
|
mul-int/lit8 v0, v0, 0x2
|
|
|
|
|
|
|
|
add-int/lit8 v0, v0, -0x1
|
|
|
|
|
|
|
|
invoke-static {v0}, Ljava/lang/Integer;->highestOneBit(I)I
|
|
|
|
|
|
|
|
move-result v0
|
|
|
|
|
|
|
|
sput v0, Ld0/t;->b:I
|
|
|
|
|
|
|
|
new-array v1, v0, [Ljava/util/concurrent/atomic/AtomicReference;
|
|
|
|
|
|
|
|
:goto_0
|
|
|
|
if-ge v7, v0, :cond_0
|
|
|
|
|
|
|
|
new-instance v2, Ljava/util/concurrent/atomic/AtomicReference;
|
|
|
|
|
|
|
|
invoke-direct {v2}, Ljava/util/concurrent/atomic/AtomicReference;-><init>()V
|
|
|
|
|
|
|
|
aput-object v2, v1, v7
|
|
|
|
|
|
|
|
add-int/lit8 v7, v7, 0x1
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
sput-object v1, Ld0/t;->c:[Ljava/util/concurrent/atomic/AtomicReference;
|
2020-11-13 01:15:36 +00:00
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
2020-11-14 03:19:56 +00:00
|
|
|
.method public constructor <init>()V
|
|
|
|
.locals 0
|
2020-11-13 01:15:36 +00:00
|
|
|
|
2020-11-14 03:19:56 +00:00
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
2020-11-13 01:15:36 +00:00
|
|
|
|
2020-11-14 03:19:56 +00:00
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public static final a(Ld0/s;)V
|
|
|
|
.locals 8
|
|
|
|
|
|
|
|
const-string v0, "segment"
|
|
|
|
|
|
|
|
invoke-static {p0, v0}, Ly/m/c/j;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
|
|
|
|
iget-object v0, p0, Ld0/s;->f:Ld0/s;
|
|
|
|
|
|
|
|
const/4 v1, 0x0
|
|
|
|
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
|
|
|
|
iget-object v0, p0, Ld0/s;->g:Ld0/s;
|
|
|
|
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
|
|
|
|
const/4 v0, 0x1
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
const/4 v0, 0x0
|
|
|
|
|
|
|
|
:goto_0
|
|
|
|
if-eqz v0, :cond_6
|
|
|
|
|
|
|
|
iget-boolean v0, p0, Ld0/s;->d:Z
|
|
|
|
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
|
|
|
|
return-void
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
invoke-static {}, Ljava/lang/Thread;->currentThread()Ljava/lang/Thread;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
const-string v2, "Thread.currentThread()"
|
|
|
|
|
|
|
|
invoke-static {v0, v2}, Ly/m/c/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Ljava/lang/Thread;->getId()J
|
|
|
|
|
|
|
|
move-result-wide v2
|
|
|
|
|
|
|
|
sget v0, Ld0/t;->b:I
|
|
|
|
|
|
|
|
int-to-long v4, v0
|
|
|
|
|
|
|
|
const-wide/16 v6, 0x1
|
|
|
|
|
|
|
|
sub-long/2addr v4, v6
|
|
|
|
|
|
|
|
and-long/2addr v2, v4
|
|
|
|
|
|
|
|
long-to-int v0, v2
|
|
|
|
|
|
|
|
sget-object v2, Ld0/t;->c:[Ljava/util/concurrent/atomic/AtomicReference;
|
|
|
|
|
|
|
|
aget-object v0, v2, v0
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Ljava/util/concurrent/atomic/AtomicReference;->get()Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v2
|
|
|
|
|
|
|
|
check-cast v2, Ld0/s;
|
|
|
|
|
|
|
|
sget-object v3, Ld0/t;->a:Ld0/s;
|
|
|
|
|
|
|
|
if-ne v2, v3, :cond_2
|
|
|
|
|
|
|
|
return-void
|
|
|
|
|
|
|
|
:cond_2
|
|
|
|
if-eqz v2, :cond_3
|
|
|
|
|
|
|
|
iget v3, v2, Ld0/s;->c:I
|
|
|
|
|
|
|
|
goto :goto_1
|
|
|
|
|
|
|
|
:cond_3
|
|
|
|
const/4 v3, 0x0
|
|
|
|
|
|
|
|
:goto_1
|
|
|
|
const/high16 v4, 0x10000
|
|
|
|
|
|
|
|
if-lt v3, v4, :cond_4
|
|
|
|
|
|
|
|
return-void
|
|
|
|
|
|
|
|
:cond_4
|
|
|
|
iput-object v2, p0, Ld0/s;->f:Ld0/s;
|
|
|
|
|
|
|
|
iput v1, p0, Ld0/s;->b:I
|
|
|
|
|
|
|
|
add-int/lit16 v3, v3, 0x2000
|
|
|
|
|
|
|
|
iput v3, p0, Ld0/s;->c:I
|
|
|
|
|
|
|
|
invoke-virtual {v0, v2, p0}, Ljava/util/concurrent/atomic/AtomicReference;->compareAndSet(Ljava/lang/Object;Ljava/lang/Object;)Z
|
|
|
|
|
|
|
|
move-result v0
|
|
|
|
|
|
|
|
if-nez v0, :cond_5
|
|
|
|
|
|
|
|
const/4 v0, 0x0
|
|
|
|
|
|
|
|
iput-object v0, p0, Ld0/s;->f:Ld0/s;
|
|
|
|
|
|
|
|
:cond_5
|
|
|
|
return-void
|
|
|
|
|
|
|
|
:cond_6
|
|
|
|
new-instance p0, Ljava/lang/IllegalArgumentException;
|
|
|
|
|
|
|
|
const-string v0, "Failed requirement."
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Ljava/lang/Object;->toString()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
invoke-direct {p0, v0}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
|
|
|
|
|
|
|
|
throw p0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public static final b()Ld0/s;
|
|
|
|
.locals 6
|
|
|
|
|
|
|
|
invoke-static {}, Ljava/lang/Thread;->currentThread()Ljava/lang/Thread;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
const-string v1, "Thread.currentThread()"
|
|
|
|
|
|
|
|
invoke-static {v0, v1}, Ly/m/c/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Ljava/lang/Thread;->getId()J
|
|
|
|
|
|
|
|
move-result-wide v0
|
|
|
|
|
|
|
|
sget v2, Ld0/t;->b:I
|
|
|
|
|
|
|
|
int-to-long v2, v2
|
|
|
|
|
|
|
|
const-wide/16 v4, 0x1
|
|
|
|
|
|
|
|
sub-long/2addr v2, v4
|
|
|
|
|
|
|
|
and-long/2addr v0, v2
|
|
|
|
|
|
|
|
long-to-int v1, v0
|
|
|
|
|
|
|
|
sget-object v0, Ld0/t;->c:[Ljava/util/concurrent/atomic/AtomicReference;
|
|
|
|
|
|
|
|
aget-object v0, v0, v1
|
|
|
|
|
|
|
|
sget-object v1, Ld0/t;->a:Ld0/s;
|
|
|
|
|
|
|
|
invoke-virtual {v0, v1}, Ljava/util/concurrent/atomic/AtomicReference;->getAndSet(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v2
|
|
|
|
|
|
|
|
check-cast v2, Ld0/s;
|
|
|
|
|
|
|
|
if-ne v2, v1, :cond_0
|
|
|
|
|
|
|
|
new-instance v0, Ld0/s;
|
|
|
|
|
|
|
|
invoke-direct {v0}, Ld0/s;-><init>()V
|
|
|
|
|
|
|
|
return-object v0
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
const/4 v1, 0x0
|
|
|
|
|
|
|
|
if-nez v2, :cond_1
|
|
|
|
|
|
|
|
invoke-virtual {v0, v1}, Ljava/util/concurrent/atomic/AtomicReference;->set(Ljava/lang/Object;)V
|
|
|
|
|
|
|
|
new-instance v0, Ld0/s;
|
|
|
|
|
|
|
|
invoke-direct {v0}, Ld0/s;-><init>()V
|
|
|
|
|
|
|
|
return-object v0
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
iget-object v3, v2, Ld0/s;->f:Ld0/s;
|
|
|
|
|
|
|
|
invoke-virtual {v0, v3}, Ljava/util/concurrent/atomic/AtomicReference;->set(Ljava/lang/Object;)V
|
|
|
|
|
|
|
|
iput-object v1, v2, Ld0/s;->f:Ld0/s;
|
|
|
|
|
|
|
|
const/4 v0, 0x0
|
|
|
|
|
|
|
|
iput v0, v2, Ld0/s;->c:I
|
|
|
|
|
|
|
|
return-object v2
|
2020-11-12 02:11:44 +00:00
|
|
|
.end method
|