public class org.jruby.RubyRandom extends org.jruby.RubyObject
minor version: 0
major version: 59
flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: org.jruby.RubyRandom
super_class: org.jruby.RubyObject
{
private static final int DEFAULT_SEED_CNT;
descriptor: I
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
ConstantValue: 4
private static org.jruby.runtime.ObjectAllocator RANDOM_ALLOCATOR;
descriptor: Lorg/jruby/runtime/ObjectAllocator;
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
private org.jruby.RubyRandom$RandomType random;
descriptor: Lorg/jruby/RubyRandom$RandomType;
flags: (0x0002) ACC_PRIVATE
static void <clinit>();
descriptor: ()V
flags: (0x0008) ACC_STATIC
Code:
stack=2, locals=0, args_size=0
0: new org.jruby.RubyRandom$1
dup
invokespecial org.jruby.RubyRandom$1.<init>:()V
putstatic org.jruby.RubyRandom.RANDOM_ALLOCATOR:Lorg/jruby/runtime/ObjectAllocator;
1: return
LocalVariableTable:
Start End Slot Name Signature
static int getIntBigIntegerBuffer(byte[], int);
descriptor: ([BI)I
flags: (0x0008) ACC_STATIC
Code:
stack=3, locals=4, args_size=2
start local 0 start local 1 0: iconst_0
istore 2
start local 2 1: aload 0
arraylength
iload 1
iconst_4
imul
isub
iconst_1
isub
istore 3
start local 3 2: iload 3
iflt 10
3: iload 2
aload 0
iload 3
iinc 3 -1
baload
sipush 255
iand
ior
istore 2
4: iload 3
iflt 10
5: iload 2
aload 0
iload 3
iinc 3 -1
baload
sipush 255
iand
bipush 8
ishl
ior
istore 2
6: iload 3
iflt 10
7: iload 2
aload 0
iload 3
iinc 3 -1
baload
sipush 255
iand
bipush 16
ishl
ior
istore 2
8: iload 3
iflt 10
9: iload 2
aload 0
iload 3
iinc 3 -1
baload
sipush 255
iand
bipush 24
ishl
ior
istore 2
10: StackMap locals: int int
StackMap stack:
iload 2
ireturn
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 11 0 src [B
0 11 1 loc I
1 11 2 v I
2 11 3 idx I
MethodParameters:
Name Flags
src
loc
static void setIntBigIntegerBuffer(byte[], int, int);
descriptor: ([BII)V
flags: (0x0008) ACC_STATIC
Code:
stack=4, locals=4, args_size=3
start local 0 start local 1 start local 2 0: aload 0
arraylength
iload 1
iconst_4
imul
isub
iconst_1
isub
istore 3
start local 3 1: iload 3
iflt 9
2: aload 0
iload 3
iinc 3 -1
iload 2
sipush 255
iand
i2b
bastore
3: iload 3
iflt 9
4: aload 0
iload 3
iinc 3 -1
iload 2
bipush 8
ishr
sipush 255
iand
i2b
bastore
5: iload 3
iflt 9
6: aload 0
iload 3
iinc 3 -1
iload 2
bipush 16
ishr
sipush 255
iand
i2b
bastore
7: iload 3
iflt 9
8: aload 0
iload 3
iinc 3 -1
iload 2
bipush 24
ishr
sipush 255
iand
i2b
bastore
9: StackMap locals: int
StackMap stack:
return
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 10 0 dest [B
0 10 1 loc I
0 10 2 value I
1 10 3 idx I
MethodParameters:
Name Flags
dest
loc
value
public static java.math.BigInteger randomSeedBigInteger(java.util.Random);
descriptor: (Ljava/util/Random;)Ljava/math/BigInteger;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=3, locals=2, args_size=1
start local 0 0: bipush 16
newarray 8
astore 1
start local 1 1: aload 0
aload 1
invokevirtual java.util.Random.nextBytes:([B)V
2: new java.math.BigInteger
dup
aload 1
invokespecial java.math.BigInteger.<init>:([B)V
invokevirtual java.math.BigInteger.abs:()Ljava/math/BigInteger;
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 random Ljava/util/Random;
1 3 1 seed [B
MethodParameters:
Name Flags
random
public static org.jruby.RubyBignum randomSeed(org.jruby.Ruby);
descriptor: (Lorg/jruby/Ruby;)Lorg/jruby/RubyBignum;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
aload 0
getfield org.jruby.Ruby.random:Ljava/util/Random;
invokestatic org.jruby.RubyRandom.randomSeedBigInteger:(Ljava/util/Random;)Ljava/math/BigInteger;
invokestatic org.jruby.RubyBignum.newBignum:(Lorg/jruby/Ruby;Ljava/math/BigInteger;)Lorg/jruby/RubyBignum;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 runtime Lorg/jruby/Ruby;
MethodParameters:
Name Flags
runtime
public static org.jruby.RubyClass createRandomClass(org.jruby.Ruby);
descriptor: (Lorg/jruby/Ruby;)Lorg/jruby/RubyClass;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=4, locals=3, args_size=1
start local 0 0: aload 0
1: ldc "Random"
aload 0
invokevirtual org.jruby.Ruby.getObject:()Lorg/jruby/RubyClass;
getstatic org.jruby.RubyRandom.RANDOM_ALLOCATOR:Lorg/jruby/runtime/ObjectAllocator;
invokevirtual org.jruby.Ruby.defineClass:(Ljava/lang/String;Lorg/jruby/RubyClass;Lorg/jruby/runtime/ObjectAllocator;)Lorg/jruby/RubyClass;
2: astore 1
start local 1 3: aload 1
ldc Lorg/jruby/RubyRandom;
invokevirtual org.jruby.RubyClass.defineAnnotatedMethods:(Ljava/lang/Class;)V
4: new org.jruby.RubyRandom
dup
aload 0
aload 1
invokespecial org.jruby.RubyRandom.<init>:(Lorg/jruby/Ruby;Lorg/jruby/RubyClass;)V
astore 2
start local 2 5: aload 2
new org.jruby.RubyRandom$RandomType
dup
aload 0
invokestatic org.jruby.RubyRandom.randomSeed:(Lorg/jruby/Ruby;)Lorg/jruby/RubyBignum;
invokespecial org.jruby.RubyRandom$RandomType.<init>:(Lorg/jruby/runtime/builtin/IRubyObject;)V
putfield org.jruby.RubyRandom.random:Lorg/jruby/RubyRandom$RandomType;
6: aload 1
ldc "DEFAULT"
aload 2
invokevirtual org.jruby.RubyClass.setConstant:(Ljava/lang/String;Lorg/jruby/runtime/builtin/IRubyObject;)Lorg/jruby/runtime/builtin/IRubyObject;
pop
7: aload 0
aload 2
getfield org.jruby.RubyRandom.random:Lorg/jruby/RubyRandom$RandomType;
invokevirtual org.jruby.Ruby.setDefaultRand:(Lorg/jruby/RubyRandom$RandomType;)V
8: aload 0
aload 1
invokevirtual org.jruby.Ruby.setRandomClass:(Lorg/jruby/RubyClass;)V
9: aload 1
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 10 0 runtime Lorg/jruby/Ruby;
3 10 1 randomClass Lorg/jruby/RubyClass;
5 10 2 defaultRand Lorg/jruby/RubyRandom;
MethodParameters:
Name Flags
runtime
void <init>(org.jruby.Ruby, org.jruby.RubyClass);
descriptor: (Lorg/jruby/Ruby;Lorg/jruby/RubyClass;)V
flags: (0x0000)
Code:
stack=3, locals=3, args_size=3
start local 0 start local 1 start local 2 0: aload 0
aload 1
aload 2
invokespecial org.jruby.RubyObject.<init>:(Lorg/jruby/Ruby;Lorg/jruby/RubyClass;)V
1: aload 0
aconst_null
putfield org.jruby.RubyRandom.random:Lorg/jruby/RubyRandom$RandomType;
2: return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lorg/jruby/RubyRandom;
0 3 1 runtime Lorg/jruby/Ruby;
0 3 2 rubyClass Lorg/jruby/RubyClass;
MethodParameters:
Name Flags
runtime
rubyClass
public org.jruby.runtime.builtin.IRubyObject initialize(org.jruby.runtime.ThreadContext, org.jruby.runtime.builtin.IRubyObject[]);
descriptor: (Lorg/jruby/runtime/ThreadContext;[Lorg/jruby/runtime/builtin/IRubyObject;)Lorg/jruby/runtime/builtin/IRubyObject;
flags: (0x0001) ACC_PUBLIC
Code:
stack=5, locals=3, args_size=3
start local 0 start local 1 start local 2 0: aload 0
1: new org.jruby.RubyRandom$RandomType
dup
aload 2
arraylength
ifne 2
aload 1
getfield org.jruby.runtime.ThreadContext.runtime:Lorg/jruby/Ruby;
invokestatic org.jruby.RubyRandom.randomSeed:(Lorg/jruby/Ruby;)Lorg/jruby/RubyBignum;
goto 3
StackMap locals: org.jruby.RubyRandom org.jruby.runtime.ThreadContext org.jruby.runtime.builtin.IRubyObject[]
StackMap stack: org.jruby.RubyRandom new 1 new 1
2: aload 2
iconst_0
aaload
StackMap locals: org.jruby.RubyRandom org.jruby.runtime.ThreadContext org.jruby.runtime.builtin.IRubyObject[]
StackMap stack: org.jruby.RubyRandom new 1 new 1 org.jruby.runtime.builtin.IRubyObject
3: invokespecial org.jruby.RubyRandom$RandomType.<init>:(Lorg/jruby/runtime/builtin/IRubyObject;)V
putfield org.jruby.RubyRandom.random:Lorg/jruby/RubyRandom$RandomType;
4: aload 0
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 this Lorg/jruby/RubyRandom;
0 5 1 context Lorg/jruby/runtime/ThreadContext;
0 5 2 args [Lorg/jruby/runtime/builtin/IRubyObject;
RuntimeVisibleAnnotations:
org.jruby.anno.JRubyMethod(visibility = org.jruby.runtime.Visibility.PRIVATE:Lorg/jruby/runtime/Visibility;, optional = 1)
MethodParameters:
Name Flags
context
args
public org.jruby.runtime.builtin.IRubyObject seed(org.jruby.runtime.ThreadContext);
descriptor: (Lorg/jruby/runtime/ThreadContext;)Lorg/jruby/runtime/builtin/IRubyObject;
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=2, args_size=2
start local 0 start local 1 0: aload 0
getfield org.jruby.RubyRandom.random:Lorg/jruby/RubyRandom$RandomType;
invokevirtual org.jruby.RubyRandom$RandomType.getSeed:()Lorg/jruby/RubyInteger;
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/jruby/RubyRandom;
0 1 1 context Lorg/jruby/runtime/ThreadContext;
RuntimeVisibleAnnotations:
org.jruby.anno.JRubyMethod()
MethodParameters:
Name Flags
context
public org.jruby.runtime.builtin.IRubyObject initialize_copy(org.jruby.runtime.builtin.IRubyObject);
descriptor: (Lorg/jruby/runtime/builtin/IRubyObject;)Lorg/jruby/runtime/builtin/IRubyObject;
flags: (0x0001) ACC_PUBLIC
Code:
stack=6, locals=2, args_size=2
start local 0 start local 1 0: aload 1
instanceof org.jruby.RubyRandom
ifne 4
1: aload 0
invokevirtual org.jruby.RubyRandom.getRuntime:()Lorg/jruby/Ruby;
2: ldc "wrong argument type %s (expected %s)"
iconst_2
anewarray java.lang.Object
dup
iconst_0
aload 1
invokeinterface org.jruby.runtime.builtin.IRubyObject.getMetaClass:()Lorg/jruby/RubyClass;
invokevirtual org.jruby.RubyClass.getName:()Ljava/lang/String;
aastore
dup
iconst_1
aload 0
invokevirtual org.jruby.RubyRandom.getMetaClass:()Lorg/jruby/RubyClass;
invokevirtual org.jruby.RubyClass.getName:()Ljava/lang/String;
aastore
3: invokestatic java.lang.String.format:(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
invokevirtual org.jruby.Ruby.newTypeError:(Ljava/lang/String;)Lorg/jruby/exceptions/RaiseException;
athrow
4: StackMap locals:
StackMap stack:
aload 0
invokevirtual org.jruby.RubyRandom.checkFrozen:()V
5: aload 0
new org.jruby.RubyRandom$RandomType
dup
aload 1
checkcast org.jruby.RubyRandom
getfield org.jruby.RubyRandom.random:Lorg/jruby/RubyRandom$RandomType;
invokespecial org.jruby.RubyRandom$RandomType.<init>:(Lorg/jruby/RubyRandom$RandomType;)V
putfield org.jruby.RubyRandom.random:Lorg/jruby/RubyRandom$RandomType;
6: aload 0
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 7 0 this Lorg/jruby/RubyRandom;
0 7 1 orig Lorg/jruby/runtime/builtin/IRubyObject;
RuntimeVisibleAnnotations:
org.jruby.anno.JRubyMethod(name = {"initialize_copy"}, required = 1, visibility = org.jruby.runtime.Visibility.PRIVATE:Lorg/jruby/runtime/Visibility;)
MethodParameters:
Name Flags
orig
public static org.jruby.runtime.builtin.IRubyObject rand(org.jruby.runtime.ThreadContext, org.jruby.runtime.builtin.IRubyObject, org.jruby.runtime.builtin.IRubyObject[]);
descriptor: (Lorg/jruby/runtime/ThreadContext;Lorg/jruby/runtime/builtin/IRubyObject;[Lorg/jruby/runtime/builtin/IRubyObject;)Lorg/jruby/runtime/builtin/IRubyObject;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=3, locals=4, args_size=3
start local 0 start local 1 start local 2 0: aload 0
invokestatic org.jruby.RubyRandom.getDefaultRand:(Lorg/jruby/runtime/ThreadContext;)Lorg/jruby/RubyRandom$RandomType;
astore 3
start local 3 1: aload 2
arraylength
ifne 2
aload 0
aload 3
invokestatic org.jruby.RubyRandom.randFloat:(Lorg/jruby/runtime/ThreadContext;Lorg/jruby/RubyRandom$RandomType;)Lorg/jruby/RubyFloat;
areturn
2: StackMap locals: org.jruby.RubyRandom$RandomType
StackMap stack:
aload 0
aload 2
iconst_0
aaload
aload 3
invokestatic org.jruby.RubyRandom.randomRand:(Lorg/jruby/runtime/ThreadContext;Lorg/jruby/runtime/builtin/IRubyObject;Lorg/jruby/RubyRandom$RandomType;)Lorg/jruby/runtime/builtin/IRubyObject;
areturn
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 context Lorg/jruby/runtime/ThreadContext;
0 3 1 recv Lorg/jruby/runtime/builtin/IRubyObject;
0 3 2 args [Lorg/jruby/runtime/builtin/IRubyObject;
1 3 3 random Lorg/jruby/RubyRandom$RandomType;
RuntimeVisibleAnnotations:
org.jruby.anno.JRubyMethod(name = {"rand"}, meta = true, optional = 1)
MethodParameters:
Name Flags
context
recv
args
public static org.jruby.runtime.builtin.IRubyObject randCommon19(org.jruby.runtime.ThreadContext, org.jruby.runtime.builtin.IRubyObject, org.jruby.runtime.builtin.IRubyObject[]);
descriptor: (Lorg/jruby/runtime/ThreadContext;Lorg/jruby/runtime/builtin/IRubyObject;[Lorg/jruby/runtime/builtin/IRubyObject;)Lorg/jruby/runtime/builtin/IRubyObject;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=2, locals=3, args_size=3
start local 0 start local 1 start local 2 0: aload 0
aload 2
invokestatic org.jruby.RubyRandom.randKernel:(Lorg/jruby/runtime/ThreadContext;[Lorg/jruby/runtime/builtin/IRubyObject;)Lorg/jruby/runtime/builtin/IRubyObject;
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 context Lorg/jruby/runtime/ThreadContext;
0 1 1 recv Lorg/jruby/runtime/builtin/IRubyObject;
0 1 2 args [Lorg/jruby/runtime/builtin/IRubyObject;
RuntimeVisibleAnnotations:
java.lang.Deprecated()
MethodParameters:
Name Flags
context
recv
args
static org.jruby.runtime.builtin.IRubyObject randKernel(org.jruby.runtime.ThreadContext, org.jruby.runtime.builtin.IRubyObject[]);
descriptor: (Lorg/jruby/runtime/ThreadContext;[Lorg/jruby/runtime/builtin/IRubyObject;)Lorg/jruby/runtime/builtin/IRubyObject;
flags: (0x0008) ACC_STATIC
Code:
stack=4, locals=6, args_size=2
start local 0 start local 1 0: aload 0
invokestatic org.jruby.RubyRandom.getDefaultRand:(Lorg/jruby/runtime/ThreadContext;)Lorg/jruby/RubyRandom$RandomType;
astore 2
start local 2 1: aload 1
arraylength
ifne 3
2: aload 0
aload 2
invokestatic org.jruby.RubyRandom.randFloat:(Lorg/jruby/runtime/ThreadContext;Lorg/jruby/RubyRandom$RandomType;)Lorg/jruby/RubyFloat;
areturn
3: StackMap locals: org.jruby.RubyRandom$RandomType
StackMap stack:
aload 1
iconst_0
aaload
astore 3
start local 3 4: aload 3
aload 0
getfield org.jruby.runtime.ThreadContext.nil:Lorg/jruby/runtime/builtin/IRubyObject;
if_acmpne 6
5: aload 0
aload 2
invokestatic org.jruby.RubyRandom.randFloat:(Lorg/jruby/runtime/ThreadContext;Lorg/jruby/RubyRandom$RandomType;)Lorg/jruby/RubyFloat;
areturn
6: StackMap locals: org.jruby.runtime.builtin.IRubyObject
StackMap stack:
aload 3
instanceof org.jruby.RubyRange
ifeq 8
7: aload 0
aload 3
aload 2
invokestatic org.jruby.RubyRandom.randomRand:(Lorg/jruby/runtime/ThreadContext;Lorg/jruby/runtime/builtin/IRubyObject;Lorg/jruby/RubyRandom$RandomType;)Lorg/jruby/runtime/builtin/IRubyObject;
areturn
8: StackMap locals:
StackMap stack:
aload 3
invokeinterface org.jruby.runtime.builtin.IRubyObject.convertToInteger:()Lorg/jruby/RubyInteger;
astore 4
start local 4 9: aload 4
invokevirtual org.jruby.RubyInteger.isZero:()Z
ifeq 11
10: aload 0
aload 2
invokestatic org.jruby.RubyRandom.randFloat:(Lorg/jruby/runtime/ThreadContext;Lorg/jruby/RubyRandom$RandomType;)Lorg/jruby/RubyFloat;
areturn
11: StackMap locals: org.jruby.RubyInteger
StackMap stack:
aload 0
aload 2
aload 4
iconst_0
invokestatic org.jruby.RubyRandom.randInt:(Lorg/jruby/runtime/ThreadContext;Lorg/jruby/RubyRandom$RandomType;Lorg/jruby/RubyInteger;Z)Lorg/jruby/runtime/builtin/IRubyObject;
astore 5
start local 5 12: aload 5
aload 0
getfield org.jruby.runtime.ThreadContext.nil:Lorg/jruby/runtime/builtin/IRubyObject;
if_acmpne 13
aload 0
aload 2
invokestatic org.jruby.RubyRandom.randFloat:(Lorg/jruby/runtime/ThreadContext;Lorg/jruby/RubyRandom$RandomType;)Lorg/jruby/RubyFloat;
goto 14
StackMap locals: org.jruby.runtime.builtin.IRubyObject
StackMap stack:
13: aload 5
StackMap locals:
StackMap stack: org.jruby.runtime.builtin.IRubyObject
14: areturn
end local 5 end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 15 0 context Lorg/jruby/runtime/ThreadContext;
0 15 1 args [Lorg/jruby/runtime/builtin/IRubyObject;
1 15 2 random Lorg/jruby/RubyRandom$RandomType;
4 15 3 arg Lorg/jruby/runtime/builtin/IRubyObject;
9 15 4 max Lorg/jruby/RubyInteger;
12 15 5 r Lorg/jruby/runtime/builtin/IRubyObject;
MethodParameters:
Name Flags
context
args
public org.jruby.runtime.builtin.IRubyObject randObj(org.jruby.runtime.ThreadContext, org.jruby.runtime.builtin.IRubyObject[]);
descriptor: (Lorg/jruby/runtime/ThreadContext;[Lorg/jruby/runtime/builtin/IRubyObject;)Lorg/jruby/runtime/builtin/IRubyObject;
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=3, args_size=3
start local 0 start local 1 start local 2 0: aload 2
arraylength
ifne 1
aload 0
aload 1
invokevirtual org.jruby.RubyRandom.rand:(Lorg/jruby/runtime/ThreadContext;)Lorg/jruby/runtime/builtin/IRubyObject;
goto 2
StackMap locals:
StackMap stack:
1: aload 0
aload 1
aload 2
iconst_0
aaload
invokevirtual org.jruby.RubyRandom.rand:(Lorg/jruby/runtime/ThreadContext;Lorg/jruby/runtime/builtin/IRubyObject;)Lorg/jruby/runtime/builtin/IRubyObject;
StackMap locals:
StackMap stack: org.jruby.runtime.builtin.IRubyObject
2: areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lorg/jruby/RubyRandom;
0 3 1 context Lorg/jruby/runtime/ThreadContext;
0 3 2 args [Lorg/jruby/runtime/builtin/IRubyObject;
RuntimeVisibleAnnotations:
java.lang.Deprecated()
MethodParameters:
Name Flags
context
args
public org.jruby.runtime.builtin.IRubyObject rand(org.jruby.runtime.ThreadContext);
descriptor: (Lorg/jruby/runtime/ThreadContext;)Lorg/jruby/runtime/builtin/IRubyObject;
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: aload 1
aload 0
getfield org.jruby.RubyRandom.random:Lorg/jruby/RubyRandom$RandomType;
invokestatic org.jruby.RubyRandom.randFloat:(Lorg/jruby/runtime/ThreadContext;Lorg/jruby/RubyRandom$RandomType;)Lorg/jruby/RubyFloat;
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/jruby/RubyRandom;
0 1 1 context Lorg/jruby/runtime/ThreadContext;
RuntimeVisibleAnnotations:
org.jruby.anno.JRubyMethod(name = {"rand"})
MethodParameters:
Name Flags
context
public org.jruby.runtime.builtin.IRubyObject rand(org.jruby.runtime.ThreadContext, org.jruby.runtime.builtin.IRubyObject);
descriptor: (Lorg/jruby/runtime/ThreadContext;Lorg/jruby/runtime/builtin/IRubyObject;)Lorg/jruby/runtime/builtin/IRubyObject;
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=3, args_size=3
start local 0 start local 1 start local 2 0: aload 1
aload 2
aload 0
getfield org.jruby.RubyRandom.random:Lorg/jruby/RubyRandom$RandomType;
invokestatic org.jruby.RubyRandom.randomRand:(Lorg/jruby/runtime/ThreadContext;Lorg/jruby/runtime/builtin/IRubyObject;Lorg/jruby/RubyRandom$RandomType;)Lorg/jruby/runtime/builtin/IRubyObject;
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/jruby/RubyRandom;
0 1 1 context Lorg/jruby/runtime/ThreadContext;
0 1 2 arg Lorg/jruby/runtime/builtin/IRubyObject;
RuntimeVisibleAnnotations:
org.jruby.anno.JRubyMethod(name = {"rand"})
MethodParameters:
Name Flags
context
arg
private static org.jruby.runtime.builtin.IRubyObject randInt(org.jruby.runtime.ThreadContext, org.jruby.RubyRandom$RandomType, org.jruby.RubyInteger, boolean);
descriptor: (Lorg/jruby/runtime/ThreadContext;Lorg/jruby/RubyRandom$RandomType;Lorg/jruby/RubyInteger;Z)Lorg/jruby/runtime/builtin/IRubyObject;
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=6, locals=6, args_size=4
start local 0 start local 1 start local 2 start local 3 0: aload 2
instanceof org.jruby.RubyFixnum
ifeq 7
1: aload 2
invokestatic org.jruby.RubyNumeric.fix2long:(Lorg/jruby/runtime/builtin/IRubyObject;)J
lstore 4
start local 4 2: lload 4
lconst_0
lcmp
ifne 3
aload 0
getfield org.jruby.runtime.ThreadContext.nil:Lorg/jruby/runtime/builtin/IRubyObject;
areturn
3: StackMap locals: long
StackMap stack:
lload 4
lconst_0
lcmp
ifge 6
4: iload 3
ifeq 5
aload 0
getfield org.jruby.runtime.ThreadContext.nil:Lorg/jruby/runtime/builtin/IRubyObject;
areturn
5: StackMap locals:
StackMap stack:
lload 4
lneg
lstore 4
6: StackMap locals:
StackMap stack:
aload 0
aload 1
lload 4
lconst_1
lsub
invokestatic org.jruby.RubyRandom.randLimitedFixnum:(Lorg/jruby/runtime/ThreadContext;Lorg/jruby/RubyRandom$RandomType;J)Lorg/jruby/RubyInteger;
areturn
end local 4 7: StackMap locals:
StackMap stack:
aload 2
invokevirtual org.jruby.RubyInteger.getBigIntegerValue:()Ljava/math/BigInteger;
astore 4
start local 4 8: aload 4
getstatic java.math.BigInteger.ZERO:Ljava/math/BigInteger;
invokevirtual java.math.BigInteger.equals:(Ljava/lang/Object;)Z
ifeq 10
9: aload 0
getfield org.jruby.runtime.ThreadContext.nil:Lorg/jruby/runtime/builtin/IRubyObject;
areturn
10: StackMap locals: java.math.BigInteger
StackMap stack:
aload 4
invokevirtual java.math.BigInteger.signum:()I
ifge 13
11: iload 3
ifeq 12
aload 0
getfield org.jruby.runtime.ThreadContext.nil:Lorg/jruby/runtime/builtin/IRubyObject;
areturn
12: StackMap locals:
StackMap stack:
aload 4
invokevirtual java.math.BigInteger.abs:()Ljava/math/BigInteger;
astore 4
13: StackMap locals:
StackMap stack:
aload 4
getstatic java.math.BigInteger.ONE:Ljava/math/BigInteger;
invokevirtual java.math.BigInteger.subtract:(Ljava/math/BigInteger;)Ljava/math/BigInteger;
astore 4
14: aload 0
aload 1
aload 4
invokestatic org.jruby.RubyRandom.randLimitedBignum:(Lorg/jruby/runtime/ThreadContext;Lorg/jruby/RubyRandom$RandomType;Ljava/math/BigInteger;)Lorg/jruby/RubyInteger;
areturn
end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 15 0 context Lorg/jruby/runtime/ThreadContext;
0 15 1 random Lorg/jruby/RubyRandom$RandomType;
0 15 2 vmax Lorg/jruby/RubyInteger;
0 15 3 restrictive Z
2 7 4 max J
8 15 4 big Ljava/math/BigInteger;
MethodParameters:
Name Flags
context
random
vmax
restrictive
public static org.jruby.RubyFloat randFloat(org.jruby.runtime.ThreadContext);
descriptor: (Lorg/jruby/runtime/ThreadContext;)Lorg/jruby/RubyFloat;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
aload 0
invokestatic org.jruby.RubyRandom.getDefaultRand:(Lorg/jruby/runtime/ThreadContext;)Lorg/jruby/RubyRandom$RandomType;
invokestatic org.jruby.RubyRandom.randFloat:(Lorg/jruby/runtime/ThreadContext;Lorg/jruby/RubyRandom$RandomType;)Lorg/jruby/RubyFloat;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 context Lorg/jruby/runtime/ThreadContext;
MethodParameters:
Name Flags
context
public static org.jruby.RubyFloat randFloat(org.jruby.runtime.ThreadContext, org.jruby.RubyRandom$RandomType);
descriptor: (Lorg/jruby/runtime/ThreadContext;Lorg/jruby/RubyRandom$RandomType;)Lorg/jruby/RubyFloat;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=3, locals=2, args_size=2
start local 0 start local 1 0: aload 0
getfield org.jruby.runtime.ThreadContext.runtime:Lorg/jruby/Ruby;
aload 1
invokevirtual org.jruby.RubyRandom$RandomType.genrandReal:()D
invokevirtual org.jruby.Ruby.newFloat:(D)Lorg/jruby/RubyFloat;
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 context Lorg/jruby/runtime/ThreadContext;
0 1 1 random Lorg/jruby/RubyRandom$RandomType;
MethodParameters:
Name Flags
context
random
public static org.jruby.RubyInteger randLimited(org.jruby.runtime.ThreadContext, long);
descriptor: (Lorg/jruby/runtime/ThreadContext;J)Lorg/jruby/RubyInteger;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=4, locals=3, args_size=2
start local 0 start local 1 0: aload 0
aload 0
invokestatic org.jruby.RubyRandom.getDefaultRand:(Lorg/jruby/runtime/ThreadContext;)Lorg/jruby/RubyRandom$RandomType;
lload 1
invokestatic org.jruby.RubyRandom.randLimitedFixnum:(Lorg/jruby/runtime/ThreadContext;Lorg/jruby/RubyRandom$RandomType;J)Lorg/jruby/RubyInteger;
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 context Lorg/jruby/runtime/ThreadContext;
0 1 1 limit J
MethodParameters:
Name Flags
context
limit
private static org.jruby.RubyInteger randLimitedFixnum(org.jruby.runtime.ThreadContext, org.jruby.RubyRandom$RandomType, long);
descriptor: (Lorg/jruby/runtime/ThreadContext;Lorg/jruby/RubyRandom$RandomType;J)Lorg/jruby/RubyInteger;
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=4, locals=4, args_size=3
start local 0 start local 1 start local 2 0: aload 0
getfield org.jruby.runtime.ThreadContext.runtime:Lorg/jruby/Ruby;
aload 1
getfield org.jruby.RubyRandom$RandomType.impl:Lorg/jruby/util/Random;
lload 2
invokestatic org.jruby.RubyRandom.randLimitedFixnumInner:(Lorg/jruby/util/Random;J)J
invokestatic org.jruby.RubyFixnum.newFixnum:(Lorg/jruby/Ruby;J)Lorg/jruby/RubyFixnum;
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 context Lorg/jruby/runtime/ThreadContext;
0 1 1 random Lorg/jruby/RubyRandom$RandomType;
0 1 2 limit J
MethodParameters:
Name Flags
context
random
limit
public static long randLimitedFixnumInner(org.jruby.util.Random, long);
descriptor: (Lorg/jruby/util/Random;J)J
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=6, locals=8, args_size=2
start local 0 start local 1 0: lload 1
lconst_0
lcmp
ifne 3
1: lconst_0
lstore 3
start local 3 2: goto 14
end local 3 3: StackMap locals:
StackMap stack:
lload 1
invokestatic org.jruby.RubyRandom.makeMask:(J)J
lstore 5
start local 5 4: StackMap locals: org.jruby.util.Random long top top long
StackMap stack:
lconst_0
lstore 3
start local 3 5: iconst_1
istore 7
start local 7 6: goto 13
7: StackMap locals: org.jruby.util.Random long long long int
StackMap stack:
lload 5
iload 7
bipush 32
imul
lushr
ldc 4294967295
land
lconst_0
lcmp
ifeq 10
8: lload 3
aload 0
invokevirtual org.jruby.util.Random.genrandInt32:()I
i2l
ldc 4294967295
land
iload 7
bipush 32
imul
lshl
lor
lstore 3
9: lload 3
lload 5
land
lstore 3
10: StackMap locals:
StackMap stack:
lload 1
lload 3
lcmp
ifge 12
11: goto 4
12: StackMap locals:
StackMap stack:
iinc 7 -1
StackMap locals:
StackMap stack:
13: iload 7
ifge 7
end local 7 end local 5 14: StackMap locals:
StackMap stack:
lload 3
lreturn
end local 3 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 15 0 random Lorg/jruby/util/Random;
0 15 1 limit J
2 3 3 val J
5 15 3 val J
4 14 5 mask J
6 14 7 i I
MethodParameters:
Name Flags
random
limit
public static org.jruby.RubyInteger randLimited(org.jruby.runtime.ThreadContext, java.math.BigInteger);
descriptor: (Lorg/jruby/runtime/ThreadContext;Ljava/math/BigInteger;)Lorg/jruby/RubyInteger;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=3, locals=2, args_size=2
start local 0 start local 1 0: aload 0
aload 0
invokestatic org.jruby.RubyRandom.getDefaultRand:(Lorg/jruby/runtime/ThreadContext;)Lorg/jruby/RubyRandom$RandomType;
aload 1
invokestatic org.jruby.RubyRandom.randLimitedBignum:(Lorg/jruby/runtime/ThreadContext;Lorg/jruby/RubyRandom$RandomType;Ljava/math/BigInteger;)Lorg/jruby/RubyInteger;
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 context Lorg/jruby/runtime/ThreadContext;
0 1 1 limit Ljava/math/BigInteger;
MethodParameters:
Name Flags
context
limit
private static org.jruby.RubyInteger randLimitedBignum(org.jruby.runtime.ThreadContext, org.jruby.RubyRandom$RandomType, java.math.BigInteger);
descriptor: (Lorg/jruby/runtime/ThreadContext;Lorg/jruby/RubyRandom$RandomType;Ljava/math/BigInteger;)Lorg/jruby/RubyInteger;
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=4, locals=14, args_size=3
start local 0 start local 1 start local 2 0: aload 2
invokevirtual java.math.BigInteger.toByteArray:()[B
astore 3
start local 3 1: aload 3
arraylength
newarray 8
astore 4
start local 4 2: aload 3
arraylength
iconst_3
iadd
iconst_4
idiv
istore 5
start local 5 3: StackMap locals: byte[] byte[] int
StackMap stack:
lconst_0
lstore 6
start local 6 4: iconst_1
istore 8
start local 8 5: iload 5
iconst_1
isub
istore 9
start local 9 6: goto 22
7: StackMap locals: long int int
StackMap stack:
aload 3
iload 9
invokestatic org.jruby.RubyRandom.getIntBigIntegerBuffer:([BI)I
i2l
ldc 4294967295
land
lstore 10
start local 10 8: lload 6
lconst_0
lcmp
ifeq 9
ldc 4294967295
goto 10
StackMap locals: long
StackMap stack:
9: lload 10
invokestatic org.jruby.RubyRandom.makeMask:(J)J
StackMap locals:
StackMap stack: long
10: lstore 6
11: lload 6
lconst_0
lcmp
ifeq 19
12: aload 1
invokevirtual org.jruby.RubyRandom$RandomType.genrandInt32:()I
i2l
ldc 4294967295
land
lload 6
land
lstore 12
start local 12 13: iload 8
ifeq 20
14: lload 10
lload 12
lcmp
ifge 16
15: goto 3
16: StackMap locals: long
StackMap stack:
lload 12
lload 10
lcmp
ifge 20
17: iconst_0
istore 8
18: goto 20
end local 12 19: StackMap locals:
StackMap stack:
lconst_0
lstore 12
start local 12 20: StackMap locals: long
StackMap stack:
aload 4
iload 9
lload 12
l2i
invokestatic org.jruby.RubyRandom.setIntBigIntegerBuffer:([BII)V
end local 12 end local 10 21: iinc 9 -1
StackMap locals:
StackMap stack:
22: iload 9
ifge 7
end local 9 end local 8 end local 6 23: aload 0
24: getfield org.jruby.runtime.ThreadContext.runtime:Lorg/jruby/Ruby;
new java.math.BigInteger
dup
aload 4
invokespecial java.math.BigInteger.<init>:([B)V
invokestatic org.jruby.RubyBignum.newBignum:(Lorg/jruby/Ruby;Ljava/math/BigInteger;)Lorg/jruby/RubyBignum;
areturn
end local 5 end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 25 0 context Lorg/jruby/runtime/ThreadContext;
0 25 1 random Lorg/jruby/RubyRandom$RandomType;
0 25 2 limit Ljava/math/BigInteger;
1 25 3 buf [B
2 25 4 bytes [B
3 25 5 len I
4 23 6 mask J
5 23 8 boundary Z
6 23 9 idx I
8 21 10 lim J
13 19 12 rnd J
20 21 12 rnd J
MethodParameters:
Name Flags
context
random
limit
private static long makeMask(long);
descriptor: (J)J
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=5, locals=2, args_size=1
start local 0 0: lload 0
lload 0
iconst_1
lushr
lor
lstore 0
1: lload 0
lload 0
iconst_2
lushr
lor
lstore 0
2: lload 0
lload 0
iconst_4
lushr
lor
lstore 0
3: lload 0
lload 0
bipush 8
lushr
lor
lstore 0
4: lload 0
lload 0
bipush 16
lushr
lor
lstore 0
5: lload 0
lload 0
bipush 32
lushr
lor
lstore 0
6: lload 0
lreturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 7 0 x J
MethodParameters:
Name Flags
x
private static org.jruby.RubyRandom$RandomType getDefaultRand(org.jruby.runtime.ThreadContext);
descriptor: (Lorg/jruby/runtime/ThreadContext;)Lorg/jruby/RubyRandom$RandomType;
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield org.jruby.runtime.ThreadContext.runtime:Lorg/jruby/Ruby;
getfield org.jruby.Ruby.defaultRand:Lorg/jruby/RubyRandom$RandomType;
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 context Lorg/jruby/runtime/ThreadContext;
MethodParameters:
Name Flags
context
private static org.jruby.runtime.builtin.IRubyObject randomRand(org.jruby.runtime.ThreadContext, org.jruby.runtime.builtin.IRubyObject, org.jruby.RubyRandom$RandomType);
descriptor: (Lorg/jruby/runtime/ThreadContext;Lorg/jruby/runtime/builtin/IRubyObject;Lorg/jruby/RubyRandom$RandomType;)Lorg/jruby/runtime/builtin/IRubyObject;
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=5, locals=15, args_size=3
start local 0 start local 1 start local 2 0: aconst_null
astore 4
start local 4 1: aload 0
getfield org.jruby.runtime.ThreadContext.nil:Lorg/jruby/runtime/builtin/IRubyObject;
astore 5
start local 5 2: aload 1
aload 5
if_acmpne 5
3: aload 5
astore 3
start local 3 4: goto 65
end local 3 StackMap locals: org.jruby.runtime.ThreadContext org.jruby.runtime.builtin.IRubyObject org.jruby.RubyRandom$RandomType top org.jruby.RubyRandom$RangeLike org.jruby.runtime.builtin.IRubyObject
StackMap stack:
5: aload 0
aload 1
invokestatic org.jruby.RubyRandom.checkMaxInt:(Lorg/jruby/runtime/ThreadContext;Lorg/jruby/runtime/builtin/IRubyObject;)Lorg/jruby/runtime/builtin/IRubyObject;
dup
astore 3
start local 3 6: ifnull 9
7: aload 0
aload 2
aload 3
checkcast org.jruby.RubyInteger
iconst_1
invokestatic org.jruby.RubyRandom.randInt:(Lorg/jruby/runtime/ThreadContext;Lorg/jruby/RubyRandom$RandomType;Lorg/jruby/RubyInteger;Z)Lorg/jruby/runtime/builtin/IRubyObject;
astore 3
8: goto 65
StackMap locals: org.jruby.runtime.ThreadContext org.jruby.runtime.builtin.IRubyObject org.jruby.RubyRandom$RandomType org.jruby.runtime.builtin.IRubyObject org.jruby.RubyRandom$RangeLike org.jruby.runtime.builtin.IRubyObject
StackMap stack:
9: aload 0
getfield org.jruby.runtime.ThreadContext.runtime:Lorg/jruby/Ruby;
aload 1
invokestatic org.jruby.util.TypeConverter.checkFloatType:(Lorg/jruby/Ruby;Lorg/jruby/runtime/builtin/IRubyObject;)Lorg/jruby/runtime/builtin/IRubyObject;
dup
astore 3
aload 5
if_acmpeq 16
10: aload 3
checkcast org.jruby.RubyFloat
getfield org.jruby.RubyFloat.value:D
dstore 6
start local 6 11: dload 6
dconst_0
dcmpl
ifle 14
12: aload 0
getfield org.jruby.runtime.ThreadContext.runtime:Lorg/jruby/Ruby;
dload 6
aload 2
invokevirtual org.jruby.RubyRandom$RandomType.genrandReal:()D
dmul
invokevirtual org.jruby.Ruby.newFloat:(D)Lorg/jruby/RubyFloat;
astore 3
13: goto 65
14: StackMap locals: double
StackMap stack:
aload 5
astore 3
end local 6 15: goto 65
StackMap locals:
StackMap stack:
16: aload 0
aload 1
invokestatic org.jruby.RubyRandom.rangeValues:(Lorg/jruby/runtime/ThreadContext;Lorg/jruby/runtime/builtin/IRubyObject;)Lorg/jruby/RubyRandom$RangeLike;
dup
astore 4
ifnull 63
17: aload 0
aload 4
getfield org.jruby.RubyRandom$RangeLike.range:Lorg/jruby/runtime/builtin/IRubyObject;
invokestatic org.jruby.RubyRandom.checkMaxInt:(Lorg/jruby/runtime/ThreadContext;Lorg/jruby/runtime/builtin/IRubyObject;)Lorg/jruby/runtime/builtin/IRubyObject;
dup
astore 3
ifnull 38
18: aload 3
instanceof org.jruby.RubyFixnum
ifeq 27
19: aload 3
checkcast org.jruby.RubyFixnum
getfield org.jruby.RubyFixnum.value:J
lstore 6
start local 6 20: aload 4
getfield org.jruby.RubyRandom$RangeLike.excl:Z
ifeq 22
21: lload 6
lconst_1
lsub
lstore 6
22: StackMap locals: long
StackMap stack:
lload 6
lconst_0
lcmp
iflt 25
23: aload 0
aload 2
lload 6
invokestatic org.jruby.RubyRandom.randLimitedFixnum:(Lorg/jruby/runtime/ThreadContext;Lorg/jruby/RubyRandom$RandomType;J)Lorg/jruby/RubyInteger;
astore 3
24: goto 65
25: StackMap locals:
StackMap stack:
aload 5
astore 3
end local 6 26: goto 65
StackMap locals:
StackMap stack:
27: aload 3
instanceof org.jruby.RubyBignum
ifeq 36
28: aload 3
checkcast org.jruby.RubyBignum
getfield org.jruby.RubyBignum.value:Ljava/math/BigInteger;
astore 6
start local 6 29: aload 6
invokevirtual java.math.BigInteger.signum:()I
ifle 34
30: aload 4
getfield org.jruby.RubyRandom$RangeLike.excl:Z
ifeq 32
31: aload 6
getstatic java.math.BigInteger.ONE:Ljava/math/BigInteger;
invokevirtual java.math.BigInteger.subtract:(Ljava/math/BigInteger;)Ljava/math/BigInteger;
astore 6
32: StackMap locals: java.math.BigInteger
StackMap stack:
aload 0
aload 2
aload 6
invokestatic org.jruby.RubyRandom.randLimitedBignum:(Lorg/jruby/runtime/ThreadContext;Lorg/jruby/RubyRandom$RandomType;Ljava/math/BigInteger;)Lorg/jruby/RubyInteger;
astore 3
33: goto 65
34: StackMap locals:
StackMap stack:
aload 5
astore 3
end local 6 35: goto 65
36: StackMap locals:
StackMap stack:
aload 5
astore 3
37: goto 65
StackMap locals:
StackMap stack:
38: aload 0
getfield org.jruby.runtime.ThreadContext.runtime:Lorg/jruby/Ruby;
aload 4
getfield org.jruby.RubyRandom$RangeLike.range:Lorg/jruby/runtime/builtin/IRubyObject;
invokestatic org.jruby.util.TypeConverter.checkFloatType:(Lorg/jruby/Ruby;Lorg/jruby/runtime/builtin/IRubyObject;)Lorg/jruby/runtime/builtin/IRubyObject;
dup
astore 3
aload 5
if_acmpeq 65
39: iconst_1
istore 6
start local 6 40: aload 3
checkcast org.jruby.RubyFloat
getfield org.jruby.RubyFloat.value:D
dstore 7
start local 7 41: ldc 0.5
dstore 9
start local 9 42: dload 7
invokestatic java.lang.Double.isInfinite:(D)Z
ifeq 49
43: aload 0
aload 0
getfield org.jruby.runtime.ThreadContext.runtime:Lorg/jruby/Ruby;
aload 4
getfield org.jruby.RubyRandom$RangeLike.begin:Lorg/jruby/runtime/builtin/IRubyObject;
invokestatic org.jruby.util.TypeConverter.toFloat:(Lorg/jruby/Ruby;Lorg/jruby/runtime/builtin/IRubyObject;)Lorg/jruby/RubyFloat;
invokestatic org.jruby.RubyRandom.floatValue:(Lorg/jruby/runtime/ThreadContext;Lorg/jruby/RubyFloat;)D
ldc 2.0
ddiv
dstore 13
start local 13 44: aload 0
aload 0
getfield org.jruby.runtime.ThreadContext.runtime:Lorg/jruby/Ruby;
aload 4
getfield org.jruby.RubyRandom$RangeLike.end:Lorg/jruby/runtime/builtin/IRubyObject;
invokestatic org.jruby.util.TypeConverter.toFloat:(Lorg/jruby/Ruby;Lorg/jruby/runtime/builtin/IRubyObject;)Lorg/jruby/RubyFloat;
invokestatic org.jruby.RubyRandom.floatValue:(Lorg/jruby/runtime/ThreadContext;Lorg/jruby/RubyFloat;)D
ldc 2.0
ddiv
dstore 7
45: iconst_2
istore 6
46: dload 7
dload 13
dadd
dstore 9
47: dload 7
dload 13
dsub
dstore 7
end local 13 48: goto 50
49: StackMap locals: int double double
StackMap stack:
aload 0
dload 7
invokestatic org.jruby.RubyRandom.checkFloatValue:(Lorg/jruby/runtime/ThreadContext;D)V
50: StackMap locals:
StackMap stack:
aload 0
getfield org.jruby.runtime.ThreadContext.nil:Lorg/jruby/runtime/builtin/IRubyObject;
astore 3
51: dload 7
dconst_0
dcmpl
ifle 60
52: aload 4
getfield org.jruby.RubyRandom$RangeLike.excl:Z
ifeq 55
53: aload 2
invokevirtual org.jruby.RubyRandom$RandomType.genrandReal:()D
dstore 11
start local 11 54: goto 56
end local 11 55: StackMap locals:
StackMap stack:
aload 2
invokevirtual org.jruby.RubyRandom$RandomType.genrandReal2:()D
dstore 11
start local 11 56: StackMap locals: double
StackMap stack:
iload 6
iconst_1
if_icmple 58
57: aload 0
getfield org.jruby.runtime.ThreadContext.runtime:Lorg/jruby/Ruby;
dload 11
ldc 0.5
dsub
dload 7
dmul
iload 6
i2d
dmul
dload 9
dadd
invokevirtual org.jruby.Ruby.newFloat:(D)Lorg/jruby/RubyFloat;
areturn
58: StackMap locals:
StackMap stack:
aload 0
getfield org.jruby.runtime.ThreadContext.runtime:Lorg/jruby/Ruby;
dload 11
dload 7
dmul
invokevirtual org.jruby.Ruby.newFloat:(D)Lorg/jruby/RubyFloat;
astore 3
59: goto 65
end local 11 StackMap locals:
StackMap stack:
60: dload 7
dconst_0
dcmpl
ifne 65
aload 4
getfield org.jruby.RubyRandom$RangeLike.excl:Z
ifne 65
61: aload 0
getfield org.jruby.runtime.ThreadContext.runtime:Lorg/jruby/Ruby;
dconst_0
invokevirtual org.jruby.Ruby.newFloat:(D)Lorg/jruby/RubyFloat;
astore 3
end local 9 end local 7 end local 6 62: goto 65
63: StackMap locals:
StackMap stack:
aload 5
astore 3
64: aload 1
invokestatic org.jruby.RubyNumeric.num2long:(Lorg/jruby/runtime/builtin/IRubyObject;)J
pop2
65: StackMap locals:
StackMap stack:
aload 3
aload 5
if_acmpne 67
66: aload 0
getfield org.jruby.runtime.ThreadContext.runtime:Lorg/jruby/Ruby;
new java.lang.StringBuilder
dup
ldc "invalid argument - "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 1
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokevirtual org.jruby.Ruby.newArgumentError:(Ljava/lang/String;)Lorg/jruby/exceptions/RaiseException;
athrow
67: StackMap locals:
StackMap stack:
aload 4
ifnonnull 68
aload 3
areturn
68: StackMap locals:
StackMap stack:
aload 4
getfield org.jruby.RubyRandom$RangeLike.begin:Lorg/jruby/runtime/builtin/IRubyObject;
instanceof org.jruby.RubyFixnum
ifeq 71
aload 3
instanceof org.jruby.RubyFixnum
ifeq 71
69: aload 4
getfield org.jruby.RubyRandom$RangeLike.begin:Lorg/jruby/runtime/builtin/IRubyObject;
checkcast org.jruby.RubyFixnum
invokevirtual org.jruby.RubyFixnum.getLongValue:()J
aload 3
checkcast org.jruby.RubyFixnum
invokevirtual org.jruby.RubyFixnum.getLongValue:()J
ladd
lstore 6
start local 6 70: aload 0
getfield org.jruby.runtime.ThreadContext.runtime:Lorg/jruby/Ruby;
lload 6
invokevirtual org.jruby.Ruby.newFixnum:(J)Lorg/jruby/RubyFixnum;
areturn
end local 6 71: StackMap locals:
StackMap stack:
aload 3
instanceof org.jruby.RubyBignum
ifeq 73
72: aload 3
checkcast org.jruby.RubyBignum
aload 0
aload 4
getfield org.jruby.RubyRandom$RangeLike.begin:Lorg/jruby/runtime/builtin/IRubyObject;
invokevirtual org.jruby.RubyBignum.op_plus:(Lorg/jruby/runtime/ThreadContext;Lorg/jruby/runtime/builtin/IRubyObject;)Lorg/jruby/runtime/builtin/IRubyObject;
areturn
73: StackMap locals:
StackMap stack:
aload 3
instanceof org.jruby.RubyFloat
ifeq 76
74: aload 0
getfield org.jruby.runtime.ThreadContext.runtime:Lorg/jruby/Ruby;
aload 4
getfield org.jruby.RubyRandom$RangeLike.begin:Lorg/jruby/runtime/builtin/IRubyObject;
invokestatic org.jruby.util.TypeConverter.checkFloatType:(Lorg/jruby/Ruby;Lorg/jruby/runtime/builtin/IRubyObject;)Lorg/jruby/runtime/builtin/IRubyObject;
astore 6
start local 6 75: aload 6
aload 5
if_acmpeq 76
aload 3
checkcast org.jruby.RubyFloat
aload 0
aload 6
invokevirtual org.jruby.RubyFloat.op_plus:(Lorg/jruby/runtime/ThreadContext;Lorg/jruby/runtime/builtin/IRubyObject;)Lorg/jruby/runtime/builtin/IRubyObject;
areturn
end local 6 76: StackMap locals:
StackMap stack:
aload 0
aload 4
getfield org.jruby.RubyRandom$RangeLike.begin:Lorg/jruby/runtime/builtin/IRubyObject;
ldc "+"
aload 3
invokestatic org.jruby.runtime.Helpers.invoke:(Lorg/jruby/runtime/ThreadContext;Lorg/jruby/runtime/builtin/IRubyObject;Ljava/lang/String;Lorg/jruby/runtime/builtin/IRubyObject;)Lorg/jruby/runtime/builtin/IRubyObject;
areturn
end local 5 end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 77 0 context Lorg/jruby/runtime/ThreadContext;
0 77 1 vmax Lorg/jruby/runtime/builtin/IRubyObject;
0 77 2 random Lorg/jruby/RubyRandom$RandomType;
4 5 3 v Lorg/jruby/runtime/builtin/IRubyObject;
6 77 3 v Lorg/jruby/runtime/builtin/IRubyObject;
1 77 4 range Lorg/jruby/RubyRandom$RangeLike;
2 77 5 nil Lorg/jruby/runtime/builtin/IRubyObject;
11 15 6 max D
20 26 6 max J
29 35 6 big Ljava/math/BigInteger;
40 62 6 scale I
41 62 7 max D
42 62 9 mid D
54 55 11 r D
56 60 11 r D
44 48 13 min D
70 71 6 x J
75 76 6 f Lorg/jruby/runtime/builtin/IRubyObject;
MethodParameters:
Name Flags
context
vmax
random
private static double floatValue(org.jruby.runtime.ThreadContext, org.jruby.RubyFloat);
descriptor: (Lorg/jruby/runtime/ThreadContext;Lorg/jruby/RubyFloat;)D
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=3, locals=4, args_size=2
start local 0 start local 1 0: aload 1
getfield org.jruby.RubyFloat.value:D
dstore 2
start local 2 1: aload 0
dload 2
invokestatic org.jruby.RubyRandom.checkFloatValue:(Lorg/jruby/runtime/ThreadContext;D)V
2: dload 2
dreturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 context Lorg/jruby/runtime/ThreadContext;
0 3 1 v Lorg/jruby/RubyFloat;
1 3 2 x D
MethodParameters:
Name Flags
context
v
private static void checkFloatValue(org.jruby.runtime.ThreadContext, double);
descriptor: (Lorg/jruby/runtime/ThreadContext;D)V
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=2, locals=3, args_size=2
start local 0 start local 1 0: dload 1
invokestatic java.lang.Double.isInfinite:(D)Z
ifne 1
dload 1
invokestatic java.lang.Double.isNaN:(D)Z
ifeq 2
1: StackMap locals:
StackMap stack:
aload 0
getfield org.jruby.runtime.ThreadContext.runtime:Lorg/jruby/Ruby;
ldc "Numerical argument out of domain"
invokevirtual org.jruby.Ruby.newErrnoEDOMError:(Ljava/lang/String;)Lorg/jruby/exceptions/RaiseException;
athrow
2: StackMap locals:
StackMap stack:
return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 context Lorg/jruby/runtime/ThreadContext;
0 3 1 x D
MethodParameters:
Name Flags
context
x
private static org.jruby.runtime.builtin.IRubyObject checkMaxInt(org.jruby.runtime.ThreadContext, org.jruby.runtime.builtin.IRubyObject);
descriptor: (Lorg/jruby/runtime/ThreadContext;Lorg/jruby/runtime/builtin/IRubyObject;)Lorg/jruby/runtime/builtin/IRubyObject;
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=2, locals=3, args_size=2
start local 0 start local 1 0: aload 1
instanceof org.jruby.RubyFloat
ifne 3
1: aload 0
aload 1
invokestatic org.jruby.util.TypeConverter.checkIntegerType:(Lorg/jruby/runtime/ThreadContext;Lorg/jruby/runtime/builtin/IRubyObject;)Lorg/jruby/runtime/builtin/IRubyObject;
astore 2
start local 2 2: aload 2
aload 0
getfield org.jruby.runtime.ThreadContext.nil:Lorg/jruby/runtime/builtin/IRubyObject;
if_acmpeq 3
aload 2
areturn
end local 2 3: StackMap locals:
StackMap stack:
aconst_null
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 context Lorg/jruby/runtime/ThreadContext;
0 4 1 vmax Lorg/jruby/runtime/builtin/IRubyObject;
2 3 2 v Lorg/jruby/runtime/builtin/IRubyObject;
MethodParameters:
Name Flags
context
vmax
private static org.jruby.RubyRandom$RangeLike rangeValues(org.jruby.runtime.ThreadContext, org.jruby.runtime.builtin.IRubyObject);
descriptor: (Lorg/jruby/runtime/ThreadContext;Lorg/jruby/runtime/builtin/IRubyObject;)Lorg/jruby/RubyRandom$RangeLike;
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=5, locals=4, args_size=2
start local 0 start local 1 0: new org.jruby.RubyRandom$RangeLike
dup
invokespecial org.jruby.RubyRandom$RangeLike.<init>:()V
astore 2
start local 2 1: aload 1
instanceof org.jruby.RubyRange
ifeq 7
2: aload 1
checkcast org.jruby.RubyRange
astore 3
start local 3 3: aload 2
aload 3
aload 0
invokevirtual org.jruby.RubyRange.first:(Lorg/jruby/runtime/ThreadContext;)Lorg/jruby/runtime/builtin/IRubyObject;
putfield org.jruby.RubyRandom$RangeLike.begin:Lorg/jruby/runtime/builtin/IRubyObject;
4: aload 2
aload 3
aload 0
invokevirtual org.jruby.RubyRange.last:(Lorg/jruby/runtime/ThreadContext;)Lorg/jruby/runtime/builtin/IRubyObject;
putfield org.jruby.RubyRandom$RangeLike.end:Lorg/jruby/runtime/builtin/IRubyObject;
5: aload 2
aload 3
invokevirtual org.jruby.RubyRange.isExcludeEnd:()Z
putfield org.jruby.RubyRandom$RangeLike.excl:Z
end local 3 6: goto 13
7: StackMap locals: org.jruby.RubyRandom$RangeLike
StackMap stack:
aload 1
ldc "begin"
invokeinterface org.jruby.runtime.builtin.IRubyObject.respondsTo:(Ljava/lang/String;)Z
ifeq 9
aload 1
ldc "end"
invokeinterface org.jruby.runtime.builtin.IRubyObject.respondsTo:(Ljava/lang/String;)Z
ifeq 9
8: aload 1
ldc "exclude_end?"
invokeinterface org.jruby.runtime.builtin.IRubyObject.respondsTo:(Ljava/lang/String;)Z
ifne 10
9: StackMap locals:
StackMap stack:
aconst_null
areturn
10: StackMap locals:
StackMap stack:
aload 2
aload 0
aload 1
ldc "begin"
invokestatic org.jruby.runtime.Helpers.invoke:(Lorg/jruby/runtime/ThreadContext;Lorg/jruby/runtime/builtin/IRubyObject;Ljava/lang/String;)Lorg/jruby/runtime/builtin/IRubyObject;
putfield org.jruby.RubyRandom$RangeLike.begin:Lorg/jruby/runtime/builtin/IRubyObject;
11: aload 2
aload 0
aload 1
ldc "end"
invokestatic org.jruby.runtime.Helpers.invoke:(Lorg/jruby/runtime/ThreadContext;Lorg/jruby/runtime/builtin/IRubyObject;Ljava/lang/String;)Lorg/jruby/runtime/builtin/IRubyObject;
putfield org.jruby.RubyRandom$RangeLike.end:Lorg/jruby/runtime/builtin/IRubyObject;
12: aload 2
aload 0
aload 1
ldc "exclude_end?"
invokestatic org.jruby.runtime.Helpers.invoke:(Lorg/jruby/runtime/ThreadContext;Lorg/jruby/runtime/builtin/IRubyObject;Ljava/lang/String;)Lorg/jruby/runtime/builtin/IRubyObject;
invokeinterface org.jruby.runtime.builtin.IRubyObject.isTrue:()Z
putfield org.jruby.RubyRandom$RangeLike.excl:Z
13: StackMap locals:
StackMap stack:
aload 2
aload 0
aload 2
getfield org.jruby.RubyRandom$RangeLike.end:Lorg/jruby/runtime/builtin/IRubyObject;
ldc "-"
aload 2
getfield org.jruby.RubyRandom$RangeLike.begin:Lorg/jruby/runtime/builtin/IRubyObject;
invokestatic org.jruby.runtime.Helpers.invoke:(Lorg/jruby/runtime/ThreadContext;Lorg/jruby/runtime/builtin/IRubyObject;Ljava/lang/String;Lorg/jruby/runtime/builtin/IRubyObject;)Lorg/jruby/runtime/builtin/IRubyObject;
putfield org.jruby.RubyRandom$RangeLike.range:Lorg/jruby/runtime/builtin/IRubyObject;
14: aload 2
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 15 0 context Lorg/jruby/runtime/ThreadContext;
0 15 1 range Lorg/jruby/runtime/builtin/IRubyObject;
1 15 2 like Lorg/jruby/RubyRandom$RangeLike;
3 6 3 vrange Lorg/jruby/RubyRange;
MethodParameters:
Name Flags
context
range
public static org.jruby.runtime.builtin.IRubyObject srand(org.jruby.runtime.ThreadContext, org.jruby.runtime.builtin.IRubyObject);
descriptor: (Lorg/jruby/runtime/ThreadContext;Lorg/jruby/runtime/builtin/IRubyObject;)Lorg/jruby/runtime/builtin/IRubyObject;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: aload 0
aload 1
invokestatic org.jruby.RubyRandom.srandCommon:(Lorg/jruby/runtime/ThreadContext;Lorg/jruby/runtime/builtin/IRubyObject;)Lorg/jruby/runtime/builtin/IRubyObject;
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 context Lorg/jruby/runtime/ThreadContext;
0 1 1 recv Lorg/jruby/runtime/builtin/IRubyObject;
RuntimeVisibleAnnotations:
org.jruby.anno.JRubyMethod(meta = true)
MethodParameters:
Name Flags
context
recv
public static org.jruby.runtime.builtin.IRubyObject srand(org.jruby.runtime.ThreadContext, org.jruby.runtime.builtin.IRubyObject, org.jruby.runtime.builtin.IRubyObject);
descriptor: (Lorg/jruby/runtime/ThreadContext;Lorg/jruby/runtime/builtin/IRubyObject;Lorg/jruby/runtime/builtin/IRubyObject;)Lorg/jruby/runtime/builtin/IRubyObject;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=3, locals=3, args_size=3
start local 0 start local 1 start local 2 0: aload 0
aload 1
aload 2
invokestatic org.jruby.RubyRandom.srandCommon:(Lorg/jruby/runtime/ThreadContext;Lorg/jruby/runtime/builtin/IRubyObject;Lorg/jruby/runtime/builtin/IRubyObject;)Lorg/jruby/runtime/builtin/IRubyObject;
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 context Lorg/jruby/runtime/ThreadContext;
0 1 1 recv Lorg/jruby/runtime/builtin/IRubyObject;
0 1 2 seed Lorg/jruby/runtime/builtin/IRubyObject;
RuntimeVisibleAnnotations:
org.jruby.anno.JRubyMethod(meta = true)
MethodParameters:
Name Flags
context
recv
seed
public static org.jruby.runtime.builtin.IRubyObject srandCommon(org.jruby.runtime.ThreadContext, org.jruby.runtime.builtin.IRubyObject);
descriptor: (Lorg/jruby/runtime/ThreadContext;Lorg/jruby/runtime/builtin/IRubyObject;)Lorg/jruby/runtime/builtin/IRubyObject;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=3, locals=2, args_size=2
start local 0 start local 1 0: aload 0
aload 1
aload 0
getfield org.jruby.runtime.ThreadContext.runtime:Lorg/jruby/Ruby;
invokestatic org.jruby.RubyRandom.randomSeed:(Lorg/jruby/Ruby;)Lorg/jruby/RubyBignum;
invokestatic org.jruby.RubyRandom.srandCommon:(Lorg/jruby/runtime/ThreadContext;Lorg/jruby/runtime/builtin/IRubyObject;Lorg/jruby/runtime/builtin/IRubyObject;)Lorg/jruby/runtime/builtin/IRubyObject;
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 context Lorg/jruby/runtime/ThreadContext;
0 1 1 recv Lorg/jruby/runtime/builtin/IRubyObject;
MethodParameters:
Name Flags
context
recv
public static org.jruby.runtime.builtin.IRubyObject srandCommon(org.jruby.runtime.ThreadContext, org.jruby.runtime.builtin.IRubyObject, org.jruby.runtime.builtin.IRubyObject);
descriptor: (Lorg/jruby/runtime/ThreadContext;Lorg/jruby/runtime/builtin/IRubyObject;Lorg/jruby/runtime/builtin/IRubyObject;)Lorg/jruby/runtime/builtin/IRubyObject;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=3, locals=5, args_size=3
start local 0 start local 1 start local 2 0: aload 0
invokestatic org.jruby.RubyRandom.getDefaultRand:(Lorg/jruby/runtime/ThreadContext;)Lorg/jruby/RubyRandom$RandomType;
astore 3
start local 3 1: aload 3
invokevirtual org.jruby.RubyRandom$RandomType.getSeed:()Lorg/jruby/RubyInteger;
astore 4
start local 4 2: new org.jruby.RubyRandom$RandomType
dup
aload 2
invokespecial org.jruby.RubyRandom$RandomType.<init>:(Lorg/jruby/runtime/builtin/IRubyObject;)V
astore 3
3: aload 0
getfield org.jruby.runtime.ThreadContext.runtime:Lorg/jruby/Ruby;
aload 3
invokevirtual org.jruby.Ruby.setDefaultRand:(Lorg/jruby/RubyRandom$RandomType;)V
4: aload 0
getfield org.jruby.runtime.ThreadContext.runtime:Lorg/jruby/Ruby;
invokevirtual org.jruby.Ruby.getRandomClass:()Lorg/jruby/RubyClass;
ldc "DEFAULT"
invokevirtual org.jruby.RubyClass.getConstant:(Ljava/lang/String;)Lorg/jruby/runtime/builtin/IRubyObject;
checkcast org.jruby.RubyRandom
aload 3
invokevirtual org.jruby.RubyRandom.setRandomType:(Lorg/jruby/RubyRandom$RandomType;)V
5: aload 4
areturn
end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 context Lorg/jruby/runtime/ThreadContext;
0 6 1 recv Lorg/jruby/runtime/builtin/IRubyObject;
0 6 2 newSeed Lorg/jruby/runtime/builtin/IRubyObject;
1 6 3 defaultRand Lorg/jruby/RubyRandom$RandomType;
2 6 4 previousSeed Lorg/jruby/runtime/builtin/IRubyObject;
MethodParameters:
Name Flags
context
recv
newSeed
public org.jruby.runtime.builtin.IRubyObject op_equal_19(org.jruby.runtime.ThreadContext, org.jruby.runtime.builtin.IRubyObject);
descriptor: (Lorg/jruby/runtime/ThreadContext;Lorg/jruby/runtime/builtin/IRubyObject;)Lorg/jruby/runtime/builtin/IRubyObject;
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=3, args_size=3
start local 0 start local 1 start local 2 0: aload 0
aload 1
aload 2
invokevirtual org.jruby.RubyRandom.op_equal:(Lorg/jruby/runtime/ThreadContext;Lorg/jruby/runtime/builtin/IRubyObject;)Lorg/jruby/runtime/builtin/IRubyObject;
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/jruby/RubyRandom;
0 1 1 context Lorg/jruby/runtime/ThreadContext;
0 1 2 obj Lorg/jruby/runtime/builtin/IRubyObject;
RuntimeVisibleAnnotations:
java.lang.Deprecated()
MethodParameters:
Name Flags
context
obj
public org.jruby.runtime.builtin.IRubyObject op_equal(org.jruby.runtime.ThreadContext, org.jruby.runtime.builtin.IRubyObject);
descriptor: (Lorg/jruby/runtime/ThreadContext;Lorg/jruby/runtime/builtin/IRubyObject;)Lorg/jruby/runtime/builtin/IRubyObject;
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=3, args_size=3
start local 0 start local 1 start local 2 0: aload 0
invokevirtual org.jruby.RubyRandom.getType:()Lorg/jruby/RubyClass;
aload 2
invokeinterface org.jruby.runtime.builtin.IRubyObject.getType:()Lorg/jruby/RubyClass;
invokevirtual org.jruby.RubyClass.equals:(Ljava/lang/Object;)Z
ifne 2
1: aload 1
getfield org.jruby.runtime.ThreadContext.fals:Lorg/jruby/RubyBoolean;
areturn
2: StackMap locals:
StackMap stack:
aload 1
getfield org.jruby.runtime.ThreadContext.runtime:Lorg/jruby/Ruby;
aload 0
getfield org.jruby.RubyRandom.random:Lorg/jruby/RubyRandom$RandomType;
aload 2
checkcast org.jruby.RubyRandom
getfield org.jruby.RubyRandom.random:Lorg/jruby/RubyRandom$RandomType;
invokevirtual org.jruby.RubyRandom$RandomType.equals:(Ljava/lang/Object;)Z
invokevirtual org.jruby.Ruby.newBoolean:(Z)Lorg/jruby/RubyBoolean;
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lorg/jruby/RubyRandom;
0 3 1 context Lorg/jruby/runtime/ThreadContext;
0 3 2 obj Lorg/jruby/runtime/builtin/IRubyObject;
RuntimeVisibleAnnotations:
org.jruby.anno.JRubyMethod(name = {"=="}, required = 1)
MethodParameters:
Name Flags
context
obj
public org.jruby.runtime.builtin.IRubyObject stateObj(org.jruby.runtime.ThreadContext);
descriptor: (Lorg/jruby/runtime/ThreadContext;)Lorg/jruby/runtime/builtin/IRubyObject;
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=2, args_size=2
start local 0 start local 1 0: aload 0
getfield org.jruby.RubyRandom.random:Lorg/jruby/RubyRandom$RandomType;
invokevirtual org.jruby.RubyRandom$RandomType.getState:()Lorg/jruby/RubyBignum;
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/jruby/RubyRandom;
0 1 1 context Lorg/jruby/runtime/ThreadContext;
RuntimeVisibleAnnotations:
org.jruby.anno.JRubyMethod(name = {"state"}, visibility = org.jruby.runtime.Visibility.PRIVATE:Lorg/jruby/runtime/Visibility;)
MethodParameters:
Name Flags
context
public org.jruby.runtime.builtin.IRubyObject leftObj(org.jruby.runtime.ThreadContext);
descriptor: (Lorg/jruby/runtime/ThreadContext;)Lorg/jruby/runtime/builtin/IRubyObject;
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=2, args_size=2
start local 0 start local 1 0: aload 1
getfield org.jruby.runtime.ThreadContext.runtime:Lorg/jruby/Ruby;
aload 0
getfield org.jruby.RubyRandom.random:Lorg/jruby/RubyRandom$RandomType;
invokevirtual org.jruby.RubyRandom$RandomType.getLeft:()I
i2l
invokestatic org.jruby.RubyNumeric.int2fix:(Lorg/jruby/Ruby;J)Lorg/jruby/RubyNumeric;
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/jruby/RubyRandom;
0 1 1 context Lorg/jruby/runtime/ThreadContext;
RuntimeVisibleAnnotations:
org.jruby.anno.JRubyMethod(name = {"left"}, visibility = org.jruby.runtime.Visibility.PRIVATE:Lorg/jruby/runtime/Visibility;)
MethodParameters:
Name Flags
context
public static org.jruby.runtime.builtin.IRubyObject state(org.jruby.runtime.ThreadContext, org.jruby.runtime.builtin.IRubyObject);
descriptor: (Lorg/jruby/runtime/ThreadContext;Lorg/jruby/runtime/builtin/IRubyObject;)Lorg/jruby/runtime/builtin/IRubyObject;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=1, locals=2, args_size=2
start local 0 start local 1 0: aload 0
invokestatic org.jruby.RubyRandom.getDefaultRand:(Lorg/jruby/runtime/ThreadContext;)Lorg/jruby/RubyRandom$RandomType;
invokevirtual org.jruby.RubyRandom$RandomType.getState:()Lorg/jruby/RubyBignum;
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 context Lorg/jruby/runtime/ThreadContext;
0 1 1 recv Lorg/jruby/runtime/builtin/IRubyObject;
RuntimeVisibleAnnotations:
org.jruby.anno.JRubyMethod(name = {"state"}, meta = true, visibility = org.jruby.runtime.Visibility.PRIVATE:Lorg/jruby/runtime/Visibility;)
MethodParameters:
Name Flags
context
recv
public static org.jruby.runtime.builtin.IRubyObject left(org.jruby.runtime.ThreadContext, org.jruby.runtime.builtin.IRubyObject);
descriptor: (Lorg/jruby/runtime/ThreadContext;Lorg/jruby/runtime/builtin/IRubyObject;)Lorg/jruby/runtime/builtin/IRubyObject;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=3, locals=2, args_size=2
start local 0 start local 1 0: aload 0
getfield org.jruby.runtime.ThreadContext.runtime:Lorg/jruby/Ruby;
aload 0
invokestatic org.jruby.RubyRandom.getDefaultRand:(Lorg/jruby/runtime/ThreadContext;)Lorg/jruby/RubyRandom$RandomType;
invokevirtual org.jruby.RubyRandom$RandomType.getLeft:()I
i2l
invokestatic org.jruby.RubyNumeric.int2fix:(Lorg/jruby/Ruby;J)Lorg/jruby/RubyNumeric;
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 context Lorg/jruby/runtime/ThreadContext;
0 1 1 recv Lorg/jruby/runtime/builtin/IRubyObject;
RuntimeVisibleAnnotations:
org.jruby.anno.JRubyMethod(name = {"left"}, meta = true, visibility = org.jruby.runtime.Visibility.PRIVATE:Lorg/jruby/runtime/Visibility;)
MethodParameters:
Name Flags
context
recv
public org.jruby.runtime.builtin.IRubyObject marshal_dump(org.jruby.runtime.ThreadContext);
descriptor: (Lorg/jruby/runtime/ThreadContext;)Lorg/jruby/runtime/builtin/IRubyObject;
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=5, args_size=2
start local 0 start local 1 0: aload 0
getfield org.jruby.RubyRandom.random:Lorg/jruby/RubyRandom$RandomType;
invokevirtual org.jruby.RubyRandom$RandomType.getState:()Lorg/jruby/RubyBignum;
astore 2
start local 2 1: aload 1
getfield org.jruby.runtime.ThreadContext.runtime:Lorg/jruby/Ruby;
aload 0
getfield org.jruby.RubyRandom.random:Lorg/jruby/RubyRandom$RandomType;
invokevirtual org.jruby.RubyRandom$RandomType.getLeft:()I
i2l
invokestatic org.jruby.RubyFixnum.newFixnum:(Lorg/jruby/Ruby;J)Lorg/jruby/RubyFixnum;
astore 3
start local 3 2: aload 1
getfield org.jruby.runtime.ThreadContext.runtime:Lorg/jruby/Ruby;
aload 2
aload 3
aload 0
getfield org.jruby.RubyRandom.random:Lorg/jruby/RubyRandom$RandomType;
invokevirtual org.jruby.RubyRandom$RandomType.getSeed:()Lorg/jruby/RubyInteger;
invokestatic org.jruby.RubyArray.newArray:(Lorg/jruby/Ruby;Lorg/jruby/runtime/builtin/IRubyObject;Lorg/jruby/runtime/builtin/IRubyObject;Lorg/jruby/runtime/builtin/IRubyObject;)Lorg/jruby/RubyArray;
astore 4
start local 4 3: aload 0
invokevirtual org.jruby.RubyRandom.hasVariables:()Z
ifeq 5
4: aload 4
aload 0
invokevirtual org.jruby.RubyArray.syncVariables:(Lorg/jruby/runtime/builtin/IRubyObject;)V
5: StackMap locals: org.jruby.RubyBignum org.jruby.RubyInteger org.jruby.RubyArray
StackMap stack:
aload 4
areturn
end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 this Lorg/jruby/RubyRandom;
0 6 1 context Lorg/jruby/runtime/ThreadContext;
1 6 2 state Lorg/jruby/RubyBignum;
2 6 3 left Lorg/jruby/RubyInteger;
3 6 4 dump Lorg/jruby/RubyArray;
RuntimeVisibleAnnotations:
org.jruby.anno.JRubyMethod(name = {"marshal_dump"})
MethodParameters:
Name Flags
context
public org.jruby.runtime.builtin.IRubyObject marshal_load(org.jruby.runtime.ThreadContext, org.jruby.runtime.builtin.IRubyObject);
descriptor: (Lorg/jruby/runtime/ThreadContext;Lorg/jruby/runtime/builtin/IRubyObject;)Lorg/jruby/runtime/builtin/IRubyObject;
flags: (0x0001) ACC_PUBLIC
Code:
stack=6, locals=7, args_size=3
start local 0 start local 1 start local 2 0: aload 2
invokeinterface org.jruby.runtime.builtin.IRubyObject.convertToArray:()Lorg/jruby/RubyArray;
astore 3
start local 3 1: aload 3
invokevirtual org.jruby.RubyArray.size:()I
iconst_3
if_icmpeq 3
2: aload 1
getfield org.jruby.runtime.ThreadContext.runtime:Lorg/jruby/Ruby;
ldc "wrong dump data"
invokevirtual org.jruby.Ruby.newArgumentError:(Ljava/lang/String;)Lorg/jruby/exceptions/RaiseException;
athrow
3: StackMap locals: org.jruby.RubyArray
StackMap stack:
aload 3
iconst_0
invokevirtual org.jruby.RubyArray.eltInternal:(I)Lorg/jruby/runtime/builtin/IRubyObject;
instanceof org.jruby.RubyBignum
ifne 5
4: aload 1
getfield org.jruby.runtime.ThreadContext.runtime:Lorg/jruby/Ruby;
aload 3
iconst_0
invokevirtual org.jruby.RubyArray.eltInternal:(I)Lorg/jruby/runtime/builtin/IRubyObject;
aload 1
getfield org.jruby.runtime.ThreadContext.runtime:Lorg/jruby/Ruby;
invokevirtual org.jruby.Ruby.getBignum:()Lorg/jruby/RubyClass;
invokevirtual org.jruby.Ruby.newTypeError:(Lorg/jruby/runtime/builtin/IRubyObject;Lorg/jruby/RubyClass;)Lorg/jruby/exceptions/RaiseException;
athrow
5: StackMap locals:
StackMap stack:
aload 3
iconst_0
invokevirtual org.jruby.RubyArray.eltInternal:(I)Lorg/jruby/runtime/builtin/IRubyObject;
checkcast org.jruby.RubyBignum
astore 4
start local 4 6: aload 3
iconst_1
invokevirtual org.jruby.RubyArray.eltInternal:(I)Lorg/jruby/runtime/builtin/IRubyObject;
invokestatic org.jruby.RubyNumeric.num2int:(Lorg/jruby/runtime/builtin/IRubyObject;)I
istore 5
start local 5 7: aload 3
iconst_2
invokevirtual org.jruby.RubyArray.eltInternal:(I)Lorg/jruby/runtime/builtin/IRubyObject;
astore 6
start local 6 8: aload 0
new org.jruby.RubyRandom$RandomType
dup
aload 6
aload 4
iload 5
invokespecial org.jruby.RubyRandom$RandomType.<init>:(Lorg/jruby/runtime/builtin/IRubyObject;Lorg/jruby/RubyBignum;I)V
putfield org.jruby.RubyRandom.random:Lorg/jruby/RubyRandom$RandomType;
9: aload 3
invokevirtual org.jruby.RubyArray.hasVariables:()Z
ifeq 11
10: aload 0
aload 3
invokevirtual org.jruby.RubyRandom.syncVariables:(Lorg/jruby/runtime/builtin/IRubyObject;)V
11: StackMap locals: org.jruby.RubyBignum int org.jruby.runtime.builtin.IRubyObject
StackMap stack:
aload 0
areturn
end local 6 end local 5 end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 12 0 this Lorg/jruby/RubyRandom;
0 12 1 context Lorg/jruby/runtime/ThreadContext;
0 12 2 arg Lorg/jruby/runtime/builtin/IRubyObject;
1 12 3 load Lorg/jruby/RubyArray;
6 12 4 state Lorg/jruby/RubyBignum;
7 12 5 left I
8 12 6 seed Lorg/jruby/runtime/builtin/IRubyObject;
RuntimeVisibleAnnotations:
org.jruby.anno.JRubyMethod()
MethodParameters:
Name Flags
context
arg
public org.jruby.runtime.builtin.IRubyObject bytes(org.jruby.runtime.ThreadContext, org.jruby.runtime.builtin.IRubyObject);
descriptor: (Lorg/jruby/runtime/ThreadContext;Lorg/jruby/runtime/builtin/IRubyObject;)Lorg/jruby/runtime/builtin/IRubyObject;
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=8, args_size=3
start local 0 start local 1 start local 2 0: aload 2
invokestatic org.jruby.RubyNumeric.num2int:(Lorg/jruby/runtime/builtin/IRubyObject;)I
istore 3
start local 3 1: iload 3
newarray 8
astore 4
start local 4 2: iconst_0
istore 5
start local 5 3: goto 12
4: StackMap locals: int byte[] int
StackMap stack:
aload 0
getfield org.jruby.RubyRandom.random:Lorg/jruby/RubyRandom$RandomType;
invokevirtual org.jruby.RubyRandom$RandomType.genrandInt32:()I
istore 6
start local 6 5: iconst_0
istore 7
start local 7 6: goto 10
7: StackMap locals: int int
StackMap stack:
aload 4
iload 5
iinc 5 1
iload 6
sipush 255
iand
i2b
bastore
8: iload 6
bipush 8
iushr
istore 6
9: iinc 7 1
StackMap locals:
StackMap stack:
10: iload 7
iconst_4
if_icmplt 7
end local 7 end local 6 11: iinc 3 -4
StackMap locals:
StackMap stack:
12: iload 3
iconst_4
if_icmpge 4
13: iload 3
ifle 21
14: aload 0
getfield org.jruby.RubyRandom.random:Lorg/jruby/RubyRandom$RandomType;
invokevirtual org.jruby.RubyRandom$RandomType.genrandInt32:()I
istore 6
start local 6 15: iconst_0
istore 7
start local 7 16: goto 20
17: StackMap locals: int int
StackMap stack:
aload 4
iload 5
iinc 5 1
iload 6
sipush 255
iand
i2b
bastore
18: iload 6
bipush 8
iushr
istore 6
19: iinc 7 1
StackMap locals:
StackMap stack:
20: iload 7
iload 3
if_icmplt 17
end local 7 end local 6 21: StackMap locals:
StackMap stack:
aload 1
getfield org.jruby.runtime.ThreadContext.runtime:Lorg/jruby/Ruby;
new org.jruby.util.ByteList
dup
aload 4
invokespecial org.jruby.util.ByteList.<init>:([B)V
invokevirtual org.jruby.Ruby.newString:(Lorg/jruby/util/ByteList;)Lorg/jruby/RubyString;
areturn
end local 5 end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 22 0 this Lorg/jruby/RubyRandom;
0 22 1 context Lorg/jruby/runtime/ThreadContext;
0 22 2 arg Lorg/jruby/runtime/builtin/IRubyObject;
1 22 3 n I
2 22 4 bytes [B
3 22 5 idx I
5 11 6 r I
6 11 7 i I
15 21 6 r I
16 21 7 i I
RuntimeVisibleAnnotations:
org.jruby.anno.JRubyMethod(name = {"bytes"})
MethodParameters:
Name Flags
context
arg
private static org.jruby.RubyRandom$RandomType tryGetRandomType(org.jruby.runtime.ThreadContext, org.jruby.runtime.builtin.IRubyObject);
descriptor: (Lorg/jruby/runtime/ThreadContext;Lorg/jruby/runtime/builtin/IRubyObject;)Lorg/jruby/RubyRandom$RandomType;
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: aload 1
aload 0
getfield org.jruby.runtime.ThreadContext.runtime:Lorg/jruby/Ruby;
invokevirtual org.jruby.Ruby.getRandomClass:()Lorg/jruby/RubyClass;
invokevirtual java.lang.Object.equals:(Ljava/lang/Object;)Z
ifeq 1
aload 0
invokestatic org.jruby.RubyRandom.getDefaultRand:(Lorg/jruby/runtime/ThreadContext;)Lorg/jruby/RubyRandom$RandomType;
areturn
1: StackMap locals:
StackMap stack:
aload 1
instanceof org.jruby.RubyRandom
ifeq 2
aload 1
checkcast org.jruby.RubyRandom
getfield org.jruby.RubyRandom.random:Lorg/jruby/RubyRandom$RandomType;
areturn
2: StackMap locals:
StackMap stack:
aconst_null
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 context Lorg/jruby/runtime/ThreadContext;
0 3 1 obj Lorg/jruby/runtime/builtin/IRubyObject;
MethodParameters:
Name Flags
context
obj
public static long randomLongLimited(org.jruby.runtime.ThreadContext, org.jruby.runtime.builtin.IRubyObject, long);
descriptor: (Lorg/jruby/runtime/ThreadContext;Lorg/jruby/runtime/builtin/IRubyObject;J)J
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=8, locals=8, args_size=3
start local 0 start local 1 start local 2 0: aload 0
aload 1
invokestatic org.jruby.RubyRandom.tryGetRandomType:(Lorg/jruby/runtime/ThreadContext;Lorg/jruby/runtime/builtin/IRubyObject;)Lorg/jruby/RubyRandom$RandomType;
astore 4
start local 4 1: aload 4
ifnonnull 7
2: aload 0
aload 1
ldc "rand"
aload 0
getfield org.jruby.runtime.ThreadContext.runtime:Lorg/jruby/Ruby;
lload 2
lconst_1
ladd
invokevirtual org.jruby.Ruby.newFixnum:(J)Lorg/jruby/RubyFixnum;
invokestatic org.jruby.runtime.Helpers.invokePublic:(Lorg/jruby/runtime/ThreadContext;Lorg/jruby/runtime/builtin/IRubyObject;Ljava/lang/String;Lorg/jruby/runtime/builtin/IRubyObject;)Lorg/jruby/runtime/builtin/IRubyObject;
invokeinterface org.jruby.runtime.builtin.IRubyObject.convertToInteger:()Lorg/jruby/RubyInteger;
astore 5
start local 5 3: aload 5
invokestatic org.jruby.RubyNumeric.num2long:(Lorg/jruby/runtime/builtin/IRubyObject;)J
lstore 6
start local 6 4: lload 6
lconst_0
lcmp
ifge 5
aload 0
getfield org.jruby.runtime.ThreadContext.runtime:Lorg/jruby/Ruby;
new java.lang.StringBuilder
dup
ldc "random number too small "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
lload 6
invokevirtual java.lang.StringBuilder.append:(J)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokevirtual org.jruby.Ruby.newRangeError:(Ljava/lang/String;)Lorg/jruby/exceptions/RaiseException;
athrow
5: StackMap locals: org.jruby.RubyRandom$RandomType org.jruby.RubyInteger long
StackMap stack:
lload 6
lload 2
lcmp
ifle 6
aload 0
getfield org.jruby.runtime.ThreadContext.runtime:Lorg/jruby/Ruby;
new java.lang.StringBuilder
dup
ldc "random number too big "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
lload 6
invokevirtual java.lang.StringBuilder.append:(J)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokevirtual org.jruby.Ruby.newRangeError:(Ljava/lang/String;)Lorg/jruby/exceptions/RaiseException;
athrow
6: StackMap locals:
StackMap stack:
lload 6
lreturn
end local 6 end local 5 7: StackMap locals:
StackMap stack:
aload 4
getfield org.jruby.RubyRandom$RandomType.impl:Lorg/jruby/util/Random;
lload 2
invokestatic org.jruby.RubyRandom.randLimitedFixnumInner:(Lorg/jruby/util/Random;J)J
lreturn
end local 4 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 8 0 context Lorg/jruby/runtime/ThreadContext;
0 8 1 obj Lorg/jruby/runtime/builtin/IRubyObject;
0 8 2 limit J
1 8 4 rnd Lorg/jruby/RubyRandom$RandomType;
3 7 5 v Lorg/jruby/RubyInteger;
4 7 6 r J
MethodParameters:
Name Flags
context
obj
limit
public static double randomReal(org.jruby.runtime.ThreadContext, org.jruby.runtime.builtin.IRubyObject);
descriptor: (Lorg/jruby/runtime/ThreadContext;Lorg/jruby/runtime/builtin/IRubyObject;)D
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=4, locals=5, args_size=2
start local 0 start local 1 0: aload 0
aload 1
invokestatic org.jruby.RubyRandom.tryGetRandomType:(Lorg/jruby/runtime/ThreadContext;Lorg/jruby/runtime/builtin/IRubyObject;)Lorg/jruby/RubyRandom$RandomType;
astore 2
start local 2 1: aload 2
ifnull 2
aload 2
invokevirtual org.jruby.RubyRandom$RandomType.genrandReal:()D
dreturn
2: StackMap locals: org.jruby.RubyRandom$RandomType
StackMap stack:
aload 0
aload 0
aload 1
ldc "rand"
invokestatic org.jruby.runtime.Helpers.invoke:(Lorg/jruby/runtime/ThreadContext;Lorg/jruby/runtime/builtin/IRubyObject;Ljava/lang/String;)Lorg/jruby/runtime/builtin/IRubyObject;
invokestatic org.jruby.RubyNumeric.num2dbl:(Lorg/jruby/runtime/ThreadContext;Lorg/jruby/runtime/builtin/IRubyObject;)D
dstore 3
start local 3 3: dload 3
dconst_0
dcmpg
iflt 4
dload 3
dconst_1
dcmpl
iflt 5
StackMap locals: double
StackMap stack:
4: aload 0
getfield org.jruby.runtime.ThreadContext.runtime:Lorg/jruby/Ruby;
new java.lang.StringBuilder
dup
ldc "random number too big: "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
dload 3
invokevirtual java.lang.StringBuilder.append:(D)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokevirtual org.jruby.Ruby.newRangeError:(Ljava/lang/String;)Lorg/jruby/exceptions/RaiseException;
athrow
5: StackMap locals:
StackMap stack:
dload 3
dreturn
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 context Lorg/jruby/runtime/ThreadContext;
0 6 1 obj Lorg/jruby/runtime/builtin/IRubyObject;
1 6 2 random Lorg/jruby/RubyRandom$RandomType;
3 6 3 d D
MethodParameters:
Name Flags
context
obj
public static org.jruby.runtime.builtin.IRubyObject newSeed(org.jruby.runtime.ThreadContext, org.jruby.runtime.builtin.IRubyObject);
descriptor: (Lorg/jruby/runtime/ThreadContext;Lorg/jruby/runtime/builtin/IRubyObject;)Lorg/jruby/runtime/builtin/IRubyObject;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=1, locals=2, args_size=2
start local 0 start local 1 0: aload 0
getfield org.jruby.runtime.ThreadContext.runtime:Lorg/jruby/Ruby;
invokestatic org.jruby.RubyRandom.randomSeed:(Lorg/jruby/Ruby;)Lorg/jruby/RubyBignum;
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 context Lorg/jruby/runtime/ThreadContext;
0 1 1 recv Lorg/jruby/runtime/builtin/IRubyObject;
RuntimeVisibleAnnotations:
org.jruby.anno.JRubyMethod(name = {"new_seed"}, meta = true)
MethodParameters:
Name Flags
context
recv
public static org.jruby.runtime.builtin.IRubyObject urandom(org.jruby.runtime.ThreadContext, org.jruby.runtime.builtin.IRubyObject, org.jruby.runtime.builtin.IRubyObject);
descriptor: (Lorg/jruby/runtime/ThreadContext;Lorg/jruby/runtime/builtin/IRubyObject;Lorg/jruby/runtime/builtin/IRubyObject;)Lorg/jruby/runtime/builtin/IRubyObject;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=2, locals=6, args_size=3
start local 0 start local 1 start local 2 0: aload 0
getfield org.jruby.runtime.ThreadContext.runtime:Lorg/jruby/Ruby;
astore 3
start local 3 1: aload 2
invokeinterface org.jruby.runtime.builtin.IRubyObject.convertToInteger:()Lorg/jruby/RubyInteger;
invokevirtual org.jruby.RubyInteger.getIntValue:()I
istore 4
start local 4 2: iload 4
ifge 3
aload 3
ldc "negative string size (or size too big)"
invokevirtual org.jruby.Ruby.newArgumentError:(Ljava/lang/String;)Lorg/jruby/exceptions/RaiseException;
athrow
3: StackMap locals: org.jruby.Ruby int
StackMap stack:
iload 4
ifne 4
aload 3
invokevirtual org.jruby.Ruby.newString:()Lorg/jruby/RubyString;
areturn
4: StackMap locals:
StackMap stack:
iload 4
newarray 8
astore 5
start local 5 5: aload 3
getfield org.jruby.Ruby.random:Ljava/util/Random;
aload 5
invokevirtual java.util.Random.nextBytes:([B)V
6: aload 3
aload 5
invokestatic org.jruby.RubyString.newString:(Lorg/jruby/Ruby;[B)Lorg/jruby/RubyString;
areturn
end local 5 end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 7 0 context Lorg/jruby/runtime/ThreadContext;
0 7 1 recv Lorg/jruby/runtime/builtin/IRubyObject;
0 7 2 num Lorg/jruby/runtime/builtin/IRubyObject;
1 7 3 runtime Lorg/jruby/Ruby;
2 7 4 n I
5 7 5 seed [B
RuntimeVisibleAnnotations:
org.jruby.anno.JRubyMethod(name = {"urandom"}, meta = true)
MethodParameters:
Name Flags
context
recv
num
private void setRandomType(org.jruby.RubyRandom$RandomType);
descriptor: (Lorg/jruby/RubyRandom$RandomType;)V
flags: (0x0002) ACC_PRIVATE
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: aload 0
aload 1
putfield org.jruby.RubyRandom.random:Lorg/jruby/RubyRandom$RandomType;
1: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lorg/jruby/RubyRandom;
0 2 1 random Lorg/jruby/RubyRandom$RandomType;
MethodParameters:
Name Flags
random
}
SourceFile: "RubyRandom.java"
NestMembers:
org.jruby.RubyRandom$1 org.jruby.RubyRandom$RandomType org.jruby.RubyRandom$RangeLike
InnerClasses:
org.jruby.RubyRandom$1
public final RandomType = org.jruby.RubyRandom$RandomType of org.jruby.RubyRandom
RangeLike = org.jruby.RubyRandom$RangeLike of org.jruby.RubyRandom
RuntimeVisibleAnnotations:
org.jruby.anno.JRubyClass(name = {"Random"})