210 lines
4.3 KiB
Smali
210 lines
4.3 KiB
Smali
.class public Ll0/a/r1/h;
|
|
.super Ljava/lang/Object;
|
|
.source "LockFreeTaskQueue.kt"
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"<E:",
|
|
"Ljava/lang/Object;",
|
|
">",
|
|
"Ljava/lang/Object;"
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# static fields
|
|
.field public static final a:Ljava/util/concurrent/atomic/AtomicReferenceFieldUpdater;
|
|
|
|
|
|
# instance fields
|
|
.field public volatile _cur:Ljava/lang/Object;
|
|
|
|
|
|
# direct methods
|
|
.method public static constructor <clinit>()V
|
|
.locals 3
|
|
|
|
const-class v0, Ll0/a/r1/h;
|
|
|
|
const-class v1, Ljava/lang/Object;
|
|
|
|
const-string v2, "_cur"
|
|
|
|
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, Ll0/a/r1/h;->a:Ljava/util/concurrent/atomic/AtomicReferenceFieldUpdater;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>(Z)V
|
|
.locals 2
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
new-instance v0, Ll0/a/r1/i;
|
|
|
|
const/16 v1, 0x8
|
|
|
|
invoke-direct {v0, v1, p1}, Ll0/a/r1/i;-><init>(IZ)V
|
|
|
|
iput-object v0, p0, Ll0/a/r1/h;->_cur:Ljava/lang/Object;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public final a(Ljava/lang/Object;)Z
|
|
.locals 3
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(TE;)Z"
|
|
}
|
|
.end annotation
|
|
|
|
:goto_0
|
|
iget-object v0, p0, Ll0/a/r1/h;->_cur:Ljava/lang/Object;
|
|
|
|
check-cast v0, Ll0/a/r1/i;
|
|
|
|
invoke-virtual {v0, p1}, Ll0/a/r1/i;->a(Ljava/lang/Object;)I
|
|
|
|
move-result v1
|
|
|
|
const/4 v2, 0x1
|
|
|
|
if-eqz v1, :cond_2
|
|
|
|
if-eq v1, v2, :cond_1
|
|
|
|
const/4 v0, 0x2
|
|
|
|
if-eq v1, v0, :cond_0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 p1, 0x0
|
|
|
|
return p1
|
|
|
|
:cond_1
|
|
sget-object v1, Ll0/a/r1/h;->a:Ljava/util/concurrent/atomic/AtomicReferenceFieldUpdater;
|
|
|
|
invoke-virtual {v0}, Ll0/a/r1/i;->d()Ll0/a/r1/i;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v1, p0, v0, v2}, Ljava/util/concurrent/atomic/AtomicReferenceFieldUpdater;->compareAndSet(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Z
|
|
|
|
goto :goto_0
|
|
|
|
:cond_2
|
|
return v2
|
|
.end method
|
|
|
|
.method public final b()V
|
|
.locals 3
|
|
|
|
:goto_0
|
|
iget-object v0, p0, Ll0/a/r1/h;->_cur:Ljava/lang/Object;
|
|
|
|
check-cast v0, Ll0/a/r1/i;
|
|
|
|
invoke-virtual {v0}, Ll0/a/r1/i;->b()Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
sget-object v1, Ll0/a/r1/h;->a:Ljava/util/concurrent/atomic/AtomicReferenceFieldUpdater;
|
|
|
|
invoke-virtual {v0}, Ll0/a/r1/i;->d()Ll0/a/r1/i;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v1, p0, v0, v2}, Ljava/util/concurrent/atomic/AtomicReferenceFieldUpdater;->compareAndSet(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Z
|
|
|
|
goto :goto_0
|
|
.end method
|
|
|
|
.method public final c()I
|
|
.locals 6
|
|
|
|
iget-object v0, p0, Ll0/a/r1/h;->_cur:Ljava/lang/Object;
|
|
|
|
check-cast v0, Ll0/a/r1/i;
|
|
|
|
iget-wide v0, v0, Ll0/a/r1/i;->_state:J
|
|
|
|
const-wide/32 v2, 0x3fffffff
|
|
|
|
and-long/2addr v2, v0
|
|
|
|
const/4 v4, 0x0
|
|
|
|
shr-long/2addr v2, v4
|
|
|
|
long-to-int v3, v2
|
|
|
|
const-wide v4, 0xfffffffc0000000L
|
|
|
|
and-long/2addr v0, v4
|
|
|
|
const/16 v2, 0x1e
|
|
|
|
shr-long/2addr v0, v2
|
|
|
|
long-to-int v1, v0
|
|
|
|
sub-int/2addr v1, v3
|
|
|
|
const v0, 0x3fffffff # 1.9999999f
|
|
|
|
and-int/2addr v0, v1
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public final d()Ljava/lang/Object;
|
|
.locals 3
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"()TE;"
|
|
}
|
|
.end annotation
|
|
|
|
:goto_0
|
|
iget-object v0, p0, Ll0/a/r1/h;->_cur:Ljava/lang/Object;
|
|
|
|
check-cast v0, Ll0/a/r1/i;
|
|
|
|
invoke-virtual {v0}, Ll0/a/r1/i;->e()Ljava/lang/Object;
|
|
|
|
move-result-object v1
|
|
|
|
sget-object v2, Ll0/a/r1/i;->g:Ll0/a/r1/n;
|
|
|
|
if-eq v1, v2, :cond_0
|
|
|
|
return-object v1
|
|
|
|
:cond_0
|
|
sget-object v1, Ll0/a/r1/h;->a:Ljava/util/concurrent/atomic/AtomicReferenceFieldUpdater;
|
|
|
|
invoke-virtual {v0}, Ll0/a/r1/i;->d()Ll0/a/r1/i;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v1, p0, v0, v2}, Ljava/util/concurrent/atomic/AtomicReferenceFieldUpdater;->compareAndSet(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Z
|
|
|
|
goto :goto_0
|
|
.end method
|