public class org.jruby.util.io.PosixShim
minor version: 0
major version: 59
flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: org.jruby.util.io.PosixShim
super_class: java.lang.Object
{
public static final int LOCK_SH;
descriptor: I
flags: (0x0019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL
ConstantValue: 1
public static final int LOCK_EX;
descriptor: I
flags: (0x0019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL
ConstantValue: 2
public static final int LOCK_NB;
descriptor: I
flags: (0x0019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL
ConstantValue: 4
public static final int LOCK_UN;
descriptor: I
flags: (0x0019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL
ConstantValue: 8
public static final int SEEK_SET;
descriptor: I
flags: (0x0019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL
ConstantValue: 0
public static final int SEEK_CUR;
descriptor: I
flags: (0x0019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL
ConstantValue: 1
public static final int SEEK_END;
descriptor: I
flags: (0x0019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL
ConstantValue: 2
private static final int NATIVE_EOF;
descriptor: I
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
ConstantValue: 0
private static final int JAVA_EOF;
descriptor: I
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
ConstantValue: -1
public static final org.jruby.util.io.PosixShim$WaitMacros WAIT_MACROS;
descriptor: Lorg/jruby/util/io/PosixShim$WaitMacros;
flags: (0x0019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL
public java.lang.Throwable error;
descriptor: Ljava/lang/Throwable;
flags: (0x0001) ACC_PUBLIC
private java.lang.ThreadLocal<jnr.constants.platform.Errno> errno;
descriptor: Ljava/lang/ThreadLocal;
flags: (0x0002) ACC_PRIVATE
Signature: Ljava/lang/ThreadLocal<Ljnr/constants/platform/Errno;>;
public java.lang.String errmsg;
descriptor: Ljava/lang/String;
flags: (0x0001) ACC_PUBLIC
private final jnr.posix.POSIX posix;
descriptor: Ljnr/posix/POSIX;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private final org.jruby.Ruby runtime;
descriptor: Lorg/jruby/Ruby;
flags: (0x0012) ACC_PRIVATE, ACC_FINAL
private static final java.lang.Object _umaskLock;
descriptor: Ljava/lang/Object;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
private static int _cachedUmask;
descriptor: I
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
static void <clinit>();
descriptor: ()V
flags: (0x0008) ACC_STATIC
Code:
stack=2, locals=0, args_size=0
0: getstatic org.jruby.platform.Platform.IS_BSD:Z
ifeq 3
1: new org.jruby.util.io.PosixShim$BSDWaitMacros
dup
invokespecial org.jruby.util.io.PosixShim$BSDWaitMacros.<init>:()V
putstatic org.jruby.util.io.PosixShim.WAIT_MACROS:Lorg/jruby/util/io/PosixShim$WaitMacros;
2: goto 4
3: StackMap locals:
StackMap stack:
new org.jruby.util.io.PosixShim$LinuxWaitMacros
dup
invokespecial org.jruby.util.io.PosixShim$LinuxWaitMacros.<init>:()V
putstatic org.jruby.util.io.PosixShim.WAIT_MACROS:Lorg/jruby/util/io/PosixShim$WaitMacros;
4: StackMap locals:
StackMap stack:
new java.lang.Object
dup
invokespecial java.lang.Object.<init>:()V
putstatic org.jruby.util.io.PosixShim._umaskLock:Ljava/lang/Object;
5: iconst_0
putstatic org.jruby.util.io.PosixShim._cachedUmask:I
return
LocalVariableTable:
Start End Slot Name Signature
public void <init>(org.jruby.Ruby);
descriptor: (Lorg/jruby/Ruby;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=2, args_size=2
start local 0 start local 1 0: aload 0
invokespecial java.lang.Object.<init>:()V
1: aload 0
new java.lang.ThreadLocal
dup
invokespecial java.lang.ThreadLocal.<init>:()V
putfield org.jruby.util.io.PosixShim.errno:Ljava/lang/ThreadLocal;
2: aload 0
aload 1
putfield org.jruby.util.io.PosixShim.runtime:Lorg/jruby/Ruby;
3: aload 0
aload 1
invokevirtual org.jruby.Ruby.getPosix:()Ljnr/posix/POSIX;
putfield org.jruby.util.io.PosixShim.posix:Ljnr/posix/POSIX;
4: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 this Lorg/jruby/util/io/PosixShim;
0 5 1 runtime Lorg/jruby/Ruby;
MethodParameters:
Name Flags
runtime
public long lseek(org.jruby.util.io.ChannelFD, long, int);
descriptor: (Lorg/jruby/util/io/ChannelFD;JI)J
flags: (0x0001) ACC_PUBLIC
Code:
stack=5, locals=7, args_size=4
start local 0 start local 1 start local 2 start local 4 0: aload 0
invokevirtual org.jruby.util.io.PosixShim.clear:()V
1: aload 1
getfield org.jruby.util.io.ChannelFD.chSeek:Ljava/nio/channels/SeekableByteChannel;
ifnull 18
2: iconst_0
istore 5
start local 5 3: iload 4
tableswitch { // 0 - 2
0: 4
1: 6
2: 8
default: 10
}
4: StackMap locals: int
StackMap stack:
aload 1
getfield org.jruby.util.io.ChannelFD.chSeek:Ljava/nio/channels/SeekableByteChannel;
lload 2
invokeinterface java.nio.channels.SeekableByteChannel.position:(J)Ljava/nio/channels/SeekableByteChannel;
invokeinterface java.nio.channels.SeekableByteChannel.position:()J
5: lreturn
6: StackMap locals:
StackMap stack:
aload 1
getfield org.jruby.util.io.ChannelFD.chSeek:Ljava/nio/channels/SeekableByteChannel;
aload 1
getfield org.jruby.util.io.ChannelFD.chSeek:Ljava/nio/channels/SeekableByteChannel;
invokeinterface java.nio.channels.SeekableByteChannel.position:()J
iload 5
i2l
lsub
lload 2
ladd
invokeinterface java.nio.channels.SeekableByteChannel.position:(J)Ljava/nio/channels/SeekableByteChannel;
invokeinterface java.nio.channels.SeekableByteChannel.position:()J
7: lreturn
8: StackMap locals:
StackMap stack:
aload 1
getfield org.jruby.util.io.ChannelFD.chSeek:Ljava/nio/channels/SeekableByteChannel;
aload 1
getfield org.jruby.util.io.ChannelFD.chSeek:Ljava/nio/channels/SeekableByteChannel;
invokeinterface java.nio.channels.SeekableByteChannel.size:()J
lload 2
ladd
invokeinterface java.nio.channels.SeekableByteChannel.position:(J)Ljava/nio/channels/SeekableByteChannel;
invokeinterface java.nio.channels.SeekableByteChannel.position:()J
9: lreturn
10: StackMap locals:
StackMap stack:
aload 0
getstatic jnr.constants.platform.Errno.EINVAL:Ljnr/constants/platform/Errno;
invokevirtual org.jruby.util.io.PosixShim.setErrno:(Ljnr/constants/platform/Errno;)V
11: ldc -1
lreturn
12: StackMap locals:
StackMap stack: java.lang.IllegalArgumentException
pop
13: aload 0
getstatic jnr.constants.platform.Errno.EINVAL:Ljnr/constants/platform/Errno;
invokevirtual org.jruby.util.io.PosixShim.setErrno:(Ljnr/constants/platform/Errno;)V
14: ldc -1
lreturn
15: StackMap locals:
StackMap stack: java.io.IOException
astore 6
start local 6 16: aload 0
aload 6
invokestatic org.jruby.runtime.Helpers.errnoFromException:(Ljava/lang/Throwable;)Ljnr/constants/platform/Errno;
invokevirtual org.jruby.util.io.PosixShim.setErrno:(Ljnr/constants/platform/Errno;)V
17: ldc -1
lreturn
end local 6 end local 5 18: StackMap locals:
StackMap stack:
aload 1
getfield org.jruby.util.io.ChannelFD.chNative:Ljnr/enxio/channels/NativeSelectableChannel;
ifnull 22
19: aload 0
getfield org.jruby.util.io.PosixShim.posix:Ljnr/posix/POSIX;
aload 1
getfield org.jruby.util.io.ChannelFD.chNative:Ljnr/enxio/channels/NativeSelectableChannel;
invokeinterface jnr.enxio.channels.NativeSelectableChannel.getFD:()I
lload 2
iload 4
invokeinterface jnr.posix.POSIX.lseekLong:(IJI)J
lstore 5
start local 5 20: lload 5
ldc -1
lcmp
ifne 21
aload 0
aload 0
getfield org.jruby.util.io.PosixShim.posix:Ljnr/posix/POSIX;
invokeinterface jnr.posix.POSIX.errno:()I
i2l
invokestatic jnr.constants.platform.Errno.valueOf:(J)Ljnr/constants/platform/Errno;
invokevirtual org.jruby.util.io.PosixShim.setErrno:(Ljnr/constants/platform/Errno;)V
21: StackMap locals: long
StackMap stack:
lload 5
lreturn
end local 5 22: StackMap locals:
StackMap stack:
aload 1
getfield org.jruby.util.io.ChannelFD.chSelect:Ljava/nio/channels/SelectableChannel;
ifnull 25
23: aload 0
getstatic jnr.constants.platform.Errno.EPIPE:Ljnr/constants/platform/Errno;
invokevirtual org.jruby.util.io.PosixShim.setErrno:(Ljnr/constants/platform/Errno;)V
24: ldc -1
lreturn
25: StackMap locals:
StackMap stack:
lconst_0
lreturn
end local 4 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 26 0 this Lorg/jruby/util/io/PosixShim;
0 26 1 fd Lorg/jruby/util/io/ChannelFD;
0 26 2 offset J
0 26 4 type I
3 18 5 adj I
16 18 6 ioe Ljava/io/IOException;
20 22 5 ret J
Exception table:
from to target type
3 5 12 Class java.lang.IllegalArgumentException
6 7 12 Class java.lang.IllegalArgumentException
8 9 12 Class java.lang.IllegalArgumentException
10 11 12 Class java.lang.IllegalArgumentException
3 5 15 Class java.io.IOException
6 7 15 Class java.io.IOException
8 9 15 Class java.io.IOException
10 11 15 Class java.io.IOException
MethodParameters:
Name Flags
fd
offset
type
public int write(org.jruby.util.io.ChannelFD, byte[], int, int, boolean);
descriptor: (Lorg/jruby/util/io/ChannelFD;[BIIZ)I
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=8, args_size=6
start local 0 start local 1 start local 2 start local 3 start local 4 start local 5 0: aload 0
invokevirtual org.jruby.util.io.PosixShim.clear:()V
1: aload 2
iload 3
iload 4
invokestatic java.nio.ByteBuffer.wrap:([BII)Ljava/nio/ByteBuffer;
astore 6
start local 6 2: aload 1
getfield org.jruby.util.io.ChannelFD.chWrite:Ljava/nio/channels/WritableByteChannel;
ifnonnull 5
3: aload 0
getstatic jnr.constants.platform.Errno.EACCES:Ljnr/constants/platform/Errno;
invokevirtual org.jruby.util.io.PosixShim.setErrno:(Ljnr/constants/platform/Errno;)V
4: iconst_m1
ireturn
5: StackMap locals: java.nio.ByteBuffer
StackMap stack:
aload 1
getfield org.jruby.util.io.ChannelFD.chWrite:Ljava/nio/channels/WritableByteChannel;
aload 6
invokeinterface java.nio.channels.WritableByteChannel.write:(Ljava/nio/ByteBuffer;)I
istore 7
start local 7 6: iload 7
ifne 10
iload 4
ifle 10
7: iload 5
ifeq 10
8: aload 0
getstatic jnr.constants.platform.Errno.EAGAIN:Ljnr/constants/platform/Errno;
invokevirtual org.jruby.util.io.PosixShim.setErrno:(Ljnr/constants/platform/Errno;)V
9: iconst_m1
ireturn
10: StackMap locals: int
StackMap stack:
iload 7
11: ireturn
end local 7 12: StackMap locals: org.jruby.util.io.PosixShim org.jruby.util.io.ChannelFD byte[] int int int java.nio.ByteBuffer
StackMap stack: java.io.IOException
astore 7
start local 7 13: aload 0
aload 7
invokestatic org.jruby.runtime.Helpers.errnoFromException:(Ljava/lang/Throwable;)Ljnr/constants/platform/Errno;
invokevirtual org.jruby.util.io.PosixShim.setErrno:(Ljnr/constants/platform/Errno;)V
14: aload 0
aload 7
putfield org.jruby.util.io.PosixShim.error:Ljava/lang/Throwable;
15: iconst_m1
ireturn
end local 7 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 16 0 this Lorg/jruby/util/io/PosixShim;
0 16 1 fd Lorg/jruby/util/io/ChannelFD;
0 16 2 bytes [B
0 16 3 offset I
0 16 4 length I
0 16 5 nonblock Z
2 16 6 tmp Ljava/nio/ByteBuffer;
6 12 7 written I
13 16 7 ioe Ljava/io/IOException;
Exception table:
from to target type
2 4 12 Class java.io.IOException
5 9 12 Class java.io.IOException
10 11 12 Class java.io.IOException
MethodParameters:
Name Flags
fd
bytes
offset
length
nonblock
public int read(org.jruby.util.io.ChannelFD, byte[], int, int, boolean);
descriptor: (Lorg/jruby/util/io/ChannelFD;[BIIZ)I
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=10, args_size=6
start local 0 start local 1 start local 2 start local 3 start local 4 start local 5 0: aload 0
invokevirtual org.jruby.util.io.PosixShim.clear:()V
1: iload 5
ifeq 12
2: aload 1
getfield org.jruby.util.io.ChannelFD.chSelect:Ljava/nio/channels/SelectableChannel;
ifnonnull 12
3: aload 1
getfield org.jruby.util.io.ChannelFD.chFile:Ljava/nio/channels/FileChannel;
ifnull 9
4: aload 1
getfield org.jruby.util.io.ChannelFD.chFile:Ljava/nio/channels/FileChannel;
invokevirtual java.nio.channels.FileChannel.position:()J
lstore 6
start local 6 5: aload 1
getfield org.jruby.util.io.ChannelFD.chFile:Ljava/nio/channels/FileChannel;
invokevirtual java.nio.channels.FileChannel.size:()J
lstore 8
start local 8 6: lload 6
ldc -1
lcmp
ifeq 7
lload 8
ldc -1
lcmp
ifeq 7
lload 6
lload 8
lcmp
iflt 12
7: StackMap locals: long long
StackMap stack:
aload 0
getstatic jnr.constants.platform.Errno.EAGAIN:Ljnr/constants/platform/Errno;
invokevirtual org.jruby.util.io.PosixShim.setErrno:(Ljnr/constants/platform/Errno;)V
8: iconst_m1
ireturn
end local 8 end local 6 9: StackMap locals:
StackMap stack:
aload 1
getfield org.jruby.util.io.ChannelFD.chNative:Ljnr/enxio/channels/NativeSelectableChannel;
ifnull 10
aload 1
getfield org.jruby.util.io.ChannelFD.isNativeFile:Z
ifne 12
10: StackMap locals:
StackMap stack:
aload 0
getstatic jnr.constants.platform.Errno.EAGAIN:Ljnr/constants/platform/Errno;
invokevirtual org.jruby.util.io.PosixShim.setErrno:(Ljnr/constants/platform/Errno;)V
11: iconst_m1
ireturn
12: StackMap locals:
StackMap stack:
aload 2
iload 3
iload 4
invokestatic java.nio.ByteBuffer.wrap:([BII)Ljava/nio/ByteBuffer;
astore 6
start local 6 13: aload 1
getfield org.jruby.util.io.ChannelFD.chRead:Ljava/nio/channels/ReadableByteChannel;
aload 6
invokeinterface java.nio.channels.ReadableByteChannel.read:(Ljava/nio/ByteBuffer;)I
istore 7
start local 7 14: iload 5
ifeq 23
15: iload 7
iconst_m1
if_icmpne 18
16: iconst_0
istore 7
17: goto 24
StackMap locals: java.nio.ByteBuffer int
StackMap stack:
18: iload 7
ifne 21
19: aload 0
getstatic jnr.constants.platform.Errno.EAGAIN:Ljnr/constants/platform/Errno;
invokevirtual org.jruby.util.io.PosixShim.setErrno:(Ljnr/constants/platform/Errno;)V
20: iconst_m1
ireturn
21: StackMap locals:
StackMap stack:
iload 7
22: ireturn
23: StackMap locals:
StackMap stack:
iload 7
iconst_m1
if_icmpne 24
iconst_0
istore 7
24: StackMap locals:
StackMap stack:
iload 7
25: ireturn
end local 7 end local 6 26: StackMap locals: org.jruby.util.io.PosixShim org.jruby.util.io.ChannelFD byte[] int int int
StackMap stack: java.io.IOException
astore 6
start local 6 27: aload 0
aload 6
invokestatic org.jruby.runtime.Helpers.errnoFromException:(Ljava/lang/Throwable;)Ljnr/constants/platform/Errno;
invokevirtual org.jruby.util.io.PosixShim.setErrno:(Ljnr/constants/platform/Errno;)V
28: iconst_m1
ireturn
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 29 0 this Lorg/jruby/util/io/PosixShim;
0 29 1 fd Lorg/jruby/util/io/ChannelFD;
0 29 2 target [B
0 29 3 offset I
0 29 4 length I
0 29 5 nonblock Z
5 9 6 position J
6 9 8 size J
13 26 6 buffer Ljava/nio/ByteBuffer;
14 26 7 read I
27 29 6 ioe Ljava/io/IOException;
Exception table:
from to target type
1 8 26 Class java.io.IOException
9 11 26 Class java.io.IOException
12 20 26 Class java.io.IOException
21 22 26 Class java.io.IOException
23 25 26 Class java.io.IOException
MethodParameters:
Name Flags
fd
target
offset
length
nonblock
public int flock(org.jruby.util.io.ChannelFD, int);
descriptor: (Lorg/jruby/util/io/ChannelFD;I)I
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=6, args_size=3
start local 0 start local 1 start local 2 0: aload 0
invokevirtual org.jruby.util.io.PosixShim.clear:()V
1: aload 1
getfield org.jruby.util.io.ChannelFD.realFileno:I
istore 3
start local 3 2: aload 0
getfield org.jruby.util.io.PosixShim.posix:Ljnr/posix/POSIX;
invokeinterface jnr.posix.POSIX.isNative:()Z
ifeq 8
iload 3
iconst_m1
if_icmpeq 8
iload 3
ldc 100000
if_icmpge 8
getstatic org.jruby.platform.Platform.IS_SOLARIS:Z
ifne 8
3: aload 0
getfield org.jruby.util.io.PosixShim.posix:Ljnr/posix/POSIX;
iload 3
iload 2
invokeinterface jnr.posix.POSIX.flock:(II)I
istore 4
start local 4 4: iload 4
ifge 7
5: aload 0
aload 0
getfield org.jruby.util.io.PosixShim.posix:Ljnr/posix/POSIX;
invokeinterface jnr.posix.POSIX.errno:()I
i2l
invokestatic jnr.constants.platform.Errno.valueOf:(J)Ljnr/constants/platform/Errno;
invokevirtual org.jruby.util.io.PosixShim.setErrno:(Ljnr/constants/platform/Errno;)V
6: iconst_m1
ireturn
7: StackMap locals: int int
StackMap stack:
iconst_0
ireturn
end local 4 8: StackMap locals:
StackMap stack:
aload 1
getfield org.jruby.util.io.ChannelFD.chFile:Ljava/nio/channels/FileChannel;
ifnull 37
9: aload 0
aload 1
iload 2
invokevirtual org.jruby.util.io.PosixShim.checkSharedExclusive:(Lorg/jruby/util/io/ChannelFD;I)I
istore 4
start local 4 10: iload 4
ifge 11
iload 4
ireturn
11: StackMap locals: int
StackMap stack:
aload 1
getfield org.jruby.util.io.ChannelFD.currentLock:Ljava/lang/ThreadLocal;
invokevirtual java.lang.ThreadLocal.get:()Ljava/lang/Object;
checkcast java.nio.channels.FileLock
iload 2
invokestatic org.jruby.util.io.PosixShim.lockStateChanges:(Ljava/nio/channels/FileLock;I)Z
ifne 12
iconst_0
ireturn
12: StackMap locals:
StackMap stack:
aload 1
getfield org.jruby.util.io.ChannelFD.chFile:Ljava/nio/channels/FileChannel;
dup
astore 5
monitorenter
13: aload 1
getfield org.jruby.util.io.ChannelFD.currentLock:Ljava/lang/ThreadLocal;
invokevirtual java.lang.ThreadLocal.get:()Ljava/lang/Object;
checkcast java.nio.channels.FileLock
iload 2
invokestatic org.jruby.util.io.PosixShim.lockStateChanges:(Ljava/nio/channels/FileLock;I)Z
ifne 15
aload 5
monitorexit
14: iconst_0
ireturn
15: StackMap locals: java.nio.channels.FileChannel
StackMap stack:
iload 2
tableswitch { // 1 - 12
1: 22
2: 18
3: 26
4: 26
5: 24
6: 20
7: 26
8: 16
9: 26
10: 26
11: 26
12: 16
default: 26
}
16: StackMap locals:
StackMap stack:
aload 0
aload 1
invokevirtual org.jruby.util.io.PosixShim.unlock:(Lorg/jruby/util/io/ChannelFD;)I
aload 5
monitorexit
17: ireturn
18: StackMap locals:
StackMap stack:
aload 0
aload 1
iconst_1
invokevirtual org.jruby.util.io.PosixShim.lock:(Lorg/jruby/util/io/ChannelFD;Z)I
aload 5
monitorexit
19: ireturn
20: StackMap locals:
StackMap stack:
aload 0
aload 1
iconst_1
invokevirtual org.jruby.util.io.PosixShim.tryLock:(Lorg/jruby/util/io/ChannelFD;Z)I
aload 5
monitorexit
21: ireturn
22: StackMap locals:
StackMap stack:
aload 0
aload 1
iconst_0
invokevirtual org.jruby.util.io.PosixShim.lock:(Lorg/jruby/util/io/ChannelFD;Z)I
aload 5
monitorexit
23: ireturn
24: StackMap locals:
StackMap stack:
aload 0
aload 1
iconst_0
invokevirtual org.jruby.util.io.PosixShim.tryLock:(Lorg/jruby/util/io/ChannelFD;Z)I
aload 5
monitorexit
25: ireturn
26: StackMap locals:
StackMap stack:
aload 5
monitorexit
27: goto 36
StackMap locals:
StackMap stack: java.lang.Throwable
28: aload 5
monitorexit
29: athrow
30: StackMap locals: org.jruby.util.io.PosixShim org.jruby.util.io.ChannelFD int int int
StackMap stack: java.io.IOException
astore 5
start local 5 31: aload 0
aload 5
invokestatic org.jruby.runtime.Helpers.errnoFromException:(Ljava/lang/Throwable;)Ljnr/constants/platform/Errno;
invokevirtual org.jruby.util.io.PosixShim.setErrno:(Ljnr/constants/platform/Errno;)V
32: iconst_m1
ireturn
end local 5 33: StackMap locals:
StackMap stack: java.nio.channels.OverlappingFileLockException
pop
34: aload 0
getstatic jnr.constants.platform.Errno.EINVAL:Ljnr/constants/platform/Errno;
invokevirtual org.jruby.util.io.PosixShim.setErrno:(Ljnr/constants/platform/Errno;)V
35: aload 0
ldc "overlapping file locks"
putfield org.jruby.util.io.PosixShim.errmsg:Ljava/lang/String;
36: StackMap locals:
StackMap stack:
iload 2
invokestatic org.jruby.util.io.PosixShim.lockFailedReturn:(I)I
ireturn
end local 4 37: StackMap locals:
StackMap stack:
aload 0
getstatic jnr.constants.platform.Errno.EINVAL:Ljnr/constants/platform/Errno;
invokevirtual org.jruby.util.io.PosixShim.setErrno:(Ljnr/constants/platform/Errno;)V
38: aload 0
ldc "stream is not a file"
putfield org.jruby.util.io.PosixShim.errmsg:Ljava/lang/String;
39: iconst_m1
ireturn
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 40 0 this Lorg/jruby/util/io/PosixShim;
0 40 1 fd Lorg/jruby/util/io/ChannelFD;
0 40 2 lockMode I
2 40 3 real_fd I
4 8 4 result I
10 37 4 ret I
31 33 5 ioe Ljava/io/IOException;
Exception table:
from to target type
13 14 28 any
15 17 28 any
18 19 28 any
20 21 28 any
22 23 28 any
24 25 28 any
26 27 28 any
28 29 28 any
12 14 30 Class java.io.IOException
15 17 30 Class java.io.IOException
18 19 30 Class java.io.IOException
20 21 30 Class java.io.IOException
22 23 30 Class java.io.IOException
24 25 30 Class java.io.IOException
26 30 30 Class java.io.IOException
12 14 33 Class java.nio.channels.OverlappingFileLockException
15 17 33 Class java.nio.channels.OverlappingFileLockException
18 19 33 Class java.nio.channels.OverlappingFileLockException
20 21 33 Class java.nio.channels.OverlappingFileLockException
22 23 33 Class java.nio.channels.OverlappingFileLockException
24 25 33 Class java.nio.channels.OverlappingFileLockException
26 30 33 Class java.nio.channels.OverlappingFileLockException
MethodParameters:
Name Flags
fd
lockMode
public int dup2(org.jruby.util.io.ChannelFD, org.jruby.util.io.ChannelFD);
descriptor: (Lorg/jruby/util/io/ChannelFD;Lorg/jruby/util/io/ChannelFD;)I
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=3, args_size=3
start local 0 start local 1 start local 2 0: aload 2
aload 0
getfield org.jruby.util.io.PosixShim.posix:Ljnr/posix/POSIX;
aload 1
invokevirtual org.jruby.util.io.ChannelFD.dup2From:(Ljnr/posix/POSIX;Lorg/jruby/util/io/ChannelFD;)I
ireturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/jruby/util/io/PosixShim;
0 1 1 filedes Lorg/jruby/util/io/ChannelFD;
0 1 2 filedes2 Lorg/jruby/util/io/ChannelFD;
MethodParameters:
Name Flags
filedes
filedes2
public int close(org.jruby.util.io.ChannelFD);
descriptor: (Lorg/jruby/util/io/ChannelFD;)I
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: aload 0
aload 1
invokevirtual org.jruby.util.io.PosixShim.close:(Ljava/io/Closeable;)I
ireturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/jruby/util/io/PosixShim;
0 1 1 fd Lorg/jruby/util/io/ChannelFD;
MethodParameters:
Name Flags
fd
public int close(java.io.Closeable);
descriptor: (Ljava/io/Closeable;)I
flags: (0x0001) ACC_PUBLIC
Code:
stack=5, locals=4, args_size=2
start local 0 start local 1 0: aload 0
invokevirtual org.jruby.util.io.PosixShim.clear:()V
1: aload 1
invokeinterface java.io.Closeable.close:()V
2: iconst_0
ireturn
3: StackMap locals:
StackMap stack: java.io.IOException
astore 2
start local 2 4: aload 2
invokestatic org.jruby.runtime.Helpers.errnoFromException:(Ljava/lang/Throwable;)Ljnr/constants/platform/Errno;
astore 3
start local 3 5: aload 3
ifnonnull 7
6: new java.lang.RuntimeException
dup
new java.lang.StringBuilder
dup
ldc "unknown IOException: "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 2
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/Object;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokespecial java.lang.RuntimeException.<init>:(Ljava/lang/String;)V
athrow
7: StackMap locals: java.io.IOException jnr.constants.platform.Errno
StackMap stack:
aload 0
aload 3
invokevirtual org.jruby.util.io.PosixShim.setErrno:(Ljnr/constants/platform/Errno;)V
8: iconst_m1
ireturn
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 9 0 this Lorg/jruby/util/io/PosixShim;
0 9 1 closeable Ljava/io/Closeable;
4 9 2 ioe Ljava/io/IOException;
5 9 3 errno Ljnr/constants/platform/Errno;
Exception table:
from to target type
1 2 3 Class java.io.IOException
MethodParameters:
Name Flags
closeable
public java.nio.channels.Channel[] pipe();
descriptor: ()[Ljava/nio/channels/Channel;
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=6, args_size=1
start local 0 0: aload 0
invokevirtual org.jruby.util.io.PosixShim.clear:()V
1: invokestatic java.nio.channels.Pipe.open:()Ljava/nio/channels/Pipe;
astore 1
start local 1 2: aload 1
invokevirtual java.nio.channels.Pipe.source:()Ljava/nio/channels/Pipe$SourceChannel;
astore 2
start local 2 3: aload 1
invokevirtual java.nio.channels.Pipe.sink:()Ljava/nio/channels/Pipe$SinkChannel;
astore 3
start local 3 4: aload 0
getfield org.jruby.util.io.PosixShim.posix:Ljnr/posix/POSIX;
invokeinterface jnr.posix.POSIX.isNative:()Z
ifeq 9
getstatic org.jruby.platform.Platform.IS_WINDOWS:Z
ifne 9
5: aload 2
invokestatic org.jruby.util.io.FilenoUtil.filenoFrom:(Ljava/nio/channels/Channel;)I
istore 4
start local 4 6: aload 3
invokestatic org.jruby.util.io.FilenoUtil.filenoFrom:(Ljava/nio/channels/Channel;)I
istore 5
start local 5 7: aload 0
iload 4
iconst_1
invokevirtual org.jruby.util.io.PosixShim.setCloexec:(IZ)I
pop
8: aload 0
iload 5
iconst_1
invokevirtual org.jruby.util.io.PosixShim.setCloexec:(IZ)I
pop
end local 5 end local 4 9: StackMap locals: java.nio.channels.Pipe java.nio.channels.Channel java.nio.channels.Channel
StackMap stack:
iconst_2
anewarray java.nio.channels.Channel
dup
iconst_0
aload 2
aastore
dup
iconst_1
aload 3
aastore
10: areturn
end local 3 end local 2 end local 1 11: StackMap locals: org.jruby.util.io.PosixShim
StackMap stack: java.io.IOException
astore 1
start local 1 12: aload 0
aload 1
invokestatic org.jruby.runtime.Helpers.errnoFromException:(Ljava/lang/Throwable;)Ljnr/constants/platform/Errno;
invokevirtual org.jruby.util.io.PosixShim.setErrno:(Ljnr/constants/platform/Errno;)V
13: aconst_null
areturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 14 0 this Lorg/jruby/util/io/PosixShim;
2 11 1 pipe Ljava/nio/channels/Pipe;
3 11 2 source Ljava/nio/channels/Channel;
4 11 3 sink Ljava/nio/channels/Channel;
6 9 4 read I
7 9 5 write I
12 14 1 ioe Ljava/io/IOException;
Exception table:
from to target type
1 10 11 Class java.io.IOException
public jnr.constants.platform.Errno getErrno();
descriptor: ()Ljnr/constants/platform/Errno;
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
getfield org.jruby.util.io.PosixShim.errno:Ljava/lang/ThreadLocal;
invokevirtual java.lang.ThreadLocal.get:()Ljava/lang/Object;
checkcast jnr.constants.platform.Errno
areturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/jruby/util/io/PosixShim;
public void setErrno(jnr.constants.platform.Errno);
descriptor: (Ljnr/constants/platform/Errno;)V
flags: (0x0001) ACC_PUBLIC
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: aload 0
getfield org.jruby.util.io.PosixShim.errno:Ljava/lang/ThreadLocal;
aload 1
invokevirtual java.lang.ThreadLocal.set:(Ljava/lang/Object;)V
1: return
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 2 0 this Lorg/jruby/util/io/PosixShim;
0 2 1 errno Ljnr/constants/platform/Errno;
MethodParameters:
Name Flags
errno
public int setCloexec(int, boolean);
descriptor: (IZ)I
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=4, args_size=3
start local 0 start local 1 start local 2 0: aload 0
getfield org.jruby.util.io.PosixShim.posix:Ljnr/posix/POSIX;
iload 1
getstatic jnr.constants.platform.Fcntl.F_GETFD:Ljnr/constants/platform/Fcntl;
invokeinterface jnr.posix.POSIX.fcntl:(ILjnr/constants/platform/Fcntl;)I
istore 3
start local 3 1: iload 3
iconst_m1
if_icmpne 4
2: aload 0
aload 0
getfield org.jruby.util.io.PosixShim.posix:Ljnr/posix/POSIX;
invokeinterface jnr.posix.POSIX.errno:()I
i2l
invokestatic jnr.constants.platform.Errno.valueOf:(J)Ljnr/constants/platform/Errno;
invokevirtual org.jruby.util.io.PosixShim.setErrno:(Ljnr/constants/platform/Errno;)V
3: iconst_m1
ireturn
4: StackMap locals: int
StackMap stack:
iload 2
ifeq 5
iload 3
iconst_1
iand
iconst_1
if_icmpeq 6
5: StackMap locals:
StackMap stack:
iload 2
ifne 7
iload 3
iconst_1
iand
ifne 7
6: StackMap locals:
StackMap stack:
iconst_0
ireturn
7: StackMap locals:
StackMap stack:
iload 2
ifeq 9
8: iload 3
iconst_1
ior
goto 10
9: StackMap locals:
StackMap stack:
iload 3
bipush -2
iand
10: StackMap locals:
StackMap stack: int
istore 3
11: aload 0
getfield org.jruby.util.io.PosixShim.posix:Ljnr/posix/POSIX;
iload 1
getstatic jnr.constants.platform.Fcntl.F_SETFD:Ljnr/constants/platform/Fcntl;
iload 3
invokeinterface jnr.posix.POSIX.fcntlInt:(ILjnr/constants/platform/Fcntl;I)I
istore 3
12: iload 3
iconst_m1
if_icmpne 13
aload 0
aload 0
getfield org.jruby.util.io.PosixShim.posix:Ljnr/posix/POSIX;
invokeinterface jnr.posix.POSIX.errno:()I
i2l
invokestatic jnr.constants.platform.Errno.valueOf:(J)Ljnr/constants/platform/Errno;
invokevirtual org.jruby.util.io.PosixShim.setErrno:(Ljnr/constants/platform/Errno;)V
13: StackMap locals:
StackMap stack:
iload 3
ireturn
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 14 0 this Lorg/jruby/util/io/PosixShim;
0 14 1 fd I
0 14 2 cloexec Z
1 14 3 ret I
MethodParameters:
Name Flags
fd
cloexec
public int fcntlSetFD(int, int);
descriptor: (II)I
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=4, args_size=3
start local 0 start local 1 start local 2 0: aload 0
getfield org.jruby.util.io.PosixShim.posix:Ljnr/posix/POSIX;
iload 1
getstatic jnr.constants.platform.Fcntl.F_SETFD:Ljnr/constants/platform/Fcntl;
iload 2
invokeinterface jnr.posix.POSIX.fcntlInt:(ILjnr/constants/platform/Fcntl;I)I
istore 3
start local 3 1: iload 3
iconst_m1
if_icmpne 2
aload 0
aload 0
getfield org.jruby.util.io.PosixShim.posix:Ljnr/posix/POSIX;
invokeinterface jnr.posix.POSIX.errno:()I
i2l
invokestatic jnr.constants.platform.Errno.valueOf:(J)Ljnr/constants/platform/Errno;
invokevirtual org.jruby.util.io.PosixShim.setErrno:(Ljnr/constants/platform/Errno;)V
2: StackMap locals: int
StackMap stack:
iload 3
ireturn
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lorg/jruby/util/io/PosixShim;
0 3 1 fd I
0 3 2 flags I
1 3 3 ret I
MethodParameters:
Name Flags
fd
flags
public int fcntlGetFD(int);
descriptor: (I)I
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=3, args_size=2
start local 0 start local 1 0: aload 0
getfield org.jruby.util.io.PosixShim.posix:Ljnr/posix/POSIX;
iload 1
getstatic jnr.constants.platform.Fcntl.F_GETFD:Ljnr/constants/platform/Fcntl;
invokeinterface jnr.posix.POSIX.fcntl:(ILjnr/constants/platform/Fcntl;)I
istore 2
start local 2 1: iload 2
iconst_m1
if_icmpne 3
2: aload 0
aload 0
getfield org.jruby.util.io.PosixShim.posix:Ljnr/posix/POSIX;
invokeinterface jnr.posix.POSIX.errno:()I
i2l
invokestatic jnr.constants.platform.Errno.valueOf:(J)Ljnr/constants/platform/Errno;
invokevirtual org.jruby.util.io.PosixShim.setErrno:(Ljnr/constants/platform/Errno;)V
3: StackMap locals: int
StackMap stack:
iload 2
ireturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 this Lorg/jruby/util/io/PosixShim;
0 4 1 fd I
1 4 2 ret I
MethodParameters:
Name Flags
fd
public java.nio.channels.Channel open(java.lang.String, java.lang.String, int, int);
descriptor: (Ljava/lang/String;Ljava/lang/String;II)Ljava/nio/channels/Channel;
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=6, args_size=5
start local 0 start local 1 start local 2 start local 3 start local 4 0: getstatic org.jruby.platform.Platform.IS_WINDOWS:Z
ifeq 2
aload 2
ldc "/dev/null"
invokevirtual java.lang.String.equals:(Ljava/lang/Object;)Z
ifne 1
aload 2
ldc "nul"
invokevirtual java.lang.String.equalsIgnoreCase:(Ljava/lang/String;)Z
ifeq 2
1: StackMap locals:
StackMap stack:
ldc "NUL:"
astore 2
2: StackMap locals:
StackMap stack:
aload 0
getfield org.jruby.util.io.PosixShim.runtime:Lorg/jruby/Ruby;
aload 1
aload 2
invokestatic org.jruby.util.JRubyFile.createResource:(Lorg/jruby/Ruby;Ljava/lang/String;Ljava/lang/String;)Lorg/jruby/util/FileResource;
iload 3
iload 4
invokeinterface org.jruby.util.FileResource.openChannel:(II)Ljava/nio/channels/Channel;
3: areturn
4: StackMap locals:
StackMap stack: org.jruby.util.ResourceException$FileExists
pop
5: aload 0
getstatic jnr.constants.platform.Errno.EEXIST:Ljnr/constants/platform/Errno;
invokevirtual org.jruby.util.io.PosixShim.setErrno:(Ljnr/constants/platform/Errno;)V
goto 20
6: StackMap locals:
StackMap stack: org.jruby.util.ResourceException$FileIsDirectory
pop
7: aload 0
getstatic jnr.constants.platform.Errno.EISDIR:Ljnr/constants/platform/Errno;
invokevirtual org.jruby.util.io.PosixShim.setErrno:(Ljnr/constants/platform/Errno;)V
goto 20
8: StackMap locals:
StackMap stack: org.jruby.util.ResourceException$FileIsNotDirectory
pop
9: aload 0
getstatic jnr.constants.platform.Errno.ENOTDIR:Ljnr/constants/platform/Errno;
invokevirtual org.jruby.util.io.PosixShim.setErrno:(Ljnr/constants/platform/Errno;)V
goto 20
10: StackMap locals:
StackMap stack: org.jruby.util.ResourceException$NotFound
pop
11: aload 0
getstatic jnr.constants.platform.Errno.ENOENT:Ljnr/constants/platform/Errno;
invokevirtual org.jruby.util.io.PosixShim.setErrno:(Ljnr/constants/platform/Errno;)V
goto 20
12: StackMap locals:
StackMap stack: org.jruby.util.ResourceException$PermissionDenied
pop
13: aload 0
getstatic jnr.constants.platform.Errno.EACCES:Ljnr/constants/platform/Errno;
invokevirtual org.jruby.util.io.PosixShim.setErrno:(Ljnr/constants/platform/Errno;)V
goto 20
14: StackMap locals:
StackMap stack: org.jruby.util.ResourceException$TooManySymlinks
pop
15: aload 0
getstatic jnr.constants.platform.Errno.ELOOP:Ljnr/constants/platform/Errno;
invokevirtual org.jruby.util.io.PosixShim.setErrno:(Ljnr/constants/platform/Errno;)V
goto 20
16: StackMap locals:
StackMap stack: org.jruby.util.ResourceException
astore 5
start local 5 17: aload 5
aload 0
getfield org.jruby.util.io.PosixShim.runtime:Lorg/jruby/Ruby;
invokevirtual org.jruby.util.ResourceException.newRaiseException:(Lorg/jruby/Ruby;)Lorg/jruby/exceptions/RaiseException;
athrow
end local 5 18: StackMap locals:
StackMap stack: java.io.IOException
astore 5
start local 5 19: aload 0
getfield org.jruby.util.io.PosixShim.runtime:Lorg/jruby/Ruby;
aload 5
invokevirtual org.jruby.Ruby.newIOErrorFromException:(Ljava/io/IOException;)Lorg/jruby/exceptions/RaiseException;
athrow
end local 5 20: StackMap locals:
StackMap stack:
aconst_null
areturn
end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 21 0 this Lorg/jruby/util/io/PosixShim;
0 21 1 cwd Ljava/lang/String;
0 21 2 path Ljava/lang/String;
0 21 3 flags I
0 21 4 perm I
17 18 5 ex Lorg/jruby/util/ResourceException;
19 20 5 ex Ljava/io/IOException;
Exception table:
from to target type
2 3 4 Class org.jruby.util.ResourceException$FileExists
2 3 6 Class org.jruby.util.ResourceException$FileIsDirectory
2 3 8 Class org.jruby.util.ResourceException$FileIsNotDirectory
2 3 10 Class org.jruby.util.ResourceException$NotFound
2 3 12 Class org.jruby.util.ResourceException$PermissionDenied
2 3 14 Class org.jruby.util.ResourceException$TooManySymlinks
2 3 16 Class org.jruby.util.ResourceException
2 3 18 Class java.io.IOException
MethodParameters:
Name Flags
cwd
path
flags
perm
public java.nio.channels.Channel open(java.lang.String, java.lang.String, org.jruby.util.io.ModeFlags, int);
descriptor: (Ljava/lang/String;Ljava/lang/String;Lorg/jruby/util/io/ModeFlags;I)Ljava/nio/channels/Channel;
flags: (0x0001) ACC_PUBLIC
Code:
stack=5, locals=5, args_size=5
start local 0 start local 1 start local 2 start local 3 start local 4 0: aload 0
aload 1
aload 2
aload 3
iload 4
invokevirtual org.jruby.util.io.PosixShim.open:(Ljava/lang/String;Ljava/lang/String;Lorg/jruby/util/io/ModeFlags;I)Ljava/nio/channels/Channel;
areturn
end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lorg/jruby/util/io/PosixShim;
0 1 1 cwd Ljava/lang/String;
0 1 2 path Ljava/lang/String;
0 1 3 flags Lorg/jruby/util/io/ModeFlags;
0 1 4 perm I
MethodParameters:
Name Flags
cwd
path
flags
perm
public java.nio.channels.Channel open(java.lang.String, java.lang.String, org.jruby.util.io.ModeFlags, int, java.lang.ClassLoader);
descriptor: (Ljava/lang/String;Ljava/lang/String;Lorg/jruby/util/io/ModeFlags;ILjava/lang/ClassLoader;)Ljava/nio/channels/Channel;
flags: (0x0001) ACC_PUBLIC
Code:
stack=5, locals=6, args_size=6
start local 0 start local 1 start local 2 start local 3 start local 4 start local 5 0: aload 2
ldc "classpath:/"
invokevirtual java.lang.String.startsWith:(Ljava/lang/String;)Z
ifeq 3
aload 5
ifnull 3
1: aload 2
ldc "classpath:/"
invokevirtual java.lang.String.length:()I
invokevirtual java.lang.String.substring:(I)Ljava/lang/String;
astore 2
2: aload 5
aload 2
invokevirtual java.lang.ClassLoader.getResourceAsStream:(Ljava/lang/String;)Ljava/io/InputStream;
invokestatic java.nio.channels.Channels.newChannel:(Ljava/io/InputStream;)Ljava/nio/channels/ReadableByteChannel;
areturn
3: StackMap locals:
StackMap stack:
aload 0
aload 1
aload 2
aload 3
iload 4
invokevirtual org.jruby.util.io.PosixShim.open:(Ljava/lang/String;Ljava/lang/String;Lorg/jruby/util/io/ModeFlags;I)Ljava/nio/channels/Channel;
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 4 0 this Lorg/jruby/util/io/PosixShim;
0 4 1 cwd Ljava/lang/String;
0 4 2 path Ljava/lang/String;
0 4 3 flags Lorg/jruby/util/io/ModeFlags;
0 4 4 perm I
0 4 5 classLoader Ljava/lang/ClassLoader;
RuntimeVisibleAnnotations:
java.lang.Deprecated()
MethodParameters:
Name Flags
cwd
path
flags
perm
classLoader
public static int umask(jnr.posix.POSIX);
descriptor: (Ljnr/posix/POSIX;)I
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=2, locals=3, args_size=1
start local 0 0: getstatic org.jruby.util.io.PosixShim._umaskLock:Ljava/lang/Object;
dup
astore 1
monitorenter
1: aload 0
getstatic org.jruby.util.io.PosixShim._cachedUmask:I
invokeinterface jnr.posix.POSIX.umask:(I)I
istore 2
start local 2 2: getstatic org.jruby.util.io.PosixShim._cachedUmask:I
iload 2
if_icmpeq 5
3: aload 0
iload 2
invokeinterface jnr.posix.POSIX.umask:(I)I
pop
4: iload 2
putstatic org.jruby.util.io.PosixShim._cachedUmask:I
5: StackMap locals: java.lang.Object int
StackMap stack:
iload 2
aload 1
monitorexit
6: ireturn
end local 2 7: StackMap locals: jnr.posix.POSIX java.lang.Object
StackMap stack: java.lang.Throwable
aload 1
monitorexit
8: athrow
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 9 0 posix Ljnr/posix/POSIX;
2 7 2 umask I
Exception table:
from to target type
1 6 7 any
7 8 7 any
MethodParameters:
Name Flags
posix
public static int umask(jnr.posix.POSIX, int);
descriptor: (Ljnr/posix/POSIX;I)I
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=2, locals=4, args_size=2
start local 0 start local 1 0: getstatic org.jruby.util.io.PosixShim._umaskLock:Ljava/lang/Object;
dup
astore 3
monitorenter
1: aload 0
iload 1
invokeinterface jnr.posix.POSIX.umask:(I)I
istore 2
start local 2 2: iload 1
putstatic org.jruby.util.io.PosixShim._cachedUmask:I
3: aload 3
monitorexit
4: goto 7
end local 2 StackMap locals: jnr.posix.POSIX int top java.lang.Object
StackMap stack: java.lang.Throwable
5: aload 3
monitorexit
6: athrow
start local 2 7: StackMap locals: jnr.posix.POSIX int int
StackMap stack:
iload 2
ireturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 8 0 posix Ljnr/posix/POSIX;
0 8 1 newMask I
2 5 2 oldMask I
7 8 2 oldMask I
Exception table:
from to target type
1 4 5 any
5 6 5 any
MethodParameters:
Name Flags
posix
newMask
public int ftruncate(org.jruby.util.io.ChannelFD, long);
descriptor: (Lorg/jruby/util/io/ChannelFD;J)I
flags: (0x0001) ACC_PUBLIC
Code:
stack=4, locals=5, args_size=3
start local 0 start local 1 start local 2 0: aload 1
getfield org.jruby.util.io.ChannelFD.chNative:Ljnr/enxio/channels/NativeSelectableChannel;
ifnull 4
1: aload 0
getfield org.jruby.util.io.PosixShim.posix:Ljnr/posix/POSIX;
aload 1
getfield org.jruby.util.io.ChannelFD.chNative:Ljnr/enxio/channels/NativeSelectableChannel;
invokeinterface jnr.enxio.channels.NativeSelectableChannel.getFD:()I
lload 2
invokeinterface jnr.posix.POSIX.ftruncate:(IJ)I
istore 4
start local 4 2: iload 4
iconst_m1
if_icmpne 3
aload 0
aload 0
getfield org.jruby.util.io.PosixShim.posix:Ljnr/posix/POSIX;
invokeinterface jnr.posix.POSIX.errno:()I
i2l
invokestatic jnr.constants.platform.Errno.valueOf:(J)Ljnr/constants/platform/Errno;
invokevirtual org.jruby.util.io.PosixShim.setErrno:(Ljnr/constants/platform/Errno;)V
3: StackMap locals: int
StackMap stack:
iload 4
ireturn
end local 4 4: StackMap locals:
StackMap stack:
aload 1
getfield org.jruby.util.io.ChannelFD.chFile:Ljava/nio/channels/FileChannel;
ifnull 10
5: aload 1
getfield org.jruby.util.io.ChannelFD.chFile:Ljava/nio/channels/FileChannel;
lload 2
invokevirtual java.nio.channels.FileChannel.truncate:(J)Ljava/nio/channels/FileChannel;
pop
6: goto 12
StackMap locals:
StackMap stack: java.io.IOException
7: astore 4
start local 4 8: aload 0
aload 4
invokestatic org.jruby.runtime.Helpers.errnoFromException:(Ljava/lang/Throwable;)Ljnr/constants/platform/Errno;
invokevirtual org.jruby.util.io.PosixShim.setErrno:(Ljnr/constants/platform/Errno;)V
9: iconst_m1
ireturn
end local 4 10: StackMap locals:
StackMap stack:
aload 0
getstatic jnr.constants.platform.Errno.EINVAL:Ljnr/constants/platform/Errno;
invokevirtual org.jruby.util.io.PosixShim.setErrno:(Ljnr/constants/platform/Errno;)V
11: iconst_m1
ireturn
12: StackMap locals:
StackMap stack:
iconst_0
ireturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 13 0 this Lorg/jruby/util/io/PosixShim;
0 13 1 fd Lorg/jruby/util/io/ChannelFD;
0 13 2 pos J
2 4 4 ret I
8 10 4 ioe Ljava/io/IOException;
Exception table:
from to target type
5 6 7 Class java.io.IOException
MethodParameters:
Name Flags
fd
pos
public long size(org.jruby.util.io.ChannelFD);
descriptor: (Lorg/jruby/util/io/ChannelFD;)J
flags: (0x0001) ACC_PUBLIC
Code:
stack=3, locals=4, args_size=2
start local 0 start local 1 0: aload 1
getfield org.jruby.util.io.ChannelFD.chNative:Ljnr/enxio/channels/NativeSelectableChannel;
ifnull 7
1: aload 0
getfield org.jruby.util.io.PosixShim.posix:Ljnr/posix/POSIX;
invokeinterface jnr.posix.POSIX.allocateStat:()Ljnr/posix/FileStat;
astore 2
start local 2 2: aload 0
getfield org.jruby.util.io.PosixShim.posix:Ljnr/posix/POSIX;
aload 1
getfield org.jruby.util.io.ChannelFD.chNative:Ljnr/enxio/channels/NativeSelectableChannel;
invokeinterface jnr.enxio.channels.NativeSelectableChannel.getFD:()I
aload 2
invokeinterface jnr.posix.POSIX.fstat:(ILjnr/posix/FileStat;)I
istore 3
start local 3 3: iload 3
iconst_m1
if_icmpne 6
4: aload 0
aload 0
getfield org.jruby.util.io.PosixShim.posix:Ljnr/posix/POSIX;
invokeinterface jnr.posix.POSIX.errno:()I
i2l
invokestatic jnr.constants.platform.Errno.valueOf:(J)Ljnr/constants/platform/Errno;
invokevirtual org.jruby.util.io.PosixShim.setErrno:(Ljnr/constants/platform/Errno;)V
5: ldc -1
lreturn
6: StackMap locals: jnr.posix.FileStat int
StackMap stack:
aload 2
invokeinterface jnr.posix.FileStat.st_size:()J
lreturn
end local 3 end local 2 7: StackMap locals:
StackMap stack:
aload 1
getfield org.jruby.util.io.ChannelFD.chSeek:Ljava/nio/channels/SeekableByteChannel;
ifnull 13
8: aload 1
getfield org.jruby.util.io.ChannelFD.chSeek:Ljava/nio/channels/SeekableByteChannel;
invokeinterface java.nio.channels.SeekableByteChannel.size:()J
9: lreturn
10: StackMap locals:
StackMap stack: java.io.IOException
astore 2
start local 2 11: aload 0
aload 2
invokestatic org.jruby.runtime.Helpers.errnoFromException:(Ljava/lang/Throwable;)Ljnr/constants/platform/Errno;
invokevirtual org.jruby.util.io.PosixShim.setErrno:(Ljnr/constants/platform/Errno;)V
12: ldc -1
lreturn
end local 2 13: StackMap locals:
StackMap stack:
aload 0
getstatic jnr.constants.platform.Errno.EINVAL:Ljnr/constants/platform/Errno;
invokevirtual org.jruby.util.io.PosixShim.setErrno:(Ljnr/constants/platform/Errno;)V
14: ldc -1
lreturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 15 0 this Lorg/jruby/util/io/PosixShim;
0 15 1 fd Lorg/jruby/util/io/ChannelFD;
2 7 2 stat Ljnr/posix/FileStat;
3 7 3 ret I
11 13 2 ioe Ljava/io/IOException;
Exception table:
from to target type
8 9 10 Class java.io.IOException
MethodParameters:
Name Flags
fd
private void clear();
descriptor: ()V
flags: (0x0002) ACC_PRIVATE
Code:
stack=2, locals=1, args_size=1
start local 0 0: aload 0
aconst_null
invokevirtual org.jruby.util.io.PosixShim.setErrno:(Ljnr/constants/platform/Errno;)V
1: aload 0
aconst_null
putfield org.jruby.util.io.PosixShim.errmsg:Ljava/lang/String;
2: return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 this Lorg/jruby/util/io/PosixShim;
private int checkSharedExclusive(org.jruby.util.io.ChannelFD, int);
descriptor: (Lorg/jruby/util/io/ChannelFD;I)I
flags: (0x0002) ACC_PRIVATE
Code:
stack=2, locals=3, args_size=3
start local 0 start local 1 start local 2 0: aload 1
getfield org.jruby.util.io.ChannelFD.chWrite:Ljava/nio/channels/WritableByteChannel;
ifnonnull 4
iload 2
iconst_2
iand
ifle 4
1: aload 0
getstatic jnr.constants.platform.Errno.EINVAL:Ljnr/constants/platform/Errno;
invokevirtual org.jruby.util.io.PosixShim.setErrno:(Ljnr/constants/platform/Errno;)V
2: aload 0
ldc "cannot acquire exclusive lock on File not opened for write"
putfield org.jruby.util.io.PosixShim.errmsg:Ljava/lang/String;
3: iconst_m1
ireturn
4: StackMap locals:
StackMap stack:
aload 1
getfield org.jruby.util.io.ChannelFD.chRead:Ljava/nio/channels/ReadableByteChannel;
ifnonnull 8
iload 2
iconst_1
iand
ifle 8
5: aload 0
getstatic jnr.constants.platform.Errno.EINVAL:Ljnr/constants/platform/Errno;
invokevirtual org.jruby.util.io.PosixShim.setErrno:(Ljnr/constants/platform/Errno;)V
6: aload 0
ldc "cannot acquire shared lock on File not opened for read"
putfield org.jruby.util.io.PosixShim.errmsg:Ljava/lang/String;
7: iconst_m1
ireturn
8: StackMap locals:
StackMap stack:
iconst_0
ireturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 9 0 this Lorg/jruby/util/io/PosixShim;
0 9 1 fd Lorg/jruby/util/io/ChannelFD;
0 9 2 lockMode I
MethodParameters:
Name Flags
fd
lockMode
private static int lockFailedReturn(int);
descriptor: (I)I
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=2, locals=1, args_size=1
start local 0 0: iload 0
iconst_2
iand
ifne 1
iconst_0
goto 2
StackMap locals:
StackMap stack:
1: iconst_m1
StackMap locals:
StackMap stack: int
2: ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 lockMode I
MethodParameters:
Name Flags
lockMode
private static boolean lockStateChanges(java.nio.channels.FileLock, int);
descriptor: (Ljava/nio/channels/FileLock;I)Z
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
Code:
stack=2, locals=2, args_size=2
start local 0 start local 1 0: aload 0
ifnonnull 4
1: iload 1
bipush 15
iand
tableswitch { // 8 - 12
8: 2
9: 3
10: 3
11: 3
12: 2
default: 3
}
2: StackMap locals:
StackMap stack:
iconst_0
ireturn
3: StackMap locals:
StackMap stack:
iconst_1
ireturn
4: StackMap locals:
StackMap stack:
iload 1
bipush 15
iand
tableswitch { // 1 - 12
1: 7
2: 6
3: 10
4: 10
5: 7
6: 6
7: 10
8: 5
9: 10
10: 10
11: 10
12: 5
default: 10
}
5: StackMap locals:
StackMap stack:
iconst_1
ireturn
6: StackMap locals:
StackMap stack:
aload 0
invokevirtual java.nio.channels.FileLock.isShared:()Z
ireturn
7: StackMap locals:
StackMap stack:
aload 0
invokevirtual java.nio.channels.FileLock.isShared:()Z
ifeq 8
iconst_0
goto 9
StackMap locals:
StackMap stack:
8: iconst_1
StackMap locals:
StackMap stack: int
9: ireturn
10: StackMap locals:
StackMap stack:
iconst_0
ireturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 11 0 lock Ljava/nio/channels/FileLock;
0 11 1 lockMode I
MethodParameters:
Name Flags
lock
lockMode
private int unlock(org.jruby.util.io.ChannelFD);
descriptor: (Lorg/jruby/util/io/ChannelFD;)I
flags: (0x0002) ACC_PRIVATE
Code:
stack=1, locals=3, args_size=2
start local 0 start local 1 0: aload 1
getfield org.jruby.util.io.ChannelFD.currentLock:Ljava/lang/ThreadLocal;
invokevirtual java.lang.ThreadLocal.get:()Ljava/lang/Object;
checkcast java.nio.channels.FileLock
astore 2
start local 2 1: aload 2
ifnull 5
2: aload 2
invokevirtual java.nio.channels.FileLock.release:()V
3: aload 1
getfield org.jruby.util.io.ChannelFD.currentLock:Ljava/lang/ThreadLocal;
invokevirtual java.lang.ThreadLocal.remove:()V
4: iconst_0
ireturn
5: StackMap locals: java.nio.channels.FileLock
StackMap stack:
iconst_m1
ireturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 this Lorg/jruby/util/io/PosixShim;
0 6 1 fd Lorg/jruby/util/io/ChannelFD;
1 6 2 fileLock Ljava/nio/channels/FileLock;
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
fd
private int lock(org.jruby.util.io.ChannelFD, boolean);
descriptor: (Lorg/jruby/util/io/ChannelFD;Z)I
flags: (0x0002) ACC_PRIVATE
Code:
stack=6, locals=4, args_size=3
start local 0 start local 1 start local 2 0: aload 1
getfield org.jruby.util.io.ChannelFD.currentLock:Ljava/lang/ThreadLocal;
invokevirtual java.lang.ThreadLocal.get:()Ljava/lang/Object;
checkcast java.nio.channels.FileLock
astore 3
start local 3 1: aload 3
ifnull 2
aload 3
invokevirtual java.nio.channels.FileLock.release:()V
2: StackMap locals: java.nio.channels.FileLock
StackMap stack:
aload 1
getfield org.jruby.util.io.ChannelFD.chFile:Ljava/nio/channels/FileChannel;
lconst_0
ldc 9223372036854775807
iload 2
ifeq 3
iconst_0
goto 4
StackMap locals: org.jruby.util.io.PosixShim org.jruby.util.io.ChannelFD int java.nio.channels.FileLock
StackMap stack: java.nio.channels.FileChannel long long
3: iconst_1
StackMap locals: org.jruby.util.io.PosixShim org.jruby.util.io.ChannelFD int java.nio.channels.FileLock
StackMap stack: java.nio.channels.FileChannel long long int
4: invokevirtual java.nio.channels.FileChannel.lock:(JJZ)Ljava/nio/channels/FileLock;
astore 3
5: aload 1
getfield org.jruby.util.io.ChannelFD.currentLock:Ljava/lang/ThreadLocal;
aload 3
invokevirtual java.lang.ThreadLocal.set:(Ljava/lang/Object;)V
6: aload 3
ifnull 8
7: iconst_0
ireturn
8: StackMap locals:
StackMap stack:
iload 2
ifeq 9
iconst_2
goto 10
StackMap locals:
StackMap stack:
9: iconst_1
StackMap locals:
StackMap stack: int
10: invokestatic org.jruby.util.io.PosixShim.lockFailedReturn:(I)I
ireturn
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 11 0 this Lorg/jruby/util/io/PosixShim;
0 11 1 fd Lorg/jruby/util/io/ChannelFD;
0 11 2 exclusive Z
1 11 3 fileLock Ljava/nio/channels/FileLock;
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
fd
exclusive
private int tryLock(org.jruby.util.io.ChannelFD, boolean);
descriptor: (Lorg/jruby/util/io/ChannelFD;Z)I
flags: (0x0002) ACC_PRIVATE
Code:
stack=6, locals=4, args_size=3
start local 0 start local 1 start local 2 0: aload 1
getfield org.jruby.util.io.ChannelFD.currentLock:Ljava/lang/ThreadLocal;
invokevirtual java.lang.ThreadLocal.get:()Ljava/lang/Object;
checkcast java.nio.channels.FileLock
astore 3
start local 3 1: aload 3
ifnull 2
aload 3
invokevirtual java.nio.channels.FileLock.release:()V
2: StackMap locals: java.nio.channels.FileLock
StackMap stack:
aload 1
getfield org.jruby.util.io.ChannelFD.chFile:Ljava/nio/channels/FileChannel;
lconst_0
ldc 9223372036854775807
iload 2
ifeq 3
iconst_0
goto 4
StackMap locals: org.jruby.util.io.PosixShim org.jruby.util.io.ChannelFD int java.nio.channels.FileLock
StackMap stack: java.nio.channels.FileChannel long long
3: iconst_1
StackMap locals: org.jruby.util.io.PosixShim org.jruby.util.io.ChannelFD int java.nio.channels.FileLock
StackMap stack: java.nio.channels.FileChannel long long int
4: invokevirtual java.nio.channels.FileChannel.tryLock:(JJZ)Ljava/nio/channels/FileLock;
astore 3
5: aload 1
getfield org.jruby.util.io.ChannelFD.currentLock:Ljava/lang/ThreadLocal;
aload 3
invokevirtual java.lang.ThreadLocal.set:(Ljava/lang/Object;)V
6: aload 3
ifnull 8
7: iconst_0
ireturn
8: StackMap locals:
StackMap stack:
iload 2
ifeq 9
iconst_2
goto 10
StackMap locals:
StackMap stack:
9: iconst_1
StackMap locals:
StackMap stack: int
10: invokestatic org.jruby.util.io.PosixShim.lockFailedReturn:(I)I
ireturn
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 11 0 this Lorg/jruby/util/io/PosixShim;
0 11 1 fd Lorg/jruby/util/io/ChannelFD;
0 11 2 exclusive Z
1 11 3 fileLock Ljava/nio/channels/FileLock;
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
fd
exclusive
}
SourceFile: "PosixShim.java"
NestMembers:
org.jruby.util.io.PosixShim$BSDWaitMacros org.jruby.util.io.PosixShim$LinuxWaitMacros org.jruby.util.io.PosixShim$WaitMacros
InnerClasses:
public abstract SinkChannel = java.nio.channels.Pipe$SinkChannel of java.nio.channels.Pipe
public abstract SourceChannel = java.nio.channels.Pipe$SourceChannel of java.nio.channels.Pipe
public FileExists = org.jruby.util.ResourceException$FileExists of org.jruby.util.ResourceException
public FileIsDirectory = org.jruby.util.ResourceException$FileIsDirectory of org.jruby.util.ResourceException
public FileIsNotDirectory = org.jruby.util.ResourceException$FileIsNotDirectory of org.jruby.util.ResourceException
public NotFound = org.jruby.util.ResourceException$NotFound of org.jruby.util.ResourceException
public PermissionDenied = org.jruby.util.ResourceException$PermissionDenied of org.jruby.util.ResourceException
public TooManySymlinks = org.jruby.util.ResourceException$TooManySymlinks of org.jruby.util.ResourceException
public BSDWaitMacros = org.jruby.util.io.PosixShim$BSDWaitMacros of org.jruby.util.io.PosixShim
public LinuxWaitMacros = org.jruby.util.io.PosixShim$LinuxWaitMacros of org.jruby.util.io.PosixShim
public abstract WaitMacros = org.jruby.util.io.PosixShim$WaitMacros of org.jruby.util.io.PosixShim