public final class org.apache.lucene.util.NumericUtils
minor version: 0
major version: 59
flags: flags: (0x0031) ACC_PUBLIC, ACC_FINAL, ACC_SUPER
this_class: org.apache.lucene.util.NumericUtils
super_class: java.lang.Object
{
static final boolean $assertionsDisabled;
descriptor: Z
flags: (0x1018) ACC_STATIC, ACC_FINAL, ACC_SYNTHETIC
static void <clinit>();
descriptor: ()V
flags: (0x0008) ACC_STATIC
Code:
stack=1, locals=0, args_size=0
0: .line 36
ldc Lorg/apache/lucene/util/NumericUtils;
invokevirtual java.lang.Class.desiredAssertionStatus:()Z
ifne 1
iconst_1
goto 2
StackMap locals:
StackMap stack:
1: iconst_0
StackMap locals:
StackMap stack: int
2: putstatic org.apache.lucene.util.NumericUtils.$assertionsDisabled:Z
return
LocalVariableTable:
Start End Slot Name Signature
private void <init>();
descriptor: ()V
flags: (0x0002) ACC_PRIVATE
Code:
stack=1, locals=1, args_size=1
start local 0 // org.apache.lucene.util.NumericUtils this
0: .line 38
aload 0 /* this */
invokespecial java.lang.Object.<init>:()V
return
end local 0 // org.apache.lucene.util.NumericUtils this
LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/apache/lucene/util/NumericUtils;
public static long doubleToSortableLong(double);
descriptor: (D)J
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=2, locals=2, args_size=1
start local 0 // double value
0: .line 50
dload 0 /* value */
invokestatic java.lang.Double.doubleToLongBits:(D)J
invokestatic org.apache.lucene.util.NumericUtils.sortableDoubleBits:(J)J
lreturn
end local 0 // double value
LocalVariableTable:
Start End Slot Name Signature
0 1 0 value D
MethodParameters:
Name Flags
value
public static double sortableLongToDouble(long);
descriptor: (J)D
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=2, locals=2, args_size=1
start local 0 // long encoded
0: .line 58
lload 0 /* encoded */
invokestatic org.apache.lucene.util.NumericUtils.sortableDoubleBits:(J)J
invokestatic java.lang.Double.longBitsToDouble:(J)D
dreturn
end local 0 // long encoded
LocalVariableTable:
Start End Slot Name Signature
0 1 0 encoded J
MethodParameters:
Name Flags
encoded
public static int floatToSortableInt(float);
descriptor: (F)I
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=1, locals=1, args_size=1
start local 0 // float value
0: .line 71
fload 0 /* value */
invokestatic java.lang.Float.floatToIntBits:(F)I
invokestatic org.apache.lucene.util.NumericUtils.sortableFloatBits:(I)I
ireturn
end local 0 // float value
LocalVariableTable:
Start End Slot Name Signature
0 1 0 value F
MethodParameters:
Name Flags
value
public static float sortableIntToFloat(int);
descriptor: (I)F
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=1, locals=1, args_size=1
start local 0 // int encoded
0: .line 79
iload 0 /* encoded */
invokestatic org.apache.lucene.util.NumericUtils.sortableFloatBits:(I)I
invokestatic java.lang.Float.intBitsToFloat:(I)F
freturn
end local 0 // int encoded
LocalVariableTable:
Start End Slot Name Signature
0 1 0 encoded I
MethodParameters:
Name Flags
encoded
public static long sortableDoubleBits(long);
descriptor: (J)J
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=6, locals=2, args_size=1
start local 0 // long bits
0: .line 84
lload 0 /* bits */
lload 0 /* bits */
bipush 63
lshr
ldc 9223372036854775807
land
lxor
lreturn
end local 0 // long bits
LocalVariableTable:
Start End Slot Name Signature
0 1 0 bits J
MethodParameters:
Name Flags
bits
public static int sortableFloatBits(int);
descriptor: (I)I
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=3, locals=1, args_size=1
start local 0 // int bits
0: .line 89
iload 0 /* bits */
iload 0 /* bits */
bipush 31
ishr
ldc 2147483647
iand
ixor
ireturn
end local 0 // int bits
LocalVariableTable:
Start End Slot Name Signature
0 1 0 bits I
MethodParameters:
Name Flags
bits
public static void subtract(int, int, byte[], byte[], byte[]);
descriptor: (II[B[B[B)V
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=3, locals=10, args_size=5
start local 0 // int bytesPerDim
start local 1 // int dim
start local 2 // byte[] a
start local 3 // byte[] b
start local 4 // byte[] result
0: .line 95
iload 1 /* dim */
iload 0 /* bytesPerDim */
imul
istore 5 /* start */
start local 5 // int start
1: .line 96
iload 5 /* start */
iload 0 /* bytesPerDim */
iadd
istore 6 /* end */
start local 6 // int end
2: .line 97
iconst_0
istore 7 /* borrow */
start local 7 // int borrow
3: .line 98
iload 6 /* end */
iconst_1
isub
istore 8 /* i */
start local 8 // int i
4: goto 13
5: .line 99
StackMap locals: int int byte[] byte[] byte[] int int int int
StackMap stack:
aload 2 /* a */
iload 8 /* i */
baload
sipush 255
iand
aload 3 /* b */
iload 8 /* i */
baload
sipush 255
iand
isub
iload 7 /* borrow */
isub
istore 9 /* diff */
start local 9 // int diff
6: .line 100
iload 9 /* diff */
ifge 10
7: .line 101
iinc 9 /* diff */ 256
8: .line 102
iconst_1
istore 7 /* borrow */
9: .line 103
goto 11
10: .line 104
StackMap locals: int
StackMap stack:
iconst_0
istore 7 /* borrow */
11: .line 106
StackMap locals:
StackMap stack:
aload 4 /* result */
iload 8 /* i */
iload 5 /* start */
isub
iload 9 /* diff */
i2b
bastore
end local 9 // int diff
12: .line 98
iinc 8 /* i */ -1
StackMap locals:
StackMap stack:
13: iload 8 /* i */
iload 5 /* start */
if_icmpge 5
end local 8 // int i
14: .line 108
iload 7 /* borrow */
ifeq 16
15: .line 109
new java.lang.IllegalArgumentException
dup
ldc "a < b"
invokespecial java.lang.IllegalArgumentException.<init>:(Ljava/lang/String;)V
athrow
16: .line 111
StackMap locals:
StackMap stack:
return
end local 7 // int borrow
end local 6 // int end
end local 5 // int start
end local 4 // byte[] result
end local 3 // byte[] b
end local 2 // byte[] a
end local 1 // int dim
end local 0 // int bytesPerDim
LocalVariableTable:
Start End Slot Name Signature
0 17 0 bytesPerDim I
0 17 1 dim I
0 17 2 a [B
0 17 3 b [B
0 17 4 result [B
1 17 5 start I
2 17 6 end I
3 17 7 borrow I
4 14 8 i I
6 12 9 diff I
MethodParameters:
Name Flags
bytesPerDim
dim
a
b
result
public static void add(int, int, byte[], byte[], byte[]);
descriptor: (II[B[B[B)V
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=5, locals=10, args_size=5
start local 0 // int bytesPerDim
start local 1 // int dim
start local 2 // byte[] a
start local 3 // byte[] b
start local 4 // byte[] result
0: .line 115
iload 1 /* dim */
iload 0 /* bytesPerDim */
imul
istore 5 /* start */
start local 5 // int start
1: .line 116
iload 5 /* start */
iload 0 /* bytesPerDim */
iadd
istore 6 /* end */
start local 6 // int end
2: .line 117
iconst_0
istore 7 /* carry */
start local 7 // int carry
3: .line 118
iload 6 /* end */
iconst_1
isub
istore 8 /* i */
start local 8 // int i
4: goto 13
5: .line 119
StackMap locals: int int byte[] byte[] byte[] int int int int
StackMap stack:
aload 2 /* a */
iload 8 /* i */
baload
sipush 255
iand
aload 3 /* b */
iload 8 /* i */
baload
sipush 255
iand
iadd
iload 7 /* carry */
iadd
istore 9 /* digitSum */
start local 9 // int digitSum
6: .line 120
iload 9 /* digitSum */
sipush 255
if_icmple 10
7: .line 121
iinc 9 /* digitSum */ -256
8: .line 122
iconst_1
istore 7 /* carry */
9: .line 123
goto 11
10: .line 124
StackMap locals: int
StackMap stack:
iconst_0
istore 7 /* carry */
11: .line 126
StackMap locals:
StackMap stack:
aload 4 /* result */
iload 8 /* i */
iload 5 /* start */
isub
iload 9 /* digitSum */
i2b
bastore
end local 9 // int digitSum
12: .line 118
iinc 8 /* i */ -1
StackMap locals:
StackMap stack:
13: iload 8 /* i */
iload 5 /* start */
if_icmpge 5
end local 8 // int i
14: .line 128
iload 7 /* carry */
ifeq 16
15: .line 129
new java.lang.IllegalArgumentException
dup
new java.lang.StringBuilder
dup
ldc "a + b overflows bytesPerDim="
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
iload 0 /* bytesPerDim */
invokevirtual java.lang.StringBuilder.append:(I)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokespecial java.lang.IllegalArgumentException.<init>:(Ljava/lang/String;)V
athrow
16: .line 131
StackMap locals:
StackMap stack:
return
end local 7 // int carry
end local 6 // int end
end local 5 // int start
end local 4 // byte[] result
end local 3 // byte[] b
end local 2 // byte[] a
end local 1 // int dim
end local 0 // int bytesPerDim
LocalVariableTable:
Start End Slot Name Signature
0 17 0 bytesPerDim I
0 17 1 dim I
0 17 2 a [B
0 17 3 b [B
0 17 4 result [B
1 17 5 start I
2 17 6 end I
3 17 7 carry I
4 14 8 i I
6 12 9 digitSum I
MethodParameters:
Name Flags
bytesPerDim
dim
a
b
result
public static void intToSortableBytes(int, byte[], int);
descriptor: (I[BI)V
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=4, locals=3, args_size=3
start local 0 // int value
start local 1 // byte[] result
start local 2 // int offset
0: .line 140
iload 0 /* value */
ldc -2147483648
ixor
istore 0 /* value */
1: .line 141
aload 1 /* result */
iload 2 /* offset */
iload 0 /* value */
bipush 24
ishr
i2b
bastore
2: .line 142
aload 1 /* result */
iload 2 /* offset */
iconst_1
iadd
iload 0 /* value */
bipush 16
ishr
i2b
bastore
3: .line 143
aload 1 /* result */
iload 2 /* offset */
iconst_2
iadd
iload 0 /* value */
bipush 8
ishr
i2b
bastore
4: .line 144
aload 1 /* result */
iload 2 /* offset */
iconst_3
iadd
iload 0 /* value */
i2b
bastore
5: .line 145
return
end local 2 // int offset
end local 1 // byte[] result
end local 0 // int value
LocalVariableTable:
Start End Slot Name Signature
0 6 0 value I
0 6 1 result [B
0 6 2 offset I
MethodParameters:
Name Flags
value
result
offset
public static int sortableBytesToInt(byte[], int);
descriptor: ([BI)I
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=4, locals=3, args_size=2
start local 0 // byte[] encoded
start local 1 // int offset
0: .line 152
aload 0 /* encoded */
iload 1 /* offset */
baload
sipush 255
iand
bipush 24
ishl
1: .line 153
aload 0 /* encoded */
iload 1 /* offset */
iconst_1
iadd
baload
sipush 255
iand
bipush 16
ishl
2: .line 152
ior
3: .line 154
aload 0 /* encoded */
iload 1 /* offset */
iconst_2
iadd
baload
sipush 255
iand
bipush 8
ishl
4: .line 152
ior
5: .line 155
aload 0 /* encoded */
iload 1 /* offset */
iconst_3
iadd
baload
sipush 255
iand
6: .line 152
ior
istore 2 /* x */
start local 2 // int x
7: .line 157
iload 2 /* x */
ldc -2147483648
ixor
ireturn
end local 2 // int x
end local 1 // int offset
end local 0 // byte[] encoded
LocalVariableTable:
Start End Slot Name Signature
0 8 0 encoded [B
0 8 1 offset I
7 8 2 x I
MethodParameters:
Name Flags
encoded
offset
public static void longToSortableBytes(long, byte[], int);
descriptor: (J[BI)V
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=5, locals=4, args_size=3
start local 0 // long value
start local 2 // byte[] result
start local 3 // int offset
0: .line 167
lload 0 /* value */
ldc -9223372036854775808
lxor
lstore 0 /* value */
1: .line 168
aload 2 /* result */
iload 3 /* offset */
lload 0 /* value */
bipush 56
lshr
l2i
i2b
bastore
2: .line 169
aload 2 /* result */
iload 3 /* offset */
iconst_1
iadd
lload 0 /* value */
bipush 48
lshr
l2i
i2b
bastore
3: .line 170
aload 2 /* result */
iload 3 /* offset */
iconst_2
iadd
lload 0 /* value */
bipush 40
lshr
l2i
i2b
bastore
4: .line 171
aload 2 /* result */
iload 3 /* offset */
iconst_3
iadd
lload 0 /* value */
bipush 32
lshr
l2i
i2b
bastore
5: .line 172
aload 2 /* result */
iload 3 /* offset */
iconst_4
iadd
lload 0 /* value */
bipush 24
lshr
l2i
i2b
bastore
6: .line 173
aload 2 /* result */
iload 3 /* offset */
iconst_5
iadd
lload 0 /* value */
bipush 16
lshr
l2i
i2b
bastore
7: .line 174
aload 2 /* result */
iload 3 /* offset */
bipush 6
iadd
lload 0 /* value */
bipush 8
lshr
l2i
i2b
bastore
8: .line 175
aload 2 /* result */
iload 3 /* offset */
bipush 7
iadd
lload 0 /* value */
l2i
i2b
bastore
9: .line 176
return
end local 3 // int offset
end local 2 // byte[] result
end local 0 // long value
LocalVariableTable:
Start End Slot Name Signature
0 10 0 value J
0 10 2 result [B
0 10 3 offset I
MethodParameters:
Name Flags
value
result
offset
public static long sortableBytesToLong(byte[], int);
descriptor: ([BI)J
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=6, locals=4, args_size=2
start local 0 // byte[] encoded
start local 1 // int offset
0: .line 183
aload 0 /* encoded */
iload 1 /* offset */
baload
i2l
ldc 255
land
bipush 56
lshl
1: .line 184
aload 0 /* encoded */
iload 1 /* offset */
iconst_1
iadd
baload
i2l
ldc 255
land
bipush 48
lshl
2: .line 183
lor
3: .line 185
aload 0 /* encoded */
iload 1 /* offset */
iconst_2
iadd
baload
i2l
ldc 255
land
bipush 40
lshl
4: .line 183
lor
5: .line 186
aload 0 /* encoded */
iload 1 /* offset */
iconst_3
iadd
baload
i2l
ldc 255
land
bipush 32
lshl
6: .line 183
lor
7: .line 187
aload 0 /* encoded */
iload 1 /* offset */
iconst_4
iadd
baload
i2l
ldc 255
land
bipush 24
lshl
8: .line 183
lor
9: .line 188
aload 0 /* encoded */
iload 1 /* offset */
iconst_5
iadd
baload
i2l
ldc 255
land
bipush 16
lshl
10: .line 183
lor
11: .line 189
aload 0 /* encoded */
iload 1 /* offset */
bipush 6
iadd
baload
i2l
ldc 255
land
bipush 8
lshl
12: .line 183
lor
13: .line 190
aload 0 /* encoded */
iload 1 /* offset */
bipush 7
iadd
baload
i2l
ldc 255
land
14: .line 183
lor
lstore 2 /* v */
start local 2 // long v
15: .line 192
lload 2 /* v */
ldc -9223372036854775808
lxor
lstore 2 /* v */
16: .line 193
lload 2 /* v */
lreturn
end local 2 // long v
end local 1 // int offset
end local 0 // byte[] encoded
LocalVariableTable:
Start End Slot Name Signature
0 17 0 encoded [B
0 17 1 offset I
15 17 2 v J
MethodParameters:
Name Flags
encoded
offset
public static void bigIntToSortableBytes(java.math.BigInteger, int, byte[], int);
descriptor: (Ljava/math/BigInteger;I[BI)V
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=6, locals=6, args_size=4
start local 0 // java.math.BigInteger bigInt
start local 1 // int bigIntSize
start local 2 // byte[] result
start local 3 // int offset
0: .line 203
aload 0 /* bigInt */
invokevirtual java.math.BigInteger.toByteArray:()[B
astore 4 /* bigIntBytes */
start local 4 // byte[] bigIntBytes
1: .line 206
aload 4 /* bigIntBytes */
arraylength
iload 1 /* bigIntSize */
if_icmpge 7
2: .line 207
iload 1 /* bigIntSize */
newarray 8
astore 5 /* fullBigIntBytes */
start local 5 // byte[] fullBigIntBytes
3: .line 208
aload 4 /* bigIntBytes */
iconst_0
aload 5 /* fullBigIntBytes */
iload 1 /* bigIntSize */
aload 4 /* bigIntBytes */
arraylength
isub
aload 4 /* bigIntBytes */
arraylength
invokestatic java.lang.System.arraycopy:(Ljava/lang/Object;ILjava/lang/Object;II)V
4: .line 209
aload 4 /* bigIntBytes */
iconst_0
baload
sipush 128
iand
ifeq 11
5: .line 211
aload 5 /* fullBigIntBytes */
iconst_0
iload 1 /* bigIntSize */
aload 4 /* bigIntBytes */
arraylength
isub
iconst_m1
invokestatic java.util.Arrays.fill:([BIIB)V
6: .line 213
goto 11
end local 5 // byte[] fullBigIntBytes
StackMap locals: byte[]
StackMap stack:
7: aload 4 /* bigIntBytes */
arraylength
iload 1 /* bigIntSize */
if_icmpne 10
8: .line 214
aload 4 /* bigIntBytes */
astore 5 /* fullBigIntBytes */
start local 5 // byte[] fullBigIntBytes
9: .line 215
goto 11
end local 5 // byte[] fullBigIntBytes
10: .line 216
StackMap locals:
StackMap stack:
new java.lang.IllegalArgumentException
dup
new java.lang.StringBuilder
dup
ldc "BigInteger: "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 0 /* bigInt */
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
ldc " requires more than "
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
iload 1 /* bigIntSize */
invokevirtual java.lang.StringBuilder.append:(I)Ljava/lang/StringBuilder;
ldc " bytes storage"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokespecial java.lang.IllegalArgumentException.<init>:(Ljava/lang/String;)V
athrow
start local 5 // byte[] fullBigIntBytes
11: .line 219
StackMap locals: byte[]
StackMap stack:
aload 5 /* fullBigIntBytes */
iconst_0
dup2
baload
sipush 128
ixor
i2b
bastore
12: .line 221
aload 5 /* fullBigIntBytes */
iconst_0
aload 2 /* result */
iload 3 /* offset */
iload 1 /* bigIntSize */
invokestatic java.lang.System.arraycopy:(Ljava/lang/Object;ILjava/lang/Object;II)V
13: .line 223
getstatic org.apache.lucene.util.NumericUtils.$assertionsDisabled:Z
ifne 14
aload 2 /* result */
iload 3 /* offset */
iload 1 /* bigIntSize */
invokestatic org.apache.lucene.util.NumericUtils.sortableBytesToBigInt:([BII)Ljava/math/BigInteger;
aload 0 /* bigInt */
invokevirtual java.math.BigInteger.equals:(Ljava/lang/Object;)Z
ifne 14
new java.lang.AssertionError
dup
new java.lang.StringBuilder
dup
ldc "bigInt="
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 0 /* bigInt */
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
ldc " converted="
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
aload 2 /* result */
iload 3 /* offset */
iload 1 /* bigIntSize */
invokestatic org.apache.lucene.util.NumericUtils.sortableBytesToBigInt:([BII)Ljava/math/BigInteger;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokespecial java.lang.AssertionError.<init>:(Ljava/lang/Object;)V
athrow
14: .line 224
StackMap locals:
StackMap stack:
return
end local 5 // byte[] fullBigIntBytes
end local 4 // byte[] bigIntBytes
end local 3 // int offset
end local 2 // byte[] result
end local 1 // int bigIntSize
end local 0 // java.math.BigInteger bigInt
LocalVariableTable:
Start End Slot Name Signature
0 15 0 bigInt Ljava/math/BigInteger;
0 15 1 bigIntSize I
0 15 2 result [B
0 15 3 offset I
1 15 4 bigIntBytes [B
3 7 5 fullBigIntBytes [B
9 10 5 fullBigIntBytes [B
11 15 5 fullBigIntBytes [B
MethodParameters:
Name Flags
bigInt
bigIntSize
result
offset
public static java.math.BigInteger sortableBytesToBigInt(byte[], int, int);
descriptor: ([BII)Ljava/math/BigInteger;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=5, locals=4, args_size=3
start local 0 // byte[] encoded
start local 1 // int offset
start local 2 // int length
0: .line 231
iload 2 /* length */
newarray 8
astore 3 /* bigIntBytes */
start local 3 // byte[] bigIntBytes
1: .line 232
aload 0 /* encoded */
iload 1 /* offset */
aload 3 /* bigIntBytes */
iconst_0
iload 2 /* length */
invokestatic java.lang.System.arraycopy:(Ljava/lang/Object;ILjava/lang/Object;II)V
2: .line 234
aload 3 /* bigIntBytes */
iconst_0
dup2
baload
sipush 128
ixor
i2b
bastore
3: .line 235
new java.math.BigInteger
dup
aload 3 /* bigIntBytes */
invokespecial java.math.BigInteger.<init>:([B)V
areturn
end local 3 // byte[] bigIntBytes
end local 2 // int length
end local 1 // int offset
end local 0 // byte[] encoded
LocalVariableTable:
Start End Slot Name Signature
0 4 0 encoded [B
0 4 1 offset I
0 4 2 length I
1 4 3 bigIntBytes [B
MethodParameters:
Name Flags
encoded
offset
length
}
SourceFile: "NumericUtils.java"