public class org.jruby.ext.ffi.IOModule
minor version: 0
major version: 59
flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: org.jruby.ext.ffi.IOModule
super_class: java.lang.Object
{
public void <init>();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
invokespecial java.lang.Object.<init>:()V
return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/jruby/ext/ffi/IOModule;
public static void createIOModule(org.jruby.Ruby, org.jruby.RubyModule);
descriptor: (Lorg/jruby/Ruby;Lorg/jruby/RubyModule;)V
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=2, locals=3, args_size=2
start local 0 start local 1 0: aload 1
ldc "IO"
invokevirtual org.jruby.RubyModule.defineModuleUnder:(Ljava/lang/String;)Lorg/jruby/RubyModule;
astore 2
start local 2 1: aload 2
ldc Lorg/jruby/ext/ffi/IOModule;
invokevirtual org.jruby.RubyModule.defineAnnotatedMethods:(Ljava/lang/Class;)V
2: return
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 runtime Lorg/jruby/Ruby;
0 3 1 ffi Lorg/jruby/RubyModule;
1 3 2 module Lorg/jruby/RubyModule;
MethodParameters:
Name Flags
runtime
ffi
public static final org.jruby.runtime.builtin.IRubyObject native_read(org.jruby.runtime.ThreadContext, org.jruby.runtime.builtin.IRubyObject, org.jruby.runtime.builtin.IRubyObject, 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;Lorg/jruby/runtime/builtin/IRubyObject;)Lorg/jruby/runtime/builtin/IRubyObject;
flags: (0x0019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL
Code:
stack=3, locals=9, args_size=5
start local 0 start local 1 start local 2 start local 3 start local 4 0: aload 2
instanceof org.jruby.RubyIO
ifne 2
1: aload 0
getfield org.jruby.runtime.ThreadContext.runtime:Lorg/jruby/Ruby;
ldc "wrong argument (expected IO)"
invokevirtual org.jruby.Ruby.newTypeError:(Ljava/lang/String;)Lorg/jruby/exceptions/RaiseException;
athrow
2: StackMap locals:
StackMap stack:
aload 3
instanceof org.jruby.ext.ffi.AbstractMemory
ifne 4
3: aload 0
getfield org.jruby.runtime.ThreadContext.runtime:Lorg/jruby/Ruby;
ldc "wrong argument (expected FFI memory)"
invokevirtual org.jruby.Ruby.newTypeError:(Ljava/lang/String;)Lorg/jruby/exceptions/RaiseException;
athrow
4: StackMap locals:
StackMap stack:
aload 0
getfield org.jruby.runtime.ThreadContext.runtime:Lorg/jruby/Ruby;
astore 5
start local 5 5: aload 2
checkcast org.jruby.RubyIO
invokevirtual org.jruby.RubyIO.getOpenFile:()Lorg/jruby/util/io/OpenFile;
astore 6
start local 6 6: aload 6
invokevirtual org.jruby.util.io.OpenFile.checkClosed:()V
7: aload 6
aload 0
invokevirtual org.jruby.util.io.OpenFile.checkReadable:(Lorg/jruby/runtime/ThreadContext;)V
8: aload 3
checkcast org.jruby.ext.ffi.AbstractMemory
invokevirtual org.jruby.ext.ffi.AbstractMemory.getMemoryIO:()Lorg/jruby/ext/ffi/MemoryIO;
invokevirtual org.jruby.ext.ffi.MemoryIO.asByteBuffer:()Ljava/nio/ByteBuffer;
astore 7
start local 7 9: aload 4
invokestatic org.jruby.RubyNumeric.num2int:(Lorg/jruby/runtime/builtin/IRubyObject;)I
istore 8
start local 8 10: iload 8
aload 7
invokevirtual java.nio.ByteBuffer.remaining:()I
if_icmple 12
11: aload 5
ldc "read count too big for output buffer"
invokevirtual org.jruby.Ruby.newIndexError:(Ljava/lang/String;)Lorg/jruby/exceptions/RaiseException;
athrow
12: StackMap locals: org.jruby.runtime.ThreadContext org.jruby.runtime.builtin.IRubyObject org.jruby.runtime.builtin.IRubyObject org.jruby.runtime.builtin.IRubyObject org.jruby.runtime.builtin.IRubyObject org.jruby.Ruby org.jruby.util.io.OpenFile java.nio.ByteBuffer int
StackMap stack:
iload 8
aload 7
invokevirtual java.nio.ByteBuffer.remaining:()I
if_icmpge 15
13: aload 7
invokevirtual java.nio.ByteBuffer.duplicate:()Ljava/nio/ByteBuffer;
astore 7
14: aload 7
iload 8
invokestatic com.headius.backport9.buffer.Buffers.limitBuffer:(Ljava/nio/Buffer;I)Ljava/nio/Buffer;
pop
15: StackMap locals:
StackMap stack:
aload 5
aload 6
invokevirtual org.jruby.util.io.OpenFile.readChannel:()Ljava/nio/channels/ReadableByteChannel;
aload 7
invokeinterface java.nio.channels.ReadableByteChannel.read:(Ljava/nio/ByteBuffer;)I
invokevirtual org.jruby.Ruby.newFixnum:(I)Lorg/jruby/RubyFixnum;
16: areturn
end local 8 end local 7 end local 6 17: StackMap locals: org.jruby.runtime.ThreadContext org.jruby.runtime.builtin.IRubyObject org.jruby.runtime.builtin.IRubyObject org.jruby.runtime.builtin.IRubyObject org.jruby.runtime.builtin.IRubyObject org.jruby.Ruby
StackMap stack: java.io.EOFException
pop
18: aload 5
iconst_m1
invokevirtual org.jruby.Ruby.newFixnum:(I)Lorg/jruby/RubyFixnum;
areturn
19: StackMap locals:
StackMap stack: java.io.IOException
astore 6
start local 6 20: aload 5
aload 6
invokevirtual org.jruby.Ruby.newIOErrorFromException:(Ljava/io/IOException;)Lorg/jruby/exceptions/RaiseException;
athrow
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 21 0 context Lorg/jruby/runtime/ThreadContext;
0 21 1 self Lorg/jruby/runtime/builtin/IRubyObject;
0 21 2 src Lorg/jruby/runtime/builtin/IRubyObject;
0 21 3 dst Lorg/jruby/runtime/builtin/IRubyObject;
0 21 4 rbLength Lorg/jruby/runtime/builtin/IRubyObject;
5 21 5 runtime Lorg/jruby/Ruby;
6 17 6 openFile Lorg/jruby/util/io/OpenFile;
9 17 7 buffer Ljava/nio/ByteBuffer;
10 17 8 count I
20 21 6 e Ljava/io/IOException;
Exception table:
from to target type
5 16 17 Class java.io.EOFException
5 16 19 Class java.io.IOException
RuntimeVisibleAnnotations:
org.jruby.anno.JRubyMethod(name = {"native_read"}, module = true)
MethodParameters:
Name Flags
context
self
src
dst
rbLength
}
SourceFile: "IOModule.java"