494 lines
11 KiB
Smali
494 lines
11 KiB
Smali
|
.class Landroidx/recyclerview/widget/ChildHelper$Bucket;
|
||
|
.super Ljava/lang/Object;
|
||
|
.source "ChildHelper.java"
|
||
|
|
||
|
|
||
|
# annotations
|
||
|
.annotation system Ldalvik/annotation/EnclosingClass;
|
||
|
value = Landroidx/recyclerview/widget/ChildHelper;
|
||
|
.end annotation
|
||
|
|
||
|
.annotation system Ldalvik/annotation/InnerClass;
|
||
|
accessFlags = 0x8
|
||
|
name = "Bucket"
|
||
|
.end annotation
|
||
|
|
||
|
|
||
|
# static fields
|
||
|
.field static final BITS_PER_WORD:I = 0x40
|
||
|
|
||
|
.field static final LAST_BIT:J = -0x8000000000000000L
|
||
|
|
||
|
|
||
|
# instance fields
|
||
|
.field mData:J
|
||
|
|
||
|
.field mNext:Landroidx/recyclerview/widget/ChildHelper$Bucket;
|
||
|
|
||
|
|
||
|
# direct methods
|
||
|
.method constructor <init>()V
|
||
|
.locals 2
|
||
|
|
||
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
||
|
|
||
|
const-wide/16 v0, 0x0
|
||
|
|
||
|
iput-wide v0, p0, Landroidx/recyclerview/widget/ChildHelper$Bucket;->mData:J
|
||
|
|
||
|
return-void
|
||
|
.end method
|
||
|
|
||
|
.method private ensureNext()V
|
||
|
.locals 1
|
||
|
|
||
|
iget-object v0, p0, Landroidx/recyclerview/widget/ChildHelper$Bucket;->mNext:Landroidx/recyclerview/widget/ChildHelper$Bucket;
|
||
|
|
||
|
if-nez v0, :cond_0
|
||
|
|
||
|
new-instance v0, Landroidx/recyclerview/widget/ChildHelper$Bucket;
|
||
|
|
||
|
invoke-direct {v0}, Landroidx/recyclerview/widget/ChildHelper$Bucket;-><init>()V
|
||
|
|
||
|
iput-object v0, p0, Landroidx/recyclerview/widget/ChildHelper$Bucket;->mNext:Landroidx/recyclerview/widget/ChildHelper$Bucket;
|
||
|
|
||
|
:cond_0
|
||
|
return-void
|
||
|
.end method
|
||
|
|
||
|
|
||
|
# virtual methods
|
||
|
.method clear(I)V
|
||
|
.locals 6
|
||
|
|
||
|
const/16 v0, 0x40
|
||
|
|
||
|
if-lt p1, v0, :cond_0
|
||
|
|
||
|
iget-object v1, p0, Landroidx/recyclerview/widget/ChildHelper$Bucket;->mNext:Landroidx/recyclerview/widget/ChildHelper$Bucket;
|
||
|
|
||
|
if-eqz v1, :cond_1
|
||
|
|
||
|
sub-int/2addr p1, v0
|
||
|
|
||
|
invoke-virtual {v1, p1}, Landroidx/recyclerview/widget/ChildHelper$Bucket;->clear(I)V
|
||
|
|
||
|
return-void
|
||
|
|
||
|
:cond_0
|
||
|
iget-wide v0, p0, Landroidx/recyclerview/widget/ChildHelper$Bucket;->mData:J
|
||
|
|
||
|
const-wide/16 v2, 0x1
|
||
|
|
||
|
shl-long/2addr v2, p1
|
||
|
|
||
|
const-wide/16 v4, -0x1
|
||
|
|
||
|
xor-long/2addr v2, v4
|
||
|
|
||
|
and-long/2addr v0, v2
|
||
|
|
||
|
iput-wide v0, p0, Landroidx/recyclerview/widget/ChildHelper$Bucket;->mData:J
|
||
|
|
||
|
:cond_1
|
||
|
return-void
|
||
|
.end method
|
||
|
|
||
|
.method countOnesBefore(I)I
|
||
|
.locals 6
|
||
|
|
||
|
iget-object v0, p0, Landroidx/recyclerview/widget/ChildHelper$Bucket;->mNext:Landroidx/recyclerview/widget/ChildHelper$Bucket;
|
||
|
|
||
|
const/16 v1, 0x40
|
||
|
|
||
|
const-wide/16 v2, 0x1
|
||
|
|
||
|
if-nez v0, :cond_1
|
||
|
|
||
|
if-lt p1, v1, :cond_0
|
||
|
|
||
|
iget-wide v0, p0, Landroidx/recyclerview/widget/ChildHelper$Bucket;->mData:J
|
||
|
|
||
|
invoke-static {v0, v1}, Ljava/lang/Long;->bitCount(J)I
|
||
|
|
||
|
move-result p1
|
||
|
|
||
|
return p1
|
||
|
|
||
|
:cond_0
|
||
|
iget-wide v0, p0, Landroidx/recyclerview/widget/ChildHelper$Bucket;->mData:J
|
||
|
|
||
|
shl-long v4, v2, p1
|
||
|
|
||
|
sub-long/2addr v4, v2
|
||
|
|
||
|
and-long/2addr v0, v4
|
||
|
|
||
|
invoke-static {v0, v1}, Ljava/lang/Long;->bitCount(J)I
|
||
|
|
||
|
move-result p1
|
||
|
|
||
|
return p1
|
||
|
|
||
|
:cond_1
|
||
|
if-ge p1, v1, :cond_2
|
||
|
|
||
|
iget-wide v0, p0, Landroidx/recyclerview/widget/ChildHelper$Bucket;->mData:J
|
||
|
|
||
|
shl-long v4, v2, p1
|
||
|
|
||
|
sub-long/2addr v4, v2
|
||
|
|
||
|
and-long/2addr v0, v4
|
||
|
|
||
|
invoke-static {v0, v1}, Ljava/lang/Long;->bitCount(J)I
|
||
|
|
||
|
move-result p1
|
||
|
|
||
|
return p1
|
||
|
|
||
|
:cond_2
|
||
|
sub-int/2addr p1, v1
|
||
|
|
||
|
invoke-virtual {v0, p1}, Landroidx/recyclerview/widget/ChildHelper$Bucket;->countOnesBefore(I)I
|
||
|
|
||
|
move-result p1
|
||
|
|
||
|
iget-wide v0, p0, Landroidx/recyclerview/widget/ChildHelper$Bucket;->mData:J
|
||
|
|
||
|
invoke-static {v0, v1}, Ljava/lang/Long;->bitCount(J)I
|
||
|
|
||
|
move-result v0
|
||
|
|
||
|
add-int/2addr p1, v0
|
||
|
|
||
|
return p1
|
||
|
.end method
|
||
|
|
||
|
.method get(I)Z
|
||
|
.locals 4
|
||
|
|
||
|
const/16 v0, 0x40
|
||
|
|
||
|
if-lt p1, v0, :cond_0
|
||
|
|
||
|
invoke-direct {p0}, Landroidx/recyclerview/widget/ChildHelper$Bucket;->ensureNext()V
|
||
|
|
||
|
iget-object v1, p0, Landroidx/recyclerview/widget/ChildHelper$Bucket;->mNext:Landroidx/recyclerview/widget/ChildHelper$Bucket;
|
||
|
|
||
|
sub-int/2addr p1, v0
|
||
|
|
||
|
invoke-virtual {v1, p1}, Landroidx/recyclerview/widget/ChildHelper$Bucket;->get(I)Z
|
||
|
|
||
|
move-result p1
|
||
|
|
||
|
return p1
|
||
|
|
||
|
:cond_0
|
||
|
iget-wide v0, p0, Landroidx/recyclerview/widget/ChildHelper$Bucket;->mData:J
|
||
|
|
||
|
const-wide/16 v2, 0x1
|
||
|
|
||
|
shl-long/2addr v2, p1
|
||
|
|
||
|
and-long/2addr v0, v2
|
||
|
|
||
|
const-wide/16 v2, 0x0
|
||
|
|
||
|
cmp-long p1, v0, v2
|
||
|
|
||
|
if-eqz p1, :cond_1
|
||
|
|
||
|
const/4 p1, 0x1
|
||
|
|
||
|
return p1
|
||
|
|
||
|
:cond_1
|
||
|
const/4 p1, 0x0
|
||
|
|
||
|
return p1
|
||
|
.end method
|
||
|
|
||
|
.method insert(IZ)V
|
||
|
.locals 12
|
||
|
|
||
|
const/16 v0, 0x40
|
||
|
|
||
|
if-lt p1, v0, :cond_0
|
||
|
|
||
|
invoke-direct {p0}, Landroidx/recyclerview/widget/ChildHelper$Bucket;->ensureNext()V
|
||
|
|
||
|
iget-object v1, p0, Landroidx/recyclerview/widget/ChildHelper$Bucket;->mNext:Landroidx/recyclerview/widget/ChildHelper$Bucket;
|
||
|
|
||
|
sub-int/2addr p1, v0
|
||
|
|
||
|
invoke-virtual {v1, p1, p2}, Landroidx/recyclerview/widget/ChildHelper$Bucket;->insert(IZ)V
|
||
|
|
||
|
return-void
|
||
|
|
||
|
:cond_0
|
||
|
iget-wide v0, p0, Landroidx/recyclerview/widget/ChildHelper$Bucket;->mData:J
|
||
|
|
||
|
const-wide/high16 v2, -0x8000000000000000L
|
||
|
|
||
|
and-long/2addr v0, v2
|
||
|
|
||
|
const-wide/16 v2, 0x0
|
||
|
|
||
|
const/4 v4, 0x1
|
||
|
|
||
|
const/4 v5, 0x0
|
||
|
|
||
|
cmp-long v6, v0, v2
|
||
|
|
||
|
if-eqz v6, :cond_1
|
||
|
|
||
|
const/4 v0, 0x1
|
||
|
|
||
|
goto :goto_0
|
||
|
|
||
|
:cond_1
|
||
|
const/4 v0, 0x0
|
||
|
|
||
|
:goto_0
|
||
|
const-wide/16 v1, 0x1
|
||
|
|
||
|
shl-long v6, v1, p1
|
||
|
|
||
|
sub-long/2addr v6, v1
|
||
|
|
||
|
iget-wide v1, p0, Landroidx/recyclerview/widget/ChildHelper$Bucket;->mData:J
|
||
|
|
||
|
and-long v8, v1, v6
|
||
|
|
||
|
const-wide/16 v10, -0x1
|
||
|
|
||
|
xor-long/2addr v6, v10
|
||
|
|
||
|
and-long/2addr v1, v6
|
||
|
|
||
|
shl-long/2addr v1, v4
|
||
|
|
||
|
or-long/2addr v1, v8
|
||
|
|
||
|
iput-wide v1, p0, Landroidx/recyclerview/widget/ChildHelper$Bucket;->mData:J
|
||
|
|
||
|
if-eqz p2, :cond_2
|
||
|
|
||
|
invoke-virtual {p0, p1}, Landroidx/recyclerview/widget/ChildHelper$Bucket;->set(I)V
|
||
|
|
||
|
goto :goto_1
|
||
|
|
||
|
:cond_2
|
||
|
invoke-virtual {p0, p1}, Landroidx/recyclerview/widget/ChildHelper$Bucket;->clear(I)V
|
||
|
|
||
|
:goto_1
|
||
|
if-nez v0, :cond_3
|
||
|
|
||
|
iget-object p1, p0, Landroidx/recyclerview/widget/ChildHelper$Bucket;->mNext:Landroidx/recyclerview/widget/ChildHelper$Bucket;
|
||
|
|
||
|
if-eqz p1, :cond_4
|
||
|
|
||
|
:cond_3
|
||
|
invoke-direct {p0}, Landroidx/recyclerview/widget/ChildHelper$Bucket;->ensureNext()V
|
||
|
|
||
|
iget-object p1, p0, Landroidx/recyclerview/widget/ChildHelper$Bucket;->mNext:Landroidx/recyclerview/widget/ChildHelper$Bucket;
|
||
|
|
||
|
invoke-virtual {p1, v5, v0}, Landroidx/recyclerview/widget/ChildHelper$Bucket;->insert(IZ)V
|
||
|
|
||
|
:cond_4
|
||
|
return-void
|
||
|
.end method
|
||
|
|
||
|
.method remove(I)Z
|
||
|
.locals 13
|
||
|
|
||
|
const/16 v0, 0x40
|
||
|
|
||
|
if-lt p1, v0, :cond_0
|
||
|
|
||
|
invoke-direct {p0}, Landroidx/recyclerview/widget/ChildHelper$Bucket;->ensureNext()V
|
||
|
|
||
|
iget-object v1, p0, Landroidx/recyclerview/widget/ChildHelper$Bucket;->mNext:Landroidx/recyclerview/widget/ChildHelper$Bucket;
|
||
|
|
||
|
sub-int/2addr p1, v0
|
||
|
|
||
|
invoke-virtual {v1, p1}, Landroidx/recyclerview/widget/ChildHelper$Bucket;->remove(I)Z
|
||
|
|
||
|
move-result p1
|
||
|
|
||
|
return p1
|
||
|
|
||
|
:cond_0
|
||
|
const-wide/16 v0, 0x1
|
||
|
|
||
|
shl-long v2, v0, p1
|
||
|
|
||
|
iget-wide v4, p0, Landroidx/recyclerview/widget/ChildHelper$Bucket;->mData:J
|
||
|
|
||
|
and-long/2addr v4, v2
|
||
|
|
||
|
const-wide/16 v6, 0x0
|
||
|
|
||
|
const/4 p1, 0x1
|
||
|
|
||
|
const/4 v8, 0x0
|
||
|
|
||
|
cmp-long v9, v4, v6
|
||
|
|
||
|
if-eqz v9, :cond_1
|
||
|
|
||
|
const/4 v4, 0x1
|
||
|
|
||
|
goto :goto_0
|
||
|
|
||
|
:cond_1
|
||
|
const/4 v4, 0x0
|
||
|
|
||
|
:goto_0
|
||
|
iget-wide v5, p0, Landroidx/recyclerview/widget/ChildHelper$Bucket;->mData:J
|
||
|
|
||
|
const-wide/16 v9, -0x1
|
||
|
|
||
|
xor-long v11, v2, v9
|
||
|
|
||
|
and-long/2addr v5, v11
|
||
|
|
||
|
iput-wide v5, p0, Landroidx/recyclerview/widget/ChildHelper$Bucket;->mData:J
|
||
|
|
||
|
sub-long/2addr v2, v0
|
||
|
|
||
|
iget-wide v0, p0, Landroidx/recyclerview/widget/ChildHelper$Bucket;->mData:J
|
||
|
|
||
|
and-long v5, v0, v2
|
||
|
|
||
|
xor-long/2addr v2, v9
|
||
|
|
||
|
and-long/2addr v0, v2
|
||
|
|
||
|
invoke-static {v0, v1, p1}, Ljava/lang/Long;->rotateRight(JI)J
|
||
|
|
||
|
move-result-wide v0
|
||
|
|
||
|
or-long/2addr v0, v5
|
||
|
|
||
|
iput-wide v0, p0, Landroidx/recyclerview/widget/ChildHelper$Bucket;->mData:J
|
||
|
|
||
|
iget-object p1, p0, Landroidx/recyclerview/widget/ChildHelper$Bucket;->mNext:Landroidx/recyclerview/widget/ChildHelper$Bucket;
|
||
|
|
||
|
if-eqz p1, :cond_3
|
||
|
|
||
|
invoke-virtual {p1, v8}, Landroidx/recyclerview/widget/ChildHelper$Bucket;->get(I)Z
|
||
|
|
||
|
move-result p1
|
||
|
|
||
|
if-eqz p1, :cond_2
|
||
|
|
||
|
const/16 p1, 0x3f
|
||
|
|
||
|
invoke-virtual {p0, p1}, Landroidx/recyclerview/widget/ChildHelper$Bucket;->set(I)V
|
||
|
|
||
|
:cond_2
|
||
|
iget-object p1, p0, Landroidx/recyclerview/widget/ChildHelper$Bucket;->mNext:Landroidx/recyclerview/widget/ChildHelper$Bucket;
|
||
|
|
||
|
invoke-virtual {p1, v8}, Landroidx/recyclerview/widget/ChildHelper$Bucket;->remove(I)Z
|
||
|
|
||
|
:cond_3
|
||
|
return v4
|
||
|
.end method
|
||
|
|
||
|
.method reset()V
|
||
|
.locals 2
|
||
|
|
||
|
const-wide/16 v0, 0x0
|
||
|
|
||
|
iput-wide v0, p0, Landroidx/recyclerview/widget/ChildHelper$Bucket;->mData:J
|
||
|
|
||
|
iget-object v0, p0, Landroidx/recyclerview/widget/ChildHelper$Bucket;->mNext:Landroidx/recyclerview/widget/ChildHelper$Bucket;
|
||
|
|
||
|
if-eqz v0, :cond_0
|
||
|
|
||
|
invoke-virtual {v0}, Landroidx/recyclerview/widget/ChildHelper$Bucket;->reset()V
|
||
|
|
||
|
:cond_0
|
||
|
return-void
|
||
|
.end method
|
||
|
|
||
|
.method set(I)V
|
||
|
.locals 4
|
||
|
|
||
|
const/16 v0, 0x40
|
||
|
|
||
|
if-lt p1, v0, :cond_0
|
||
|
|
||
|
invoke-direct {p0}, Landroidx/recyclerview/widget/ChildHelper$Bucket;->ensureNext()V
|
||
|
|
||
|
iget-object v1, p0, Landroidx/recyclerview/widget/ChildHelper$Bucket;->mNext:Landroidx/recyclerview/widget/ChildHelper$Bucket;
|
||
|
|
||
|
sub-int/2addr p1, v0
|
||
|
|
||
|
invoke-virtual {v1, p1}, Landroidx/recyclerview/widget/ChildHelper$Bucket;->set(I)V
|
||
|
|
||
|
return-void
|
||
|
|
||
|
:cond_0
|
||
|
iget-wide v0, p0, Landroidx/recyclerview/widget/ChildHelper$Bucket;->mData:J
|
||
|
|
||
|
const-wide/16 v2, 0x1
|
||
|
|
||
|
shl-long/2addr v2, p1
|
||
|
|
||
|
or-long/2addr v0, v2
|
||
|
|
||
|
iput-wide v0, p0, Landroidx/recyclerview/widget/ChildHelper$Bucket;->mData:J
|
||
|
|
||
|
return-void
|
||
|
.end method
|
||
|
|
||
|
.method public toString()Ljava/lang/String;
|
||
|
.locals 3
|
||
|
|
||
|
iget-object v0, p0, Landroidx/recyclerview/widget/ChildHelper$Bucket;->mNext:Landroidx/recyclerview/widget/ChildHelper$Bucket;
|
||
|
|
||
|
if-nez v0, :cond_0
|
||
|
|
||
|
iget-wide v0, p0, Landroidx/recyclerview/widget/ChildHelper$Bucket;->mData:J
|
||
|
|
||
|
invoke-static {v0, v1}, Ljava/lang/Long;->toBinaryString(J)Ljava/lang/String;
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
return-object v0
|
||
|
|
||
|
:cond_0
|
||
|
new-instance v0, Ljava/lang/StringBuilder;
|
||
|
|
||
|
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
|
||
|
|
||
|
iget-object v1, p0, Landroidx/recyclerview/widget/ChildHelper$Bucket;->mNext:Landroidx/recyclerview/widget/ChildHelper$Bucket;
|
||
|
|
||
|
invoke-virtual {v1}, Landroidx/recyclerview/widget/ChildHelper$Bucket;->toString()Ljava/lang/String;
|
||
|
|
||
|
move-result-object v1
|
||
|
|
||
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
||
|
|
||
|
const-string v1, "xx"
|
||
|
|
||
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
||
|
|
||
|
iget-wide v1, p0, Landroidx/recyclerview/widget/ChildHelper$Bucket;->mData:J
|
||
|
|
||
|
invoke-static {v1, v2}, Ljava/lang/Long;->toBinaryString(J)Ljava/lang/String;
|
||
|
|
||
|
move-result-object v1
|
||
|
|
||
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
||
|
|
||
|
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
return-object v0
|
||
|
.end method
|