152 lines
4 KiB
Smali
152 lines
4 KiB
Smali
.class public Lkotlinx/coroutines/a/j;
|
|
.super Ljava/lang/Object;
|
|
.source "LockFreeMPMCQueue.kt"
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"<T:",
|
|
"Lkotlinx/coroutines/a/k<",
|
|
"TT;>;>",
|
|
"Ljava/lang/Object;"
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# static fields
|
|
.field private static final bhw:Ljava/util/concurrent/atomic/AtomicReferenceFieldUpdater;
|
|
|
|
.field private static final bhx:Ljava/util/concurrent/atomic/AtomicReferenceFieldUpdater;
|
|
|
|
|
|
# instance fields
|
|
.field protected volatile head:Ljava/lang/Object;
|
|
|
|
.field protected volatile tail:Ljava/lang/Object;
|
|
|
|
|
|
# direct methods
|
|
.method static constructor <clinit>()V
|
|
.locals 3
|
|
|
|
const-class v0, Lkotlinx/coroutines/a/j;
|
|
|
|
const-class v1, Ljava/lang/Object;
|
|
|
|
const-string v2, "head"
|
|
|
|
invoke-static {v0, v1, 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, Lkotlinx/coroutines/a/j;->bhw:Ljava/util/concurrent/atomic/AtomicReferenceFieldUpdater;
|
|
|
|
const-class v0, Lkotlinx/coroutines/a/j;
|
|
|
|
const-class v1, Ljava/lang/Object;
|
|
|
|
const-string v2, "tail"
|
|
|
|
invoke-static {v0, v1, 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, Lkotlinx/coroutines/a/j;->bhx:Ljava/util/concurrent/atomic/AtomicReferenceFieldUpdater;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>()V
|
|
.locals 1
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
new-instance v0, Lkotlinx/coroutines/a/k;
|
|
|
|
invoke-direct {v0}, Lkotlinx/coroutines/a/k;-><init>()V
|
|
|
|
iput-object v0, p0, Lkotlinx/coroutines/a/j;->head:Ljava/lang/Object;
|
|
|
|
iget-object v0, p0, Lkotlinx/coroutines/a/j;->head:Ljava/lang/Object;
|
|
|
|
iput-object v0, p0, Lkotlinx/coroutines/a/j;->tail:Ljava/lang/Object;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public final a(Lkotlinx/coroutines/a/k;Lkotlinx/coroutines/a/k;)Z
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(TT;TT;)Z"
|
|
}
|
|
.end annotation
|
|
|
|
const-string v0, "curHead"
|
|
|
|
invoke-static {p1, v0}, Lkotlin/jvm/internal/j;->h(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const-string v0, "update"
|
|
|
|
invoke-static {p2, v0}, Lkotlin/jvm/internal/j;->h(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
sget-object v0, Lkotlinx/coroutines/a/j;->bhw:Ljava/util/concurrent/atomic/AtomicReferenceFieldUpdater;
|
|
|
|
invoke-virtual {v0, p0, p1, p2}, Ljava/util/concurrent/atomic/AtomicReferenceFieldUpdater;->compareAndSet(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Z
|
|
|
|
move-result p1
|
|
|
|
return p1
|
|
.end method
|
|
|
|
.method public final b(Lkotlinx/coroutines/a/k;Lkotlinx/coroutines/a/k;)Z
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(TT;TT;)Z"
|
|
}
|
|
.end annotation
|
|
|
|
const-string v0, "curTail"
|
|
|
|
invoke-static {p1, v0}, Lkotlin/jvm/internal/j;->h(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const-string v0, "update"
|
|
|
|
invoke-static {p2, v0}, Lkotlin/jvm/internal/j;->h(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
sget-object v0, Lkotlinx/coroutines/a/j;->bhx:Ljava/util/concurrent/atomic/AtomicReferenceFieldUpdater;
|
|
|
|
invoke-virtual {v0, p0, p1, p2}, Ljava/util/concurrent/atomic/AtomicReferenceFieldUpdater;->compareAndSet(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Z
|
|
|
|
move-result p1
|
|
|
|
return p1
|
|
.end method
|
|
|
|
.method public final getSize()I
|
|
.locals 2
|
|
|
|
iget-object v0, p0, Lkotlinx/coroutines/a/j;->head:Ljava/lang/Object;
|
|
|
|
check-cast v0, Lkotlinx/coroutines/a/k;
|
|
|
|
const/4 v1, 0x0
|
|
|
|
:goto_0
|
|
iget-object v0, v0, Lkotlinx/coroutines/a/k;->next:Ljava/lang/Object;
|
|
|
|
check-cast v0, Lkotlinx/coroutines/a/k;
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
return v1
|
|
|
|
:cond_0
|
|
add-int/lit8 v1, v1, 0x1
|
|
|
|
goto :goto_0
|
|
.end method
|