public final class jdk.nashorn.internal.codegen.DumpBytecode
minor version: 0
major version: 59
flags: flags: (0x0031) ACC_PUBLIC, ACC_FINAL, ACC_SUPER
this_class: jdk.nashorn.internal.codegen.DumpBytecode
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 Ljdk/nashorn/internal/codegen/DumpBytecode;
public static void dumpBytecode(jdk.nashorn.internal.runtime.ScriptEnvironment, jdk.nashorn.internal.runtime.logging.DebugLogger, byte[], java.lang.String);
descriptor: (Ljdk/nashorn/internal/runtime/ScriptEnvironment;Ljdk/nashorn/internal/runtime/logging/DebugLogger;[BLjava/lang/String;)V
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=9, locals=14, args_size=4
start local 0 start local 1 start local 2 start local 3 0: aconst_null
astore 4
start local 4 1: aload 0
getfield jdk.nashorn.internal.runtime.ScriptEnvironment._print_code:Z
ifeq 33
2: new java.lang.StringBuilder
dup
invokespecial java.lang.StringBuilder.<init>:()V
astore 5
start local 5 3: aload 5
ldc "class: "
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
aload 3
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
4: bipush 10
invokevirtual java.lang.StringBuilder.append:(C)Ljava/lang/StringBuilder;
5: aload 2
invokestatic jdk.nashorn.internal.codegen.ClassEmitter.disassemble:([B)Ljava/lang/String;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
6: ldc "====="
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
pop
7: aload 0
getfield jdk.nashorn.internal.runtime.ScriptEnvironment._print_code_dir:Ljava/lang/String;
ifnull 32
8: aload 3
astore 6
start local 6 9: aload 6
bipush 36
invokevirtual java.lang.String.lastIndexOf:(I)I
istore 7
start local 7 10: iload 7
iconst_m1
if_icmpeq 12
11: aload 6
iload 7
iconst_1
iadd
invokevirtual java.lang.String.substring:(I)Ljava/lang/String;
astore 6
12: StackMap locals: jdk.nashorn.internal.runtime.ScriptEnvironment jdk.nashorn.internal.runtime.logging.DebugLogger byte[] java.lang.String java.io.File java.lang.StringBuilder java.lang.String int
StackMap stack:
new java.io.File
dup
aload 0
getfield jdk.nashorn.internal.runtime.ScriptEnvironment._print_code_dir:Ljava/lang/String;
invokespecial java.io.File.<init>:(Ljava/lang/String;)V
astore 4
13: aload 4
invokevirtual java.io.File.exists:()Z
ifne 15
aload 4
invokevirtual java.io.File.mkdirs:()Z
ifne 15
14: new java.io.IOException
dup
aload 4
invokevirtual java.io.File.toString:()Ljava/lang/String;
invokespecial java.io.IOException.<init>:(Ljava/lang/String;)V
athrow
15: StackMap locals:
StackMap stack:
iconst_0
istore 10
start local 10 16: StackMap locals: jdk.nashorn.internal.runtime.ScriptEnvironment jdk.nashorn.internal.runtime.logging.DebugLogger byte[] java.lang.String java.io.File java.lang.StringBuilder java.lang.String int top top int
StackMap stack:
new java.lang.StringBuilder
dup
aload 6
invokestatic java.lang.String.valueOf:(Ljava/lang/Object;)Ljava/lang/String;
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
iload 10
ifne 17
ldc ""
goto 18
StackMap locals:
StackMap stack: java.lang.StringBuilder
17: new java.lang.StringBuilder
dup
ldc "_"
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
iload 10
invokevirtual java.lang.StringBuilder.append:(I)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
StackMap locals: jdk.nashorn.internal.runtime.ScriptEnvironment jdk.nashorn.internal.runtime.logging.DebugLogger byte[] java.lang.String java.io.File java.lang.StringBuilder java.lang.String int top top int
StackMap stack: java.lang.StringBuilder java.lang.String
18: invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
ldc ".bytecode"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
astore 9
start local 9 19: new java.io.File
dup
aload 0
getfield jdk.nashorn.internal.runtime.ScriptEnvironment._print_code_dir:Ljava/lang/String;
aload 9
invokespecial java.io.File.<init>:(Ljava/lang/String;Ljava/lang/String;)V
astore 8
start local 8 20: iinc 10 1
21: aload 8
invokevirtual java.io.File.exists:()Z
ifne 16
22: aconst_null
astore 11
aconst_null
astore 12
23: new java.io.PrintWriter
dup
new java.io.FileOutputStream
dup
aload 8
invokespecial java.io.FileOutputStream.<init>:(Ljava/io/File;)V
invokespecial java.io.PrintWriter.<init>:(Ljava/io/OutputStream;)V
astore 13
start local 13 24: aload 13
aload 5
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokevirtual java.io.PrintWriter.print:(Ljava/lang/String;)V
25: aload 13
invokevirtual java.io.PrintWriter.flush:()V
26: aload 13
ifnull 33
aload 13
invokevirtual java.io.PrintWriter.close:()V
goto 33
StackMap locals: jdk.nashorn.internal.runtime.ScriptEnvironment jdk.nashorn.internal.runtime.logging.DebugLogger byte[] java.lang.String java.io.File java.lang.StringBuilder java.lang.String int java.io.File java.lang.String int java.lang.Throwable java.lang.Throwable java.io.PrintWriter
StackMap stack: java.lang.Throwable
27: astore 11
aload 13
ifnull 28
aload 13
invokevirtual java.io.PrintWriter.close:()V
end local 13 StackMap locals:
StackMap stack:
28: aload 11
athrow
StackMap locals:
StackMap stack: java.lang.Throwable
29: astore 12
aload 11
ifnonnull 30
aload 12
astore 11
goto 31
StackMap locals:
StackMap stack:
30: aload 11
aload 12
if_acmpeq 31
aload 11
aload 12
invokevirtual java.lang.Throwable.addSuppressed:(Ljava/lang/Throwable;)V
StackMap locals:
StackMap stack:
31: aload 11
athrow
end local 10 end local 9 end local 8 end local 7 end local 6 32: StackMap locals: jdk.nashorn.internal.runtime.ScriptEnvironment jdk.nashorn.internal.runtime.logging.DebugLogger byte[] java.lang.String java.io.File java.lang.StringBuilder
StackMap stack:
aload 0
invokevirtual jdk.nashorn.internal.runtime.ScriptEnvironment.getErr:()Ljava/io/PrintWriter;
aload 5
invokevirtual java.io.PrintWriter.println:(Ljava/lang/Object;)V
end local 5 33: StackMap locals:
StackMap stack:
aload 0
getfield jdk.nashorn.internal.runtime.ScriptEnvironment._dest_dir:Ljava/lang/String;
ifnull 62
34: new java.lang.StringBuilder
dup
aload 3
bipush 46
getstatic java.io.File.separatorChar:C
invokevirtual java.lang.String.replace:(CC)Ljava/lang/String;
invokestatic java.lang.String.valueOf:(Ljava/lang/Object;)Ljava/lang/String;
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
ldc ".class"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
astore 5
start local 5 35: aload 5
getstatic java.io.File.separatorChar:C
invokevirtual java.lang.String.lastIndexOf:(I)I
istore 6
start local 6 36: iload 6
iconst_m1
if_icmpeq 39
37: new java.io.File
dup
aload 0
getfield jdk.nashorn.internal.runtime.ScriptEnvironment._dest_dir:Ljava/lang/String;
aload 5
iconst_0
iload 6
invokevirtual java.lang.String.substring:(II)Ljava/lang/String;
invokespecial java.io.File.<init>:(Ljava/lang/String;Ljava/lang/String;)V
astore 4
38: goto 40
39: StackMap locals: java.lang.String int
StackMap stack:
new java.io.File
dup
aload 0
getfield jdk.nashorn.internal.runtime.ScriptEnvironment._dest_dir:Ljava/lang/String;
invokespecial java.io.File.<init>:(Ljava/lang/String;)V
astore 4
40: StackMap locals:
StackMap stack:
aload 4
invokevirtual java.io.File.exists:()Z
ifne 42
aload 4
invokevirtual java.io.File.mkdirs:()Z
ifne 42
41: new java.io.IOException
dup
aload 4
invokevirtual java.io.File.toString:()Ljava/lang/String;
invokespecial java.io.IOException.<init>:(Ljava/lang/String;)V
athrow
42: StackMap locals:
StackMap stack:
new java.io.File
dup
aload 0
getfield jdk.nashorn.internal.runtime.ScriptEnvironment._dest_dir:Ljava/lang/String;
aload 5
invokespecial java.io.File.<init>:(Ljava/lang/String;Ljava/lang/String;)V
astore 7
start local 7 43: aconst_null
astore 8
aconst_null
astore 9
44: new java.io.FileOutputStream
dup
aload 7
invokespecial java.io.FileOutputStream.<init>:(Ljava/io/File;)V
astore 10
start local 10 45: aload 10
aload 2
invokevirtual java.io.FileOutputStream.write:([B)V
46: aload 10
ifnull 52
aload 10
invokevirtual java.io.FileOutputStream.close:()V
goto 52
StackMap locals: jdk.nashorn.internal.runtime.ScriptEnvironment jdk.nashorn.internal.runtime.logging.DebugLogger byte[] java.lang.String java.io.File java.lang.String int java.io.File java.lang.Throwable java.lang.Throwable java.io.FileOutputStream
StackMap stack: java.lang.Throwable
47: astore 8
aload 10
ifnull 48
aload 10
invokevirtual java.io.FileOutputStream.close:()V
end local 10 StackMap locals:
StackMap stack:
48: aload 8
athrow
StackMap locals:
StackMap stack: java.lang.Throwable
49: astore 9
aload 8
ifnonnull 50
aload 9
astore 8
goto 51
StackMap locals:
StackMap stack:
50: aload 8
aload 9
if_acmpeq 51
aload 8
aload 9
invokevirtual java.lang.Throwable.addSuppressed:(Ljava/lang/Throwable;)V
StackMap locals:
StackMap stack:
51: aload 8
athrow
52: StackMap locals:
StackMap stack:
aload 1
new java.lang.StringBuilder
dup
ldc "Wrote class to '"
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 7
invokevirtual java.io.File.getAbsolutePath:()Ljava/lang/String;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
bipush 39
invokevirtual java.lang.StringBuilder.append:(C)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
invokevirtual jdk.nashorn.internal.runtime.logging.DebugLogger.info:(Ljava/lang/String;)V
end local 7 end local 6 end local 5 53: goto 62
StackMap locals: jdk.nashorn.internal.runtime.ScriptEnvironment jdk.nashorn.internal.runtime.logging.DebugLogger byte[] java.lang.String java.io.File
StackMap stack: java.io.IOException
54: pop
55: aload 1
iconst_4
anewarray java.lang.Object
dup
iconst_0
ldc "Skipping class dump for "
aastore
dup
iconst_1
56: aload 3
aastore
dup
iconst_2
57: ldc ": "
aastore
dup
iconst_3
58: ldc "io.error.cant.write"
iconst_1
anewarray java.lang.String
dup
iconst_0
59: aload 4
invokevirtual java.io.File.toString:()Ljava/lang/String;
aastore
60: invokestatic jdk.nashorn.internal.runtime.ECMAErrors.getMessage:(Ljava/lang/String;[Ljava/lang/String;)Ljava/lang/String;
aastore
61: invokevirtual jdk.nashorn.internal.runtime.logging.DebugLogger.warning:([Ljava/lang/Object;)V
62: StackMap locals:
StackMap stack:
return
end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 63 0 env Ljdk/nashorn/internal/runtime/ScriptEnvironment;
0 63 1 logger Ljdk/nashorn/internal/runtime/logging/DebugLogger;
0 63 2 bytecode [B
0 63 3 className Ljava/lang/String;
1 63 4 dir Ljava/io/File;
3 33 5 sb Ljava/lang/StringBuilder;
9 32 6 name Ljava/lang/String;
10 32 7 dollar I
20 32 8 file Ljava/io/File;
19 32 9 fileName Ljava/lang/String;
16 32 10 uniqueId I
24 28 13 pw Ljava/io/PrintWriter;
35 53 5 fileName Ljava/lang/String;
36 53 6 index I
43 53 7 file Ljava/io/File;
45 48 10 fos Ljava/io/FileOutputStream;
Exception table:
from to target type
24 26 27 any
23 29 29 any
45 46 47 any
44 49 49 any
1 53 54 Class java.io.IOException
MethodParameters:
Name Flags
env final
logger final
bytecode final
className final
}
SourceFile: "DumpBytecode.java"