2019-10-09 23:16:36 +00:00
|
|
|
.class final Lkotlin/p;
|
2019-07-24 11:27:29 +00:00
|
|
|
.super Ljava/lang/Object;
|
|
|
|
.source "LazyJVM.kt"
|
|
|
|
|
|
|
|
# interfaces
|
|
|
|
.implements Ljava/io/Serializable;
|
|
|
|
.implements Lkotlin/Lazy;
|
|
|
|
|
|
|
|
|
|
|
|
# annotations
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"<T:",
|
|
|
|
"Ljava/lang/Object;",
|
|
|
|
">",
|
|
|
|
"Ljava/lang/Object;",
|
|
|
|
"Ljava/io/Serializable;",
|
|
|
|
"Lkotlin/Lazy<",
|
|
|
|
"TT;>;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
|
|
|
|
# instance fields
|
|
|
|
.field private volatile _value:Ljava/lang/Object;
|
|
|
|
|
|
|
|
.field private initializer:Lkotlin/jvm/functions/Function0;
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"Lkotlin/jvm/functions/Function0<",
|
|
|
|
"+TT;>;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
.end field
|
|
|
|
|
|
|
|
.field private final lock:Ljava/lang/Object;
|
|
|
|
|
|
|
|
|
|
|
|
# direct methods
|
2019-10-09 23:16:36 +00:00
|
|
|
.method public constructor <init>(Lkotlin/jvm/functions/Function0;Ljava/lang/Object;)V
|
2019-07-24 11:27:29 +00:00
|
|
|
.locals 1
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"(",
|
|
|
|
"Lkotlin/jvm/functions/Function0<",
|
|
|
|
"+TT;>;",
|
|
|
|
"Ljava/lang/Object;",
|
|
|
|
")V"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
2019-10-09 23:16:36 +00:00
|
|
|
const-string v0, "initializer"
|
2019-07-24 11:27:29 +00:00
|
|
|
|
2019-10-09 23:16:36 +00:00
|
|
|
invoke-static {p1, v0}, Lkotlin/jvm/internal/l;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
|
|
|
|
iput-object p1, p0, Lkotlin/p;->initializer:Lkotlin/jvm/functions/Function0;
|
|
|
|
|
2019-11-20 22:09:14 +00:00
|
|
|
sget-object p1, Lkotlin/s;->bgx:Lkotlin/s;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
iput-object p1, p0, Lkotlin/p;->_value:Ljava/lang/Object;
|
|
|
|
|
2019-10-09 23:16:36 +00:00
|
|
|
if-nez p2, :cond_0
|
|
|
|
|
|
|
|
move-object p2, p0
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
iput-object p2, p0, Lkotlin/p;->lock:Ljava/lang/Object;
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public synthetic constructor <init>(Lkotlin/jvm/functions/Function0;Ljava/lang/Object;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
and-int/lit8 p3, p3, 0x2
|
|
|
|
|
|
|
|
if-eqz p3, :cond_0
|
|
|
|
|
|
|
|
const/4 p2, 0x0
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
invoke-direct {p0, p1, p2}, Lkotlin/p;-><init>(Lkotlin/jvm/functions/Function0;Ljava/lang/Object;)V
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private final writeReplace()Ljava/lang/Object;
|
|
|
|
.locals 2
|
|
|
|
|
|
|
|
new-instance v0, Lkotlin/d;
|
|
|
|
|
|
|
|
invoke-virtual {p0}, Lkotlin/p;->getValue()Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
invoke-direct {v0, v1}, Lkotlin/d;-><init>(Ljava/lang/Object;)V
|
|
|
|
|
|
|
|
return-object v0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
|
|
|
|
# virtual methods
|
|
|
|
.method public final getValue()Ljava/lang/Object;
|
|
|
|
.locals 3
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"()TT;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
iget-object v0, p0, Lkotlin/p;->_value:Ljava/lang/Object;
|
|
|
|
|
2019-11-20 22:09:14 +00:00
|
|
|
sget-object v1, Lkotlin/s;->bgx:Lkotlin/s;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
if-eq v0, v1, :cond_0
|
|
|
|
|
|
|
|
return-object v0
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
iget-object v0, p0, Lkotlin/p;->lock:Ljava/lang/Object;
|
|
|
|
|
|
|
|
monitor-enter v0
|
|
|
|
|
|
|
|
:try_start_0
|
|
|
|
iget-object v1, p0, Lkotlin/p;->_value:Ljava/lang/Object;
|
|
|
|
|
2019-11-20 22:09:14 +00:00
|
|
|
sget-object v2, Lkotlin/s;->bgx:Lkotlin/s;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
if-eq v1, v2, :cond_1
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
iget-object v1, p0, Lkotlin/p;->initializer:Lkotlin/jvm/functions/Function0;
|
|
|
|
|
|
|
|
if-nez v1, :cond_2
|
|
|
|
|
2019-10-09 23:16:36 +00:00
|
|
|
invoke-static {}, Lkotlin/jvm/internal/l;->throwNpe()V
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
:cond_2
|
|
|
|
invoke-interface {v1}, Lkotlin/jvm/functions/Function0;->invoke()Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
iput-object v1, p0, Lkotlin/p;->_value:Ljava/lang/Object;
|
|
|
|
|
|
|
|
const/4 v2, 0x0
|
|
|
|
|
|
|
|
iput-object v2, p0, Lkotlin/p;->initializer:Lkotlin/jvm/functions/Function0;
|
|
|
|
:try_end_0
|
|
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
|
|
|
|
:goto_0
|
|
|
|
monitor-exit v0
|
|
|
|
|
|
|
|
return-object v1
|
|
|
|
|
|
|
|
:catchall_0
|
|
|
|
move-exception v1
|
|
|
|
|
|
|
|
monitor-exit v0
|
|
|
|
|
|
|
|
throw v1
|
|
|
|
.end method
|
|
|
|
|
2019-10-09 23:16:36 +00:00
|
|
|
.method public final isInitialized()Z
|
2019-07-24 11:27:29 +00:00
|
|
|
.locals 2
|
|
|
|
|
|
|
|
iget-object v0, p0, Lkotlin/p;->_value:Ljava/lang/Object;
|
|
|
|
|
2019-11-20 22:09:14 +00:00
|
|
|
sget-object v1, Lkotlin/s;->bgx:Lkotlin/s;
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
if-eq v0, v1, :cond_0
|
|
|
|
|
|
|
|
const/4 v0, 0x1
|
|
|
|
|
2019-10-09 23:16:36 +00:00
|
|
|
return v0
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
:cond_0
|
|
|
|
const/4 v0, 0x0
|
|
|
|
|
2019-10-09 23:16:36 +00:00
|
|
|
return v0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public final toString()Ljava/lang/String;
|
|
|
|
.locals 1
|
|
|
|
|
|
|
|
invoke-virtual {p0}, Lkotlin/p;->isInitialized()Z
|
|
|
|
|
|
|
|
move-result v0
|
|
|
|
|
|
|
|
if-eqz v0, :cond_0
|
2019-07-24 11:27:29 +00:00
|
|
|
|
|
|
|
invoke-virtual {p0}, Lkotlin/p;->getValue()Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
invoke-static {v0}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
return-object v0
|
|
|
|
|
2019-10-09 23:16:36 +00:00
|
|
|
:cond_0
|
2019-07-24 11:27:29 +00:00
|
|
|
const-string v0, "Lazy value not initialized yet."
|
|
|
|
|
|
|
|
return-object v0
|
|
|
|
.end method
|