2020-05-17 12:40:10 +00:00
|
|
|
.class public Lcom/esotericsoftware/kryo/util/UnsafeUtil;
|
|
|
|
.super Ljava/lang/Object;
|
|
|
|
.source "UnsafeUtil.java"
|
|
|
|
|
|
|
|
|
|
|
|
# static fields
|
|
|
|
.field public static final _unsafe:Lsun/misc/Unsafe;
|
|
|
|
|
|
|
|
.field public static final byteArrayBaseOffset:J
|
|
|
|
|
|
|
|
.field public static final charArrayBaseOffset:J
|
|
|
|
|
|
|
|
.field public static directByteBufferConstr:Ljava/lang/reflect/Constructor;
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"Ljava/lang/reflect/Constructor<",
|
|
|
|
"+",
|
|
|
|
"Ljava/nio/ByteBuffer;",
|
|
|
|
">;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
.end field
|
|
|
|
|
|
|
|
.field public static final doubleArrayBaseOffset:J
|
|
|
|
|
|
|
|
.field public static final floatArrayBaseOffset:J
|
|
|
|
|
|
|
|
.field public static final intArrayBaseOffset:J
|
|
|
|
|
|
|
|
.field public static final longArrayBaseOffset:J
|
|
|
|
|
|
|
|
.field public static final shortArrayBaseOffset:J
|
|
|
|
|
|
|
|
|
|
|
|
# direct methods
|
|
|
|
.method public static constructor <clinit>()V
|
|
|
|
.locals 20
|
|
|
|
|
|
|
|
const-string v0, "kryo"
|
|
|
|
|
|
|
|
const/4 v1, 0x0
|
|
|
|
|
|
|
|
const/4 v2, 0x1
|
|
|
|
|
|
|
|
:try_start_0
|
|
|
|
sget-boolean v5, Lcom/esotericsoftware/kryo/util/Util;->IS_ANDROID:Z
|
|
|
|
|
|
|
|
if-nez v5, :cond_0
|
|
|
|
|
|
|
|
const-class v5, Lsun/misc/Unsafe;
|
|
|
|
|
|
|
|
const-string v6, "theUnsafe"
|
|
|
|
|
|
|
|
invoke-virtual {v5, v6}, Ljava/lang/Class;->getDeclaredField(Ljava/lang/String;)Ljava/lang/reflect/Field;
|
|
|
|
|
|
|
|
move-result-object v5
|
|
|
|
|
|
|
|
invoke-virtual {v5, v2}, Ljava/lang/reflect/Field;->setAccessible(Z)V
|
|
|
|
|
|
|
|
invoke-virtual {v5, v1}, Ljava/lang/reflect/Field;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v5
|
|
|
|
|
|
|
|
check-cast v5, Lsun/misc/Unsafe;
|
|
|
|
:try_end_0
|
|
|
|
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_7
|
|
|
|
|
|
|
|
:try_start_1
|
|
|
|
const-class v6, [B
|
|
|
|
|
|
|
|
invoke-virtual {v5, v6}, Lsun/misc/Unsafe;->arrayBaseOffset(Ljava/lang/Class;)I
|
|
|
|
|
|
|
|
move-result v6
|
|
|
|
:try_end_1
|
|
|
|
.catch Ljava/lang/Exception; {:try_start_1 .. :try_end_1} :catch_6
|
|
|
|
|
|
|
|
int-to-long v6, v6
|
|
|
|
|
|
|
|
:try_start_2
|
|
|
|
const-class v8, [C
|
|
|
|
|
|
|
|
invoke-virtual {v5, v8}, Lsun/misc/Unsafe;->arrayBaseOffset(Ljava/lang/Class;)I
|
|
|
|
|
|
|
|
move-result v8
|
|
|
|
:try_end_2
|
|
|
|
.catch Ljava/lang/Exception; {:try_start_2 .. :try_end_2} :catch_5
|
|
|
|
|
|
|
|
int-to-long v8, v8
|
|
|
|
|
|
|
|
:try_start_3
|
|
|
|
const-class v10, [S
|
|
|
|
|
|
|
|
invoke-virtual {v5, v10}, Lsun/misc/Unsafe;->arrayBaseOffset(Ljava/lang/Class;)I
|
|
|
|
|
|
|
|
move-result v10
|
|
|
|
:try_end_3
|
|
|
|
.catch Ljava/lang/Exception; {:try_start_3 .. :try_end_3} :catch_4
|
|
|
|
|
|
|
|
int-to-long v10, v10
|
|
|
|
|
|
|
|
:try_start_4
|
|
|
|
const-class v12, [I
|
|
|
|
|
|
|
|
invoke-virtual {v5, v12}, Lsun/misc/Unsafe;->arrayBaseOffset(Ljava/lang/Class;)I
|
|
|
|
|
|
|
|
move-result v12
|
|
|
|
:try_end_4
|
|
|
|
.catch Ljava/lang/Exception; {:try_start_4 .. :try_end_4} :catch_3
|
|
|
|
|
|
|
|
int-to-long v12, v12
|
|
|
|
|
|
|
|
:try_start_5
|
|
|
|
const-class v14, [F
|
|
|
|
|
|
|
|
invoke-virtual {v5, v14}, Lsun/misc/Unsafe;->arrayBaseOffset(Ljava/lang/Class;)I
|
|
|
|
|
|
|
|
move-result v14
|
|
|
|
:try_end_5
|
|
|
|
.catch Ljava/lang/Exception; {:try_start_5 .. :try_end_5} :catch_2
|
|
|
|
|
|
|
|
int-to-long v14, v14
|
|
|
|
|
|
|
|
:try_start_6
|
|
|
|
const-class v3, [J
|
|
|
|
|
|
|
|
invoke-virtual {v5, v3}, Lsun/misc/Unsafe;->arrayBaseOffset(Ljava/lang/Class;)I
|
|
|
|
|
|
|
|
move-result v3
|
|
|
|
:try_end_6
|
|
|
|
.catch Ljava/lang/Exception; {:try_start_6 .. :try_end_6} :catch_1
|
|
|
|
|
|
|
|
int-to-long v3, v3
|
|
|
|
|
|
|
|
:try_start_7
|
|
|
|
const-class v1, [D
|
|
|
|
|
|
|
|
invoke-virtual {v5, v1}, Lsun/misc/Unsafe;->arrayBaseOffset(Ljava/lang/Class;)I
|
|
|
|
|
|
|
|
move-result v0
|
|
|
|
:try_end_7
|
|
|
|
.catch Ljava/lang/Exception; {:try_start_7 .. :try_end_7} :catch_0
|
|
|
|
|
|
|
|
int-to-long v0, v0
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
move-wide/from16 v16, v14
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
move-wide/from16 v18, v6
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
move-object v7, v5
|
|
|
|
|
|
|
|
move-wide v5, v3
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-wide/from16 v3, v18
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
goto :goto_0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
:catch_0
|
|
|
|
nop
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
goto :goto_6
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
:catch_1
|
|
|
|
const-wide/16 v3, 0x0
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
goto :goto_6
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
:catch_2
|
|
|
|
const-wide/16 v3, 0x0
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
goto :goto_5
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
:catch_3
|
|
|
|
const-wide/16 v3, 0x0
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
goto :goto_4
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
:catch_4
|
|
|
|
const-wide/16 v3, 0x0
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
goto :goto_3
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
:catch_5
|
|
|
|
const-wide/16 v3, 0x0
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
goto :goto_2
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
:catch_6
|
|
|
|
const-wide/16 v3, 0x0
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
goto :goto_1
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
:cond_0
|
|
|
|
:try_start_8
|
2020-07-22 00:04:40 +00:00
|
|
|
sget-boolean v1, Lf/g/a/a;->d:Z
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
if-eqz v1, :cond_1
|
|
|
|
|
|
|
|
const-string v1, "Running on Android platform. Use of sun.misc.Unsafe should be disabled"
|
|
|
|
|
2020-07-22 00:04:40 +00:00
|
|
|
invoke-static {v0, v1}, Lf/g/a/a;->c(Ljava/lang/String;Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
:try_end_8
|
|
|
|
.catch Ljava/lang/Exception; {:try_start_8 .. :try_end_8} :catch_7
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
const-wide/16 v0, 0x0
|
|
|
|
|
|
|
|
const-wide/16 v3, 0x0
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
const-wide/16 v5, 0x0
|
|
|
|
|
|
|
|
const/4 v7, 0x0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
const-wide/16 v8, 0x0
|
|
|
|
|
|
|
|
const-wide/16 v10, 0x0
|
|
|
|
|
|
|
|
const-wide/16 v12, 0x0
|
|
|
|
|
|
|
|
const-wide/16 v16, 0x0
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
:goto_0
|
|
|
|
move-wide/from16 v14, v16
|
|
|
|
|
|
|
|
move-wide/from16 v16, v0
|
|
|
|
|
|
|
|
goto :goto_7
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
:catch_7
|
|
|
|
const-wide/16 v3, 0x0
|
|
|
|
|
|
|
|
const/4 v5, 0x0
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
:goto_1
|
2020-05-17 12:40:10 +00:00
|
|
|
const-wide/16 v6, 0x0
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
:goto_2
|
2020-05-17 12:40:10 +00:00
|
|
|
const-wide/16 v8, 0x0
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
:goto_3
|
2020-05-17 12:40:10 +00:00
|
|
|
const-wide/16 v10, 0x0
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
:goto_4
|
2020-05-17 12:40:10 +00:00
|
|
|
const-wide/16 v12, 0x0
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
:goto_5
|
2020-05-17 12:40:10 +00:00
|
|
|
const-wide/16 v14, 0x0
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
:goto_6
|
2020-07-22 00:04:40 +00:00
|
|
|
sget-boolean v1, Lf/g/a/a;->d:Z
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
if-eqz v1, :cond_2
|
|
|
|
|
|
|
|
const-string v1, "sun.misc.Unsafe is not accessible or not available. Use of sun.misc.Unsafe should be disabled"
|
|
|
|
|
2020-07-22 00:04:40 +00:00
|
|
|
invoke-static {v0, v1}, Lf/g/a/a;->c(Ljava/lang/String;Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
:cond_2
|
2020-07-08 16:44:49 +00:00
|
|
|
const-wide/16 v16, 0x0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
move-wide/from16 v18, v6
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
move-object v7, v5
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
move-wide v5, v3
|
|
|
|
|
|
|
|
move-wide/from16 v3, v18
|
|
|
|
|
|
|
|
:goto_7
|
|
|
|
sput-wide v3, Lcom/esotericsoftware/kryo/util/UnsafeUtil;->byteArrayBaseOffset:J
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
sput-wide v8, Lcom/esotericsoftware/kryo/util/UnsafeUtil;->charArrayBaseOffset:J
|
|
|
|
|
|
|
|
sput-wide v10, Lcom/esotericsoftware/kryo/util/UnsafeUtil;->shortArrayBaseOffset:J
|
|
|
|
|
|
|
|
sput-wide v12, Lcom/esotericsoftware/kryo/util/UnsafeUtil;->intArrayBaseOffset:J
|
|
|
|
|
|
|
|
sput-wide v14, Lcom/esotericsoftware/kryo/util/UnsafeUtil;->floatArrayBaseOffset:J
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
sput-wide v5, Lcom/esotericsoftware/kryo/util/UnsafeUtil;->longArrayBaseOffset:J
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
sput-wide v16, Lcom/esotericsoftware/kryo/util/UnsafeUtil;->doubleArrayBaseOffset:J
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
sput-object v7, Lcom/esotericsoftware/kryo/util/UnsafeUtil;->_unsafe:Lsun/misc/Unsafe;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
invoke-static {v2}, Ljava/nio/ByteBuffer;->allocateDirect(I)Ljava/nio/ByteBuffer;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
:try_start_9
|
|
|
|
invoke-virtual {v0}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
const/4 v1, 0x3
|
|
|
|
|
|
|
|
new-array v1, v1, [Ljava/lang/Class;
|
|
|
|
|
|
|
|
const/4 v3, 0x0
|
|
|
|
|
|
|
|
sget-object v4, Ljava/lang/Long;->TYPE:Ljava/lang/Class;
|
|
|
|
|
|
|
|
aput-object v4, v1, v3
|
|
|
|
|
|
|
|
sget-object v3, Ljava/lang/Integer;->TYPE:Ljava/lang/Class;
|
|
|
|
|
|
|
|
aput-object v3, v1, v2
|
|
|
|
|
|
|
|
const/4 v3, 0x2
|
|
|
|
|
|
|
|
const-class v4, Ljava/lang/Object;
|
|
|
|
|
|
|
|
aput-object v4, v1, v3
|
|
|
|
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/Class;->getDeclaredConstructor([Ljava/lang/Class;)Ljava/lang/reflect/Constructor;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
sput-object v0, Lcom/esotericsoftware/kryo/util/UnsafeUtil;->directByteBufferConstr:Ljava/lang/reflect/Constructor;
|
|
|
|
|
|
|
|
invoke-virtual {v0, v2}, Ljava/lang/reflect/Constructor;->setAccessible(Z)V
|
|
|
|
:try_end_9
|
|
|
|
.catch Ljava/lang/Exception; {:try_start_9 .. :try_end_9} :catch_8
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
goto :goto_8
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
:catch_8
|
|
|
|
const/4 v0, 0x0
|
|
|
|
|
|
|
|
sput-object v0, Lcom/esotericsoftware/kryo/util/UnsafeUtil;->directByteBufferConstr:Ljava/lang/reflect/Constructor;
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
:goto_8
|
2020-05-17 12:40:10 +00:00
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public constructor <init>()V
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public static final getDirectBufferAt(JI)Ljava/nio/ByteBuffer;
|
|
|
|
.locals 5
|
|
|
|
|
|
|
|
sget-object v0, Lcom/esotericsoftware/kryo/util/UnsafeUtil;->directByteBufferConstr:Ljava/lang/reflect/Constructor;
|
|
|
|
|
|
|
|
const/4 v1, 0x0
|
|
|
|
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
|
|
|
|
return-object v1
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
const/4 v2, 0x3
|
|
|
|
|
|
|
|
:try_start_0
|
|
|
|
new-array v2, v2, [Ljava/lang/Object;
|
|
|
|
|
|
|
|
const/4 v3, 0x0
|
|
|
|
|
|
|
|
invoke-static {p0, p1}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
|
|
|
|
move-result-object v4
|
|
|
|
|
|
|
|
aput-object v4, v2, v3
|
|
|
|
|
|
|
|
const/4 v3, 0x1
|
|
|
|
|
|
|
|
invoke-static {p2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
|
|
|
|
move-result-object p2
|
|
|
|
|
|
|
|
aput-object p2, v2, v3
|
|
|
|
|
|
|
|
const/4 p2, 0x2
|
|
|
|
|
|
|
|
aput-object v1, v2, p2
|
|
|
|
|
|
|
|
invoke-virtual {v0, v2}, Ljava/lang/reflect/Constructor;->newInstance([Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object p2
|
|
|
|
|
|
|
|
check-cast p2, Ljava/nio/ByteBuffer;
|
|
|
|
:try_end_0
|
|
|
|
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
|
|
|
|
return-object p2
|
|
|
|
|
|
|
|
:catch_0
|
|
|
|
move-exception p2
|
|
|
|
|
|
|
|
new-instance v0, Ljava/lang/RuntimeException;
|
|
|
|
|
|
|
|
const-string v1, "Cannot allocate ByteBuffer at a given address: "
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-static {v1, p0, p1}, Lf/e/b/a/a;->l(Ljava/lang/String;J)Ljava/lang/String;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result-object p0
|
|
|
|
|
|
|
|
invoke-direct {v0, p0, p2}, Ljava/lang/RuntimeException;-><init>(Ljava/lang/String;Ljava/lang/Throwable;)V
|
|
|
|
|
|
|
|
throw v0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public static releaseBuffer(Ljava/nio/ByteBuffer;)V
|
|
|
|
.locals 1
|
|
|
|
|
|
|
|
if-eqz p0, :cond_0
|
|
|
|
|
|
|
|
invoke-virtual {p0}, Ljava/nio/ByteBuffer;->isDirect()Z
|
|
|
|
|
|
|
|
move-result v0
|
|
|
|
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
|
|
|
|
check-cast p0, Lsun/nio/ch/DirectBuffer;
|
|
|
|
|
|
|
|
invoke-interface {p0}, Lsun/nio/ch/DirectBuffer;->cleaner()Lsun/misc/Cleaner;
|
|
|
|
|
|
|
|
move-result-object p0
|
|
|
|
|
|
|
|
if-eqz p0, :cond_0
|
|
|
|
|
|
|
|
check-cast p0, Lsun/misc/Cleaner;
|
|
|
|
|
|
|
|
invoke-virtual {p0}, Lsun/misc/Cleaner;->clean()V
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public static sortFieldsByOffset(Ljava/util/List;)[Ljava/lang/reflect/Field;
|
|
|
|
.locals 5
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"(",
|
|
|
|
"Ljava/util/List<",
|
|
|
|
"Ljava/lang/reflect/Field;",
|
|
|
|
">;)[",
|
|
|
|
"Ljava/lang/reflect/Field;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
const/4 v0, 0x0
|
|
|
|
|
|
|
|
new-array v0, v0, [Ljava/lang/reflect/Field;
|
|
|
|
|
|
|
|
invoke-interface {p0, v0}, Ljava/util/List;->toArray([Ljava/lang/Object;)[Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
check-cast v0, [Ljava/lang/reflect/Field;
|
|
|
|
|
|
|
|
new-instance v1, Lcom/esotericsoftware/kryo/util/UnsafeUtil$1;
|
|
|
|
|
|
|
|
invoke-direct {v1}, Lcom/esotericsoftware/kryo/util/UnsafeUtil$1;-><init>()V
|
|
|
|
|
|
|
|
invoke-static {v0, v1}, Ljava/util/Arrays;->sort([Ljava/lang/Object;Ljava/util/Comparator;)V
|
|
|
|
|
|
|
|
invoke-interface {p0}, Ljava/util/List;->iterator()Ljava/util/Iterator;
|
|
|
|
|
|
|
|
move-result-object p0
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
:goto_0
|
|
|
|
invoke-interface {p0}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
|
|
|
|
move-result v1
|
|
|
|
|
|
|
|
if-eqz v1, :cond_1
|
|
|
|
|
|
|
|
invoke-interface {p0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
check-cast v1, Ljava/lang/reflect/Field;
|
|
|
|
|
2020-07-22 00:04:40 +00:00
|
|
|
sget-boolean v2, Lf/g/a/a;->d:Z
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
if-eqz v2, :cond_0
|
|
|
|
|
|
|
|
const-string v2, "Field \'"
|
|
|
|
|
2020-07-14 22:43:59 +00:00
|
|
|
invoke-static {v2}, Lf/e/b/a/a;->D(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result-object v2
|
|
|
|
|
|
|
|
invoke-virtual {v1}, Ljava/lang/reflect/Field;->getName()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v3
|
|
|
|
|
|
|
|
invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
const-string v3, "\' at offset "
|
|
|
|
|
|
|
|
invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
invoke-static {}, Lcom/esotericsoftware/kryo/util/UnsafeUtil;->unsafe()Lsun/misc/Unsafe;
|
|
|
|
|
|
|
|
move-result-object v3
|
|
|
|
|
|
|
|
invoke-virtual {v3, v1}, Lsun/misc/Unsafe;->objectFieldOffset(Ljava/lang/reflect/Field;)J
|
|
|
|
|
|
|
|
move-result-wide v3
|
|
|
|
|
|
|
|
invoke-virtual {v2, v3, v4}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
const-string v2, "kryo"
|
|
|
|
|
2020-07-22 00:04:40 +00:00
|
|
|
invoke-static {v2, v1}, Lf/g/a/a;->c(Ljava/lang/String;Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
return-object v0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public static final unsafe()Lsun/misc/Unsafe;
|
|
|
|
.locals 1
|
|
|
|
|
|
|
|
sget-object v0, Lcom/esotericsoftware/kryo/util/UnsafeUtil;->_unsafe:Lsun/misc/Unsafe;
|
|
|
|
|
|
|
|
return-object v0
|
|
|
|
.end method
|