552 lines
12 KiB
Smali
552 lines
12 KiB
Smali
.class public Lu/a/a2/n;
|
|
.super Ljava/lang/Object;
|
|
.source "LockFreeLinkedList.kt"
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/MemberClasses;
|
|
value = {
|
|
Lu/a/a2/n$a;
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# static fields
|
|
.field public static final d:Ljava/util/concurrent/atomic/AtomicReferenceFieldUpdater;
|
|
|
|
.field public static final e:Ljava/util/concurrent/atomic/AtomicReferenceFieldUpdater;
|
|
|
|
.field public static final f:Ljava/util/concurrent/atomic/AtomicReferenceFieldUpdater;
|
|
|
|
|
|
# instance fields
|
|
.field public volatile _next:Ljava/lang/Object;
|
|
|
|
.field public volatile _prev:Ljava/lang/Object;
|
|
|
|
.field public volatile _removedRef:Ljava/lang/Object;
|
|
|
|
|
|
# direct methods
|
|
.method public static constructor <clinit>()V
|
|
.locals 3
|
|
|
|
const-class v0, Ljava/lang/Object;
|
|
|
|
const-class v1, Lu/a/a2/n;
|
|
|
|
const-string v2, "_next"
|
|
|
|
invoke-static {v1, v0, v2}, Ljava/util/concurrent/atomic/AtomicReferenceFieldUpdater;->newUpdater(Ljava/lang/Class;Ljava/lang/Class;Ljava/lang/String;)Ljava/util/concurrent/atomic/AtomicReferenceFieldUpdater;
|
|
|
|
move-result-object v2
|
|
|
|
sput-object v2, Lu/a/a2/n;->d:Ljava/util/concurrent/atomic/AtomicReferenceFieldUpdater;
|
|
|
|
const-string v2, "_prev"
|
|
|
|
invoke-static {v1, v0, v2}, Ljava/util/concurrent/atomic/AtomicReferenceFieldUpdater;->newUpdater(Ljava/lang/Class;Ljava/lang/Class;Ljava/lang/String;)Ljava/util/concurrent/atomic/AtomicReferenceFieldUpdater;
|
|
|
|
move-result-object v2
|
|
|
|
sput-object v2, Lu/a/a2/n;->e:Ljava/util/concurrent/atomic/AtomicReferenceFieldUpdater;
|
|
|
|
const-string v2, "_removedRef"
|
|
|
|
invoke-static {v1, v0, v2}, Ljava/util/concurrent/atomic/AtomicReferenceFieldUpdater;->newUpdater(Ljava/lang/Class;Ljava/lang/Class;Ljava/lang/String;)Ljava/util/concurrent/atomic/AtomicReferenceFieldUpdater;
|
|
|
|
move-result-object v0
|
|
|
|
sput-object v0, Lu/a/a2/n;->f:Ljava/util/concurrent/atomic/AtomicReferenceFieldUpdater;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>()V
|
|
.locals 1
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
iput-object p0, p0, Lu/a/a2/n;->_next:Ljava/lang/Object;
|
|
|
|
iput-object p0, p0, Lu/a/a2/n;->_prev:Ljava/lang/Object;
|
|
|
|
const/4 v0, 0x0
|
|
|
|
iput-object v0, p0, Lu/a/a2/n;->_removedRef:Ljava/lang/Object;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public final a(Lu/a/a2/n;Lu/a/a2/s;)Lu/a/a2/n;
|
|
.locals 6
|
|
|
|
const/4 v0, 0x0
|
|
|
|
:goto_0
|
|
move-object v1, v0
|
|
|
|
:cond_0
|
|
:goto_1
|
|
iget-object v2, p1, Lu/a/a2/n;->_next:Ljava/lang/Object;
|
|
|
|
if-ne v2, p2, :cond_1
|
|
|
|
return-object p1
|
|
|
|
:cond_1
|
|
instance-of v3, v2, Lu/a/a2/s;
|
|
|
|
if-eqz v3, :cond_2
|
|
|
|
check-cast v2, Lu/a/a2/s;
|
|
|
|
invoke-virtual {v2, p1}, Lu/a/a2/s;->a(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
goto :goto_1
|
|
|
|
:cond_2
|
|
instance-of v3, v2, Lu/a/a2/t;
|
|
|
|
if-eqz v3, :cond_4
|
|
|
|
if-eqz v1, :cond_3
|
|
|
|
invoke-virtual {p1}, Lu/a/a2/n;->e()Lu/a/a2/n;
|
|
|
|
sget-object v3, Lu/a/a2/n;->d:Ljava/util/concurrent/atomic/AtomicReferenceFieldUpdater;
|
|
|
|
check-cast v2, Lu/a/a2/t;
|
|
|
|
iget-object v2, v2, Lu/a/a2/t;->a:Lu/a/a2/n;
|
|
|
|
invoke-virtual {v3, v1, p1, v2}, Ljava/util/concurrent/atomic/AtomicReferenceFieldUpdater;->compareAndSet(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Z
|
|
|
|
move-object p1, v1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_3
|
|
iget-object p1, p1, Lu/a/a2/n;->_prev:Ljava/lang/Object;
|
|
|
|
invoke-static {p1}, Lu/a/a2/m;->a(Ljava/lang/Object;)Lu/a/a2/n;
|
|
|
|
move-result-object p1
|
|
|
|
goto :goto_1
|
|
|
|
:cond_4
|
|
iget-object v3, p0, Lu/a/a2/n;->_prev:Ljava/lang/Object;
|
|
|
|
instance-of v4, v3, Lu/a/a2/t;
|
|
|
|
if-eqz v4, :cond_5
|
|
|
|
return-object v0
|
|
|
|
:cond_5
|
|
if-eq v2, p0, :cond_7
|
|
|
|
if-eqz v2, :cond_6
|
|
|
|
move-object v1, v2
|
|
|
|
check-cast v1, Lu/a/a2/n;
|
|
|
|
move-object v5, v1
|
|
|
|
move-object v1, p1
|
|
|
|
move-object p1, v5
|
|
|
|
goto :goto_1
|
|
|
|
:cond_6
|
|
new-instance p1, Lt/l;
|
|
|
|
const-string p2, "null cannot be cast to non-null type kotlinx.coroutines.internal.Node /* = kotlinx.coroutines.internal.LockFreeLinkedListNode */"
|
|
|
|
invoke-direct {p1, p2}, Lt/l;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p1
|
|
|
|
:cond_7
|
|
if-ne v3, p1, :cond_8
|
|
|
|
return-object v0
|
|
|
|
:cond_8
|
|
sget-object v2, Lu/a/a2/n;->e:Ljava/util/concurrent/atomic/AtomicReferenceFieldUpdater;
|
|
|
|
invoke-virtual {v2, p0, v3, p1}, Ljava/util/concurrent/atomic/AtomicReferenceFieldUpdater;->compareAndSet(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Z
|
|
|
|
move-result v2
|
|
|
|
if-eqz v2, :cond_0
|
|
|
|
iget-object v2, p1, Lu/a/a2/n;->_prev:Ljava/lang/Object;
|
|
|
|
instance-of v2, v2, Lu/a/a2/t;
|
|
|
|
if-nez v2, :cond_0
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public final a(Lu/a/a2/n;)Z
|
|
.locals 1
|
|
|
|
if-eqz p1, :cond_2
|
|
|
|
sget-object v0, Lu/a/a2/n;->e:Ljava/util/concurrent/atomic/AtomicReferenceFieldUpdater;
|
|
|
|
invoke-virtual {v0, p1, p0}, Ljava/util/concurrent/atomic/AtomicReferenceFieldUpdater;->lazySet(Ljava/lang/Object;Ljava/lang/Object;)V
|
|
|
|
sget-object v0, Lu/a/a2/n;->d:Ljava/util/concurrent/atomic/AtomicReferenceFieldUpdater;
|
|
|
|
invoke-virtual {v0, p1, p0}, Ljava/util/concurrent/atomic/AtomicReferenceFieldUpdater;->lazySet(Ljava/lang/Object;Ljava/lang/Object;)V
|
|
|
|
:cond_0
|
|
invoke-virtual {p0}, Lu/a/a2/n;->b()Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
if-eq v0, p0, :cond_1
|
|
|
|
const/4 p1, 0x0
|
|
|
|
return p1
|
|
|
|
:cond_1
|
|
sget-object v0, Lu/a/a2/n;->d:Ljava/util/concurrent/atomic/AtomicReferenceFieldUpdater;
|
|
|
|
invoke-virtual {v0, p0, p0, p1}, Ljava/util/concurrent/atomic/AtomicReferenceFieldUpdater;->compareAndSet(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
invoke-virtual {p1, p0}, Lu/a/a2/n;->b(Lu/a/a2/n;)V
|
|
|
|
const/4 p1, 0x1
|
|
|
|
return p1
|
|
|
|
:cond_2
|
|
const-string p1, "node"
|
|
|
|
invoke-static {p1}, Lt/u/b/j;->a(Ljava/lang/String;)V
|
|
|
|
const/4 p1, 0x0
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method public final b()Ljava/lang/Object;
|
|
.locals 2
|
|
|
|
:goto_0
|
|
iget-object v0, p0, Lu/a/a2/n;->_next:Ljava/lang/Object;
|
|
|
|
instance-of v1, v0, Lu/a/a2/s;
|
|
|
|
if-nez v1, :cond_0
|
|
|
|
return-object v0
|
|
|
|
:cond_0
|
|
check-cast v0, Lu/a/a2/s;
|
|
|
|
invoke-virtual {v0, p0}, Lu/a/a2/s;->a(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
goto :goto_0
|
|
.end method
|
|
|
|
.method public final b(Lu/a/a2/n;)V
|
|
.locals 2
|
|
|
|
:cond_0
|
|
iget-object v0, p1, Lu/a/a2/n;->_prev:Ljava/lang/Object;
|
|
|
|
instance-of v1, v0, Lu/a/a2/t;
|
|
|
|
if-nez v1, :cond_3
|
|
|
|
invoke-virtual {p0}, Lu/a/a2/n;->b()Ljava/lang/Object;
|
|
|
|
move-result-object v1
|
|
|
|
if-eq v1, p1, :cond_1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
sget-object v1, Lu/a/a2/n;->e:Ljava/util/concurrent/atomic/AtomicReferenceFieldUpdater;
|
|
|
|
invoke-virtual {v1, p1, v0, p0}, Ljava/util/concurrent/atomic/AtomicReferenceFieldUpdater;->compareAndSet(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
invoke-virtual {p0}, Lu/a/a2/n;->b()Ljava/lang/Object;
|
|
|
|
move-result-object v1
|
|
|
|
instance-of v1, v1, Lu/a/a2/t;
|
|
|
|
if-eqz v1, :cond_3
|
|
|
|
if-eqz v0, :cond_2
|
|
|
|
check-cast v0, Lu/a/a2/n;
|
|
|
|
const/4 v1, 0x0
|
|
|
|
invoke-virtual {p1, v0, v1}, Lu/a/a2/n;->a(Lu/a/a2/n;Lu/a/a2/s;)Lu/a/a2/n;
|
|
|
|
goto :goto_0
|
|
|
|
:cond_2
|
|
new-instance p1, Lt/l;
|
|
|
|
const-string v0, "null cannot be cast to non-null type kotlinx.coroutines.internal.Node /* = kotlinx.coroutines.internal.LockFreeLinkedListNode */"
|
|
|
|
invoke-direct {p1, v0}, Lt/l;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p1
|
|
|
|
:cond_3
|
|
:goto_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public final c()Lu/a/a2/n;
|
|
.locals 1
|
|
|
|
invoke-virtual {p0}, Lu/a/a2/n;->b()Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-static {v0}, Lu/a/a2/m;->a(Ljava/lang/Object;)Lu/a/a2/n;
|
|
|
|
move-result-object v0
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public final d()Ljava/lang/Object;
|
|
.locals 3
|
|
|
|
:goto_0
|
|
iget-object v0, p0, Lu/a/a2/n;->_prev:Ljava/lang/Object;
|
|
|
|
instance-of v1, v0, Lu/a/a2/t;
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
return-object v0
|
|
|
|
:cond_0
|
|
if-eqz v0, :cond_2
|
|
|
|
move-object v1, v0
|
|
|
|
check-cast v1, Lu/a/a2/n;
|
|
|
|
invoke-virtual {v1}, Lu/a/a2/n;->b()Ljava/lang/Object;
|
|
|
|
move-result-object v2
|
|
|
|
if-ne v2, p0, :cond_1
|
|
|
|
return-object v0
|
|
|
|
:cond_1
|
|
const/4 v0, 0x0
|
|
|
|
invoke-virtual {p0, v1, v0}, Lu/a/a2/n;->a(Lu/a/a2/n;Lu/a/a2/s;)Lu/a/a2/n;
|
|
|
|
goto :goto_0
|
|
|
|
:cond_2
|
|
new-instance v0, Lt/l;
|
|
|
|
const-string v1, "null cannot be cast to non-null type kotlinx.coroutines.internal.Node /* = kotlinx.coroutines.internal.LockFreeLinkedListNode */"
|
|
|
|
invoke-direct {v0, v1}, Lt/l;-><init>(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
.end method
|
|
|
|
.method public final e()Lu/a/a2/n;
|
|
.locals 4
|
|
|
|
:cond_0
|
|
iget-object v0, p0, Lu/a/a2/n;->_prev:Ljava/lang/Object;
|
|
|
|
instance-of v1, v0, Lu/a/a2/t;
|
|
|
|
if-eqz v1, :cond_1
|
|
|
|
check-cast v0, Lu/a/a2/t;
|
|
|
|
iget-object v0, v0, Lu/a/a2/t;->a:Lu/a/a2/n;
|
|
|
|
return-object v0
|
|
|
|
:cond_1
|
|
if-ne v0, p0, :cond_5
|
|
|
|
move-object v1, p0
|
|
|
|
:goto_0
|
|
instance-of v2, v1, Lu/a/a2/l;
|
|
|
|
if-eqz v2, :cond_2
|
|
|
|
goto :goto_2
|
|
|
|
:cond_2
|
|
invoke-virtual {v1}, Lu/a/a2/n;->c()Lu/a/a2/n;
|
|
|
|
move-result-object v1
|
|
|
|
if-eq v1, p0, :cond_3
|
|
|
|
const/4 v2, 0x1
|
|
|
|
goto :goto_1
|
|
|
|
:cond_3
|
|
const/4 v2, 0x0
|
|
|
|
:goto_1
|
|
if-eqz v2, :cond_4
|
|
|
|
goto :goto_0
|
|
|
|
:cond_4
|
|
new-instance v0, Ljava/lang/IllegalStateException;
|
|
|
|
const-string v1, "Cannot loop to this while looking for list head"
|
|
|
|
invoke-virtual {v1}, Ljava/lang/Object;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-direct {v0, v1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
|
|
:cond_5
|
|
if-eqz v0, :cond_7
|
|
|
|
move-object v1, v0
|
|
|
|
check-cast v1, Lu/a/a2/n;
|
|
|
|
:goto_2
|
|
iget-object v2, v1, Lu/a/a2/n;->_removedRef:Ljava/lang/Object;
|
|
|
|
check-cast v2, Lu/a/a2/t;
|
|
|
|
if-eqz v2, :cond_6
|
|
|
|
goto :goto_3
|
|
|
|
:cond_6
|
|
new-instance v2, Lu/a/a2/t;
|
|
|
|
invoke-direct {v2, v1}, Lu/a/a2/t;-><init>(Lu/a/a2/n;)V
|
|
|
|
sget-object v3, Lu/a/a2/n;->f:Ljava/util/concurrent/atomic/AtomicReferenceFieldUpdater;
|
|
|
|
invoke-virtual {v3, v1, v2}, Ljava/util/concurrent/atomic/AtomicReferenceFieldUpdater;->lazySet(Ljava/lang/Object;Ljava/lang/Object;)V
|
|
|
|
:goto_3
|
|
sget-object v1, Lu/a/a2/n;->e:Ljava/util/concurrent/atomic/AtomicReferenceFieldUpdater;
|
|
|
|
invoke-virtual {v1, p0, v0, v2}, Ljava/util/concurrent/atomic/AtomicReferenceFieldUpdater;->compareAndSet(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
check-cast v0, Lu/a/a2/n;
|
|
|
|
return-object v0
|
|
|
|
:cond_7
|
|
new-instance v0, Lt/l;
|
|
|
|
const-string v1, "null cannot be cast to non-null type kotlinx.coroutines.internal.Node /* = kotlinx.coroutines.internal.LockFreeLinkedListNode */"
|
|
|
|
invoke-direct {v0, v1}, Lt/l;-><init>(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
.end method
|
|
|
|
.method public final f()Lu/a/a2/t;
|
|
.locals 2
|
|
|
|
iget-object v0, p0, Lu/a/a2/n;->_removedRef:Ljava/lang/Object;
|
|
|
|
check-cast v0, Lu/a/a2/t;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
new-instance v0, Lu/a/a2/t;
|
|
|
|
invoke-direct {v0, p0}, Lu/a/a2/t;-><init>(Lu/a/a2/n;)V
|
|
|
|
sget-object v1, Lu/a/a2/n;->f:Ljava/util/concurrent/atomic/AtomicReferenceFieldUpdater;
|
|
|
|
invoke-virtual {v1, p0, v0}, Ljava/util/concurrent/atomic/AtomicReferenceFieldUpdater;->lazySet(Ljava/lang/Object;Ljava/lang/Object;)V
|
|
|
|
:goto_0
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public toString()Ljava/lang/String;
|
|
.locals 2
|
|
|
|
new-instance v0, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
invoke-virtual {p0}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v1}, Ljava/lang/Class;->getSimpleName()Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
const/16 v1, 0x40
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;
|
|
|
|
invoke-static {p0}, Ljava/lang/System;->identityHashCode(Ljava/lang/Object;)I
|
|
|
|
move-result v1
|
|
|
|
invoke-static {v1}, Ljava/lang/Integer;->toHexString(I)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
|