granularity level: instruction
.class public Landroidx/collection/SimpleArrayMap;
.super Ljava/lang/Object;
.source "SimpleArrayMap.java"
.annotation system Ldalvik/annotation/Signature;
value = {
"<K:",
"Ljava/lang/Object;",
"V:",
"Ljava/lang/Object;",
">",
"Ljava/lang/Object;"
}
.end annotation
.field private static final BASE_SIZE:I = 0x4
.field private static final CACHE_SIZE:I = 0xa
.field private static final CONCURRENT_MODIFICATION_EXCEPTIONS:Z = true
.field private static final DEBUG:Z = false
.field private static final TAG:Ljava/lang/String; = "ArrayMap"
.field static mBaseCache:[Ljava/lang/Object;
.field static mBaseCacheSize:I
.field static mTwiceBaseCache:[Ljava/lang/Object;
.field static mTwiceBaseCacheSize:I
.field mArray:[Ljava/lang/Object;
.field mHashes:[I
.field mSize:I
.method public constructor <init>()V
.locals 1
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
sget-object v0, Landroidx/collection/ContainerHelpers;->EMPTY_INTS:[I
iput-object v0, p0, Landroidx/collection/SimpleArrayMap;->mHashes:[I
sget-object v0, Landroidx/collection/ContainerHelpers;->EMPTY_OBJECTS:[Ljava/lang/Object;
iput-object v0, p0, Landroidx/collection/SimpleArrayMap;->mArray:[Ljava/lang/Object;
const/4 v0, 0x0
iput v0, p0, Landroidx/collection/SimpleArrayMap;->mSize:I
return-void
.end method
.method public constructor <init>(I)V
.locals 0
invoke-direct/range {p0 .. p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
.method public constructor <init>(Landroidx/collection/SimpleArrayMap;)V
.locals 0
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Landroidx/collection/SimpleArrayMap<",
"TK;TV;>;)V"
}
.end annotation
invoke-direct/range {p0 .. p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
.method private allocArrays(I)V
.locals 5
const/4 v0, 0x0
const/4 v1, 0x0
const/4 v2, 0x1
const/16 v3, 0x8
goto/32 :cond_1
:catchall_0
move-exception p1
monitor-exit v3
throw p1
:cond_1
const/4 v3, 0x4
if-ne p1, v3, :cond_3
const-class v3, Landroidx/collection/ArrayMap;
monitor-enter v3
sget-object v4, Landroidx/collection/SimpleArrayMap;->mBaseCache:[Ljava/lang/Object;
if-eqz v4, :cond_2
iput-object v4, p0, Landroidx/collection/SimpleArrayMap;->mArray:[Ljava/lang/Object;
aget-object p1, v4, v1
check-cast p1, [Ljava/lang/Object;
check-cast p1, [Ljava/lang/Object;
sput-object p1, Landroidx/collection/SimpleArrayMap;->mBaseCache:[Ljava/lang/Object;
aget-object p1, v4, v2
check-cast p1, [I
check-cast p1, [I
iput-object p1, p0, Landroidx/collection/SimpleArrayMap;->mHashes:[I
aput-object v0, v4, v2
aput-object v0, v4, v1
sget p1, Landroidx/collection/SimpleArrayMap;->mBaseCacheSize:I
sub-int/2addr p1, v2
sput p1, Landroidx/collection/SimpleArrayMap;->mBaseCacheSize:I
monitor-exit v3
return-void
:cond_2
monitor-exit v3
goto :goto_0
:catchall_1
move-exception p1
monitor-exit v3
:throw0
throw p1
:goto_0
:cond_3
new-array v0, p1, [I
iput-object v0, p0, Landroidx/collection/SimpleArrayMap;->mHashes:[I
shl-int/2addr p1, v2
new-array p1, p1, [Ljava/lang/Object;
iput-object p1, p0, Landroidx/collection/SimpleArrayMap;->mArray:[Ljava/lang/Object;
return-void
.end method
.method private static binarySearchHashes([III)I
.locals 0
invoke-static {p0, p1, p2}, Landroidx/collection/ContainerHelpers;->binarySearch([III)I
move-result p0
return p0
.end method
.method private static freeArrays([I[Ljava/lang/Object;I)V
.locals 7
array-length v0, p0
const/4 v1, 0x0
const/4 v2, 0x2
const/4 v3, 0x0
const/16 v4, 0xa
const/4 v5, 0x1
const/16 v6, 0x8
goto/32 :cond_2
:catchall_0
move-exception p0
monitor-exit v0
throw p0
:cond_2
array-length v0, p0
const/4 v6, 0x4
if-ne v0, v6, :cond_5
const-class v0, Landroidx/collection/ArrayMap;
monitor-enter v0
sget v6, Landroidx/collection/SimpleArrayMap;->mBaseCacheSize:I
if-ge v6, v4, :cond_4
sget-object v4, Landroidx/collection/SimpleArrayMap;->mBaseCache:[Ljava/lang/Object;
aput-object v4, p1, v3
aput-object p0, p1, v5
shl-int/lit8 p0, p2, 0x1
sub-int/2addr p0, v5
:goto_1
sput-object p1, Landroidx/collection/SimpleArrayMap;->mBaseCache:[Ljava/lang/Object;
sget p0, Landroidx/collection/SimpleArrayMap;->mBaseCacheSize:I
add-int/2addr p0, v5
sput p0, Landroidx/collection/SimpleArrayMap;->mBaseCacheSize:I
:cond_4
monitor-exit v0
goto :goto_2
:catchall_1
move-exception p0
monitor-exit v0
:throw0
throw p0
:goto_2
:cond_5
return-void
.end method
.method public clear()V
.locals 4
return-void
.end method
.method public containsKey(Ljava/lang/Object;)Z
.locals 0
invoke-virtual {p0, p1}, Landroidx/collection/SimpleArrayMap;->indexOfKey(Ljava/lang/Object;)I
move-result p1
if-ltz p1, :cond_0
const/4 p1, 0x1
goto :goto_0
:cond_0
const/4 p1, 0x0
:goto_0
return p1
.end method
.method public containsValue(Ljava/lang/Object;)Z
.locals 0
const/4 v0, 0x0
return v0
.end method
.method public ensureCapacity(I)V
.locals 5
return-void
.end method
.method public equals(Ljava/lang/Object;)Z
.locals 6
const/4 v0, 0x0
return v0
.end method
.method public get(Ljava/lang/Object;)Ljava/lang/Object;
.locals 1
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/lang/Object;",
")TV;"
}
.end annotation
invoke-virtual {p0, p1}, Landroidx/collection/SimpleArrayMap;->indexOfKey(Ljava/lang/Object;)I
move-result p1
if-ltz p1, :cond_0
iget-object v0, p0, Landroidx/collection/SimpleArrayMap;->mArray:[Ljava/lang/Object;
shl-int/lit8 p1, p1, 0x1
add-int/lit8 p1, p1, 0x1
aget-object p1, v0, p1
goto :goto_0
:cond_0
const/4 p1, 0x0
:goto_0
return-object p1
.end method
.method public hashCode()I
.locals 9
const/4 v0, 0x0
return v0
.end method
.method indexOf(Ljava/lang/Object;I)I
.locals 5
iget v0, p0, Landroidx/collection/SimpleArrayMap;->mSize:I
if-nez v0, :cond_0
const/4 p1, -0x1
return p1
:cond_0
iget-object v1, p0, Landroidx/collection/SimpleArrayMap;->mHashes:[I
invoke-static {v1, v0, p2}, Landroidx/collection/SimpleArrayMap;->binarySearchHashes([III)I
move-result v1
iget-object v2, p0, Landroidx/collection/SimpleArrayMap;->mArray:[Ljava/lang/Object;
shl-int/lit8 v3, v1, 0x1
aget-object v2, v2, v3
invoke-virtual {p1, v2}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z
move-result v2
return v1
.end method
.method public indexOfKey(Ljava/lang/Object;)I
.locals 1
invoke-virtual {p1}, Ljava/lang/Object;->hashCode()I
move-result v0
invoke-virtual {p0, p1, v0}, Landroidx/collection/SimpleArrayMap;->indexOf(Ljava/lang/Object;I)I
move-result p1
:goto_0
return p1
.end method
.method indexOfNull()I
.locals 5
const/4 v0, 0x0
return v0
.end method
.method indexOfValue(Ljava/lang/Object;)I
.locals 5
const/4 v0, 0x0
return v0
.end method
.method public isEmpty()Z
.locals 1
const/4 v0, 0x0
return v0
.end method
.method public keyAt(I)Ljava/lang/Object;
.locals 1
.annotation system Ldalvik/annotation/Signature;
value = {
"(I)TK;"
}
.end annotation
const/4 v0, 0x0
return-object v0
.end method
.method public put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
.locals 9
.annotation system Ldalvik/annotation/Signature;
value = {
"(TK;TV;)TV;"
}
.end annotation
iget v0, p0, Landroidx/collection/SimpleArrayMap;->mSize:I
const/4 v1, 0x0
invoke-virtual {p1}, Ljava/lang/Object;->hashCode()I
move-result v2
invoke-virtual {p0, p1, v2}, Landroidx/collection/SimpleArrayMap;->indexOf(Ljava/lang/Object;I)I
move-result v3
move v8, v3
move v3, v2
move v2, v8
:goto_0
not-int v2, v2
iget-object v4, p0, Landroidx/collection/SimpleArrayMap;->mHashes:[I
array-length v5, v4
if-lt v0, v5, :cond_6
const/4 v5, 0x4
const/16 v6, 0x8
:goto_1
iget-object v6, p0, Landroidx/collection/SimpleArrayMap;->mArray:[Ljava/lang/Object;
invoke-direct {p0, v5}, Landroidx/collection/SimpleArrayMap;->allocArrays(I)V
iget v5, p0, Landroidx/collection/SimpleArrayMap;->mSize:I
iget-object v5, p0, Landroidx/collection/SimpleArrayMap;->mHashes:[I
array-length v7, v5
if-lez v7, :cond_4
array-length v7, v4
invoke-static {v4, v1, v5, v1, v7}, Ljava/lang/System;->arraycopy(Ljava/lang/Object;ILjava/lang/Object;II)V
iget-object v5, p0, Landroidx/collection/SimpleArrayMap;->mArray:[Ljava/lang/Object;
array-length v7, v6
invoke-static {v6, v1, v5, v1, v7}, Ljava/lang/System;->arraycopy(Ljava/lang/Object;ILjava/lang/Object;II)V
:cond_4
invoke-static {v4, v6, v0}, Landroidx/collection/SimpleArrayMap;->freeArrays([I[Ljava/lang/Object;I)V
:cond_6
iget v1, p0, Landroidx/collection/SimpleArrayMap;->mSize:I
iget-object v0, p0, Landroidx/collection/SimpleArrayMap;->mHashes:[I
array-length v4, v0
aput v3, v0, v2
iget-object v0, p0, Landroidx/collection/SimpleArrayMap;->mArray:[Ljava/lang/Object;
shl-int/lit8 v2, v2, 0x1
aput-object p1, v0, v2
add-int/lit8 v2, v2, 0x1
aput-object p2, v0, v2
add-int/lit8 v1, v1, 0x1
iput v1, p0, Landroidx/collection/SimpleArrayMap;->mSize:I
const/4 p1, 0x0
return-object p1
.end method
.method public putAll(Landroidx/collection/SimpleArrayMap;)V
.locals 4
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Landroidx/collection/SimpleArrayMap<",
"+TK;+TV;>;)V"
}
.end annotation
return-void
.end method
.method public remove(Ljava/lang/Object;)Ljava/lang/Object;
.locals 0
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/lang/Object;",
")TV;"
}
.end annotation
invoke-virtual {p0, p1}, Landroidx/collection/SimpleArrayMap;->indexOfKey(Ljava/lang/Object;)I
move-result p1
invoke-virtual {p0, p1}, Landroidx/collection/SimpleArrayMap;->removeAt(I)Ljava/lang/Object;
move-result-object p1
return-object p1
.end method
.method public removeAt(I)Ljava/lang/Object;
.locals 10
.annotation system Ldalvik/annotation/Signature;
value = {
"(I)TV;"
}
.end annotation
iget-object v0, p0, Landroidx/collection/SimpleArrayMap;->mArray:[Ljava/lang/Object;
shl-int/lit8 v1, p1, 0x1
add-int/lit8 v2, v1, 0x1
aget-object v2, v0, v2
iget v3, p0, Landroidx/collection/SimpleArrayMap;->mSize:I
const/4 v4, 0x0
const/4 v5, 0x1
iget-object p1, p0, Landroidx/collection/SimpleArrayMap;->mHashes:[I
invoke-static {p1, v0, v3}, Landroidx/collection/SimpleArrayMap;->freeArrays([I[Ljava/lang/Object;I)V
sget-object p1, Landroidx/collection/ContainerHelpers;->EMPTY_INTS:[I
iput-object p1, p0, Landroidx/collection/SimpleArrayMap;->mHashes:[I
sget-object p1, Landroidx/collection/ContainerHelpers;->EMPTY_OBJECTS:[Ljava/lang/Object;
iput-object p1, p0, Landroidx/collection/SimpleArrayMap;->mArray:[Ljava/lang/Object;
iget p1, p0, Landroidx/collection/SimpleArrayMap;->mSize:I
iput v4, p0, Landroidx/collection/SimpleArrayMap;->mSize:I
return-object v2
.end method
.method public setValueAt(ILjava/lang/Object;)Ljava/lang/Object;
.locals 2
.annotation system Ldalvik/annotation/Signature;
value = {
"(ITV;)TV;"
}
.end annotation
const/4 v0, 0x0
return-object v0
.end method
.method public size()I
.locals 1
const/4 v0, 0x0
return v0
.end method
.method public toString()Ljava/lang/String;
.locals 4
const/4 v0, 0x0
return-object v0
.end method
.method public valueAt(I)Ljava/lang/Object;
.locals 1
.annotation system Ldalvik/annotation/Signature;
value = {
"(I)TV;"
}
.end annotation
const/4 v0, 0x0
return-object v0
.end method