Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [headius @ cnutter:~/projects/jruby]
- ◆ javap -c -verbose foo
- Compiled from "foo.rb"
- public class foo extends org.jruby.ast.executable.AbstractScript
- SourceFile: "foo.rb"
- minor version: 0
- major version: 50
- Constant pool:
- const #1 = Asciz foo;
- const #2 = class #1; // foo
- const #3 = Asciz org/jruby/ast/executable/AbstractScript;
- const #4 = class #3; // org/jruby/ast/executable/AbstractScript
- const #5 = Asciz <init>;
- const #6 = Asciz ()V;
- const #7 = NameAndType #5:#6;// "<init>":()V
- const #8 = Method #4.#7; // org/jruby/ast/executable/AbstractScript."<init>":()V
- const #9 = Asciz $class;
- const #10 = Asciz Ljava/lang/Class;;
- const #11 = String #1; // foo
- const #12 = Asciz java/lang/Class;
- const #13 = class #12; // java/lang/Class
- const #14 = Asciz forName;
- const #15 = Asciz (Ljava/lang/String;)Ljava/lang/Class;;
- const #16 = NameAndType #14:#15;// forName:(Ljava/lang/String;)Ljava/lang/Class;
- const #17 = Method #13.#16; // java/lang/Class.forName:(Ljava/lang/String;)Ljava/lang/Class;
- const #18 = NameAndType #9:#10;// $class:Ljava/lang/Class;
- const #19 = Field #2.#18; // foo.$class:Ljava/lang/Class;
- const #20 = Asciz foo.rb;
- const #21 = String #20; // foo.rb
- const #22 = Asciz filename;
- const #23 = Asciz Ljava/lang/String;;
- const #24 = NameAndType #22:#23;// filename:Ljava/lang/String;
- const #25 = Field #2.#24; // foo.filename:Ljava/lang/String;
- const #26 = Asciz __file__;
- const #27 = Asciz (Lorg/jruby/runtime/ThreadContext;Lorg/jruby/runtime/builtin/IRubyObject;[Lorg/jruby/runtime/builtin/IRubyObject;Lorg/jruby/runtime/Block;)Lorg/jruby/runtime/builtin/IRubyObject;;
- const #28 = Asciz org/jruby/runtime/ThreadContext;
- const #29 = class #28; // org/jruby/runtime/ThreadContext
- const #30 = Asciz getRuntime;
- const #31 = Asciz ()Lorg/jruby/Ruby;;
- const #32 = NameAndType #30:#31;// getRuntime:()Lorg/jruby/Ruby;
- const #33 = Method #29.#32; // org/jruby/runtime/ThreadContext.getRuntime:()Lorg/jruby/Ruby;
- const #34 = Asciz org/jruby/Ruby;
- const #35 = class #34; // org/jruby/Ruby
- const #36 = Asciz getNil;
- const #37 = Asciz ()Lorg/jruby/runtime/builtin/IRubyObject;;
- const #38 = NameAndType #36:#37;// getNil:()Lorg/jruby/runtime/builtin/IRubyObject;
- const #39 = Method #35.#38; // org/jruby/Ruby.getNil:()Lorg/jruby/runtime/builtin/IRubyObject;
- const #40 = Asciz setPosition;
- const #41 = Asciz (Lorg/jruby/runtime/ThreadContext;I)V;
- const #42 = NameAndType #40:#41;// setPosition:(Lorg/jruby/runtime/ThreadContext;I)V
- const #43 = Method #2.#42; // foo.setPosition:(Lorg/jruby/runtime/ThreadContext;I)V
- const #44 = Asciz getCallSite0;
- const #45 = Asciz ()Lorg/jruby/runtime/CallSite;;
- const #46 = NameAndType #44:#45;// getCallSite0:()Lorg/jruby/runtime/CallSite;
- const #47 = Method #2.#46; // foo.getCallSite0:()Lorg/jruby/runtime/CallSite;
- const #48 = Asciz org/jruby/runtime/CallSite;
- const #49 = class #48; // org/jruby/runtime/CallSite
- const #50 = Asciz call;
- const #51 = Asciz (Lorg/jruby/runtime/ThreadContext;Lorg/jruby/runtime/builtin/IRubyObject;Lorg/jruby/runtime/builtin/IRubyObject;)Lorg/jruby/runtime/builtin/IRubyObject;;
- const #52 = NameAndType #50:#51;// call:(Lorg/jruby/runtime/ThreadContext;Lorg/jruby/runtime/builtin/IRubyObject;Lorg/jruby/runtime/builtin/IRubyObject;)Lorg/jruby/runtime/builtin/IRubyObject;
- const #53 = Method #49.#52; // org/jruby/runtime/CallSite.call:(Lorg/jruby/runtime/ThreadContext;Lorg/jruby/runtime/builtin/IRubyObject;Lorg/jruby/runtime/builtin/IRubyObject;)Lorg/jruby/runtime/builtin/IRubyObject;
- const #54 = Asciz getCallSite1;
- const #55 = NameAndType #54:#45;// getCallSite1:()Lorg/jruby/runtime/CallSite;
- const #56 = Method #2.#55; // foo.getCallSite1:()Lorg/jruby/runtime/CallSite;
- const #57 = Asciz getCallSite2;
- const #58 = NameAndType #57:#45;// getCallSite2:()Lorg/jruby/runtime/CallSite;
- const #59 = Method #2.#58; // foo.getCallSite2:()Lorg/jruby/runtime/CallSite;
- const #60 = Asciz getCallSite3;
- const #61 = NameAndType #60:#45;// getCallSite3:()Lorg/jruby/runtime/CallSite;
- const #62 = Method #2.#61; // foo.getCallSite3:()Lorg/jruby/runtime/CallSite;
- const #63 = Asciz Lorg/jruby/anno/JRubyMethod;;
- const #64 = Asciz name;
- const #65 = Asciz frame;
- const #66 = int 1;
- const #67 = Asciz required;
- const #68 = int 0;
- const #69 = Asciz optional;
- const #70 = Asciz rest;
- const #71 = int -2;
- const #72 = Asciz load;
- const #73 = Asciz java/lang/String;
- const #74 = class #73; // java/lang/String
- const #75 = Asciz org/jruby/javasupport/util/RuntimeHelpers;
- const #76 = class #75; // org/jruby/javasupport/util/RuntimeHelpers
- const #77 = Asciz preLoad;
- const #78 = Asciz (Lorg/jruby/runtime/ThreadContext;[Ljava/lang/String;)V;
- const #79 = NameAndType #77:#78;// preLoad:(Lorg/jruby/runtime/ThreadContext;[Ljava/lang/String;)V
- const #80 = Method #76.#79; // org/jruby/javasupport/util/RuntimeHelpers.preLoad:(Lorg/jruby/runtime/ThreadContext;[Ljava/lang/String;)V
- const #81 = NameAndType #26:#27;// __file__:(Lorg/jruby/runtime/ThreadContext;Lorg/jruby/runtime/builtin/IRubyObject;[Lorg/jruby/runtime/builtin/IRubyObject;Lorg/jruby/runtime/Block;)Lorg/jruby/runtime/builtin/IRubyObject;
- const #82 = Method #2.#81; // foo.__file__:(Lorg/jruby/runtime/ThreadContext;Lorg/jruby/runtime/builtin/IRubyObject;[Lorg/jruby/runtime/builtin/IRubyObject;Lorg/jruby/runtime/Block;)Lorg/jruby/runtime/builtin/IRubyObject;
- const #83 = Asciz postLoad;
- const #84 = Asciz (Lorg/jruby/runtime/ThreadContext;)V;
- const #85 = NameAndType #83:#84;// postLoad:(Lorg/jruby/runtime/ThreadContext;)V
- const #86 = Method #76.#85; // org/jruby/javasupport/util/RuntimeHelpers.postLoad:(Lorg/jruby/runtime/ThreadContext;)V
- const #87 = Asciz java/lang/Throwable;
- const #88 = class #87; // java/lang/Throwable
- const #89 = Asciz main;
- const #90 = Asciz ([Ljava/lang/String;)V;
- const #91 = Method #2.#7; // foo."<init>":()V
- const #92 = Asciz org/jruby/RubyInstanceConfig;
- const #93 = class #92; // org/jruby/RubyInstanceConfig
- const #94 = Method #93.#7; // org/jruby/RubyInstanceConfig."<init>":()V
- const #95 = Asciz setArgv;
- const #96 = NameAndType #95:#90;// setArgv:([Ljava/lang/String;)V
- const #97 = Method #93.#96; // org/jruby/RubyInstanceConfig.setArgv:([Ljava/lang/String;)V
- const #98 = Asciz newInstance;
- const #99 = Asciz (Lorg/jruby/RubyInstanceConfig;)Lorg/jruby/Ruby;;
- const #100 = NameAndType #98:#99;// newInstance:(Lorg/jruby/RubyInstanceConfig;)Lorg/jruby/Ruby;
- const #101 = Method #35.#100; // org/jruby/Ruby.newInstance:(Lorg/jruby/RubyInstanceConfig;)Lorg/jruby/Ruby;
- const #102 = Asciz getCurrentContext;
- const #103 = Asciz ()Lorg/jruby/runtime/ThreadContext;;
- const #104 = NameAndType #102:#103;// getCurrentContext:()Lorg/jruby/runtime/ThreadContext;
- const #105 = Method #35.#104; // org/jruby/Ruby.getCurrentContext:()Lorg/jruby/runtime/ThreadContext;
- const #106 = Asciz getTopSelf;
- const #107 = NameAndType #106:#37;// getTopSelf:()Lorg/jruby/runtime/builtin/IRubyObject;
- const #108 = Method #35.#107; // org/jruby/Ruby.getTopSelf:()Lorg/jruby/runtime/builtin/IRubyObject;
- const #109 = Asciz org/jruby/runtime/builtin/IRubyObject;
- const #110 = class #109; // org/jruby/runtime/builtin/IRubyObject
- const #111 = Asciz NULL_ARRAY;
- const #112 = Asciz [Lorg/jruby/runtime/builtin/IRubyObject;;
- const #113 = NameAndType #111:#112;// NULL_ARRAY:[Lorg/jruby/runtime/builtin/IRubyObject;
- const #114 = Field #110.#113; // org/jruby/runtime/builtin/IRubyObject.NULL_ARRAY:[Lorg/jruby/runtime/builtin/IRubyObject;
- const #115 = Asciz org/jruby/runtime/Block;
- const #116 = class #115; // org/jruby/runtime/Block
- const #117 = Asciz NULL_BLOCK;
- const #118 = Asciz Lorg/jruby/runtime/Block;;
- const #119 = NameAndType #117:#118;// NULL_BLOCK:Lorg/jruby/runtime/Block;
- const #120 = Field #116.#119; // org/jruby/runtime/Block.NULL_BLOCK:Lorg/jruby/runtime/Block;
- const #121 = NameAndType #72:#27;// load:(Lorg/jruby/runtime/ThreadContext;Lorg/jruby/runtime/builtin/IRubyObject;[Lorg/jruby/runtime/builtin/IRubyObject;Lorg/jruby/runtime/Block;)Lorg/jruby/runtime/builtin/IRubyObject;
- const #122 = Method #2.#121; // foo.load:(Lorg/jruby/runtime/ThreadContext;Lorg/jruby/runtime/builtin/IRubyObject;[Lorg/jruby/runtime/builtin/IRubyObject;Lorg/jruby/runtime/Block;)Lorg/jruby/runtime/builtin/IRubyObject;
- const #123 = Asciz setFileAndLine;
- const #124 = Asciz (Ljava/lang/String;I)V;
- const #125 = NameAndType #123:#124;// setFileAndLine:(Ljava/lang/String;I)V
- const #126 = Method #29.#125; // org/jruby/runtime/ThreadContext.setFileAndLine:(Ljava/lang/String;I)V
- const #127 = Asciz d;
- const #128 = String #127; // d
- const #129 = Asciz setVariableCallSite;
- const #130 = Asciz ([Lorg/jruby/runtime/CallSite;ILjava/lang/String;)[Lorg/jruby/runtime/CallSite;;
- const #131 = NameAndType #129:#130;// setVariableCallSite:([Lorg/jruby/runtime/CallSite;ILjava/lang/String;)[Lorg/jruby/runtime/CallSite;
- const #132 = Method #2.#131; // foo.setVariableCallSite:([Lorg/jruby/runtime/CallSite;ILjava/lang/String;)[Lorg/jruby/runtime/CallSite;
- const #133 = Asciz c;
- const #134 = String #133; // c
- const #135 = Asciz b;
- const #136 = String #135; // b
- const #137 = Asciz a;
- const #138 = String #137; // a
- const #139 = Asciz callSites;
- const #140 = Asciz [Lorg/jruby/runtime/CallSite;;
- const #141 = NameAndType #139:#140;// callSites:[Lorg/jruby/runtime/CallSite;
- const #142 = Field #2.#141; // foo.callSites:[Lorg/jruby/runtime/CallSite;
- const #143 = Asciz Code;
- const #144 = Asciz LineNumberTable;
- const #145 = Asciz RuntimeVisibleAnnotations;
- const #146 = Asciz StackMapTable;
- const #147 = Asciz SourceFile;
- {
- public foo();
- Code:
- Stack=4, Locals=1, Args_size=1
- 0: aload_0
- 1: invokespecial #8; //Method org/jruby/ast/executable/AbstractScript."<init>":()V
- 4: aload_0
- 5: ldc #11; //String foo
- 7: invokestatic #17; //Method java/lang/Class.forName:(Ljava/lang/String;)Ljava/lang/Class;
- 10: putfield #19; //Field $class:Ljava/lang/Class;
- 13: aload_0
- 14: ldc #21; //String foo.rb
- 16: putfield #25; //Field filename:Ljava/lang/String;
- 19: aload_0
- 20: iconst_4
- 21: anewarray #49; //class org/jruby/runtime/CallSite
- 24: iconst_3
- 25: ldc #128; //String d
- 27: invokestatic #132; //Method setVariableCallSite:([Lorg/jruby/runtime/CallSite;ILjava/lang/String;)[Lorg/jruby/runtime/CallSite;
- 30: iconst_2
- 31: ldc #134; //String c
- 33: invokestatic #132; //Method setVariableCallSite:([Lorg/jruby/runtime/CallSite;ILjava/lang/String;)[Lorg/jruby/runtime/CallSite;
- 36: iconst_1
- 37: ldc #136; //String b
- 39: invokestatic #132; //Method setVariableCallSite:([Lorg/jruby/runtime/CallSite;ILjava/lang/String;)[Lorg/jruby/runtime/CallSite;
- 42: iconst_0
- 43: ldc #138; //String a
- 45: invokestatic #132; //Method setVariableCallSite:([Lorg/jruby/runtime/CallSite;ILjava/lang/String;)[Lorg/jruby/runtime/CallSite;
- 48: putfield #142; //Field callSites:[Lorg/jruby/runtime/CallSite;
- 51: return
- public org.jruby.runtime.builtin.IRubyObject __file__(org.jruby.runtime.ThreadContext, org.jruby.runtime.builtin.IRubyObject, org.jruby.runtime.builtin.IRubyObject[], org.jruby.runtime.Block);
- Code:
- Stack=4, Locals=9, Args_size=5
- 0: aload_1
- 1: invokevirtual #33; //Method org/jruby/runtime/ThreadContext.getRuntime:()Lorg/jruby/Ruby;
- 4: dup
- 5: astore 6
- 7: invokevirtual #39; //Method org/jruby/Ruby.getNil:()Lorg/jruby/runtime/builtin/IRubyObject;
- 10: astore 8
- 12: aload_1
- 13: iconst_0
- 14: invokestatic #43; //Method setPosition:(Lorg/jruby/runtime/ThreadContext;I)V
- 17: aload_0
- 18: invokevirtual #47; //Method getCallSite0:()Lorg/jruby/runtime/CallSite;
- 21: aload_1
- 22: aload_2
- 23: aload_2
- 24: invokevirtual #53; //Method org/jruby/runtime/CallSite.call:(Lorg/jruby/runtime/ThreadContext;Lorg/jruby/runtime/builtin/IRubyObject;Lorg/jruby/runtime/builtin/IRubyObject;)Lorg/jruby/runtime/builtin/IRubyObject;
- 27: pop
- 28: aload_1
- 29: iconst_1
- 30: invokestatic #43; //Method setPosition:(Lorg/jruby/runtime/ThreadContext;I)V
- 33: aload_0
- 34: invokevirtual #56; //Method getCallSite1:()Lorg/jruby/runtime/CallSite;
- 37: aload_1
- 38: aload_2
- 39: aload_2
- 40: invokevirtual #53; //Method org/jruby/runtime/CallSite.call:(Lorg/jruby/runtime/ThreadContext;Lorg/jruby/runtime/builtin/IRubyObject;Lorg/jruby/runtime/builtin/IRubyObject;)Lorg/jruby/runtime/builtin/IRubyObject;
- 43: pop
- 44: aload_1
- 45: iconst_2
- 46: invokestatic #43; //Method setPosition:(Lorg/jruby/runtime/ThreadContext;I)V
- 49: aload_0
- 50: invokevirtual #59; //Method getCallSite2:()Lorg/jruby/runtime/CallSite;
- 53: aload_1
- 54: aload_2
- 55: aload_2
- 56: invokevirtual #53; //Method org/jruby/runtime/CallSite.call:(Lorg/jruby/runtime/ThreadContext;Lorg/jruby/runtime/builtin/IRubyObject;Lorg/jruby/runtime/builtin/IRubyObject;)Lorg/jruby/runtime/builtin/IRubyObject;
- 59: pop
- 60: aload_1
- 61: iconst_3
- 62: invokestatic #43; //Method setPosition:(Lorg/jruby/runtime/ThreadContext;I)V
- 65: aload_0
- 66: invokevirtual #62; //Method getCallSite3:()Lorg/jruby/runtime/CallSite;
- 69: aload_1
- 70: aload_2
- 71: aload_2
- 72: invokevirtual #53; //Method org/jruby/runtime/CallSite.call:(Lorg/jruby/runtime/ThreadContext;Lorg/jruby/runtime/builtin/IRubyObject;Lorg/jruby/runtime/builtin/IRubyObject;)Lorg/jruby/runtime/builtin/IRubyObject;
- 75: areturn
- LineNumberTable:
- line 1: 12
- line 2: 28
- line 3: 44
- line 4: 60
- RuntimeVisibleAnnotations: length = 0x1F
- 00 01 00 3F 00 05 00 40 73 00 1A 00 41 5A 00 42
- 00 43 49 00 44 00 45 49 00 44 00 46 49 00 47
- public org.jruby.runtime.builtin.IRubyObject load(org.jruby.runtime.ThreadContext, org.jruby.runtime.builtin.IRubyObject, org.jruby.runtime.builtin.IRubyObject[], org.jruby.runtime.Block);
- Code:
- Stack=5, Locals=5, Args_size=5
- 0: aload_1
- 1: iconst_0
- 2: anewarray #74; //class java/lang/String
- 5: invokestatic #80; //Method org/jruby/javasupport/util/RuntimeHelpers.preLoad:(Lorg/jruby/runtime/ThreadContext;[Ljava/lang/String;)V
- 8: aload_0
- 9: aload_1
- 10: aload_2
- 11: aload_3
- 12: aload 4
- 14: invokevirtual #82; //Method __file__:(Lorg/jruby/runtime/ThreadContext;Lorg/jruby/runtime/builtin/IRubyObject;[Lorg/jruby/runtime/builtin/IRubyObject;Lorg/jruby/runtime/Block;)Lorg/jruby/runtime/builtin/IRubyObject;
- 17: aload_1
- 18: invokestatic #86; //Method org/jruby/javasupport/util/RuntimeHelpers.postLoad:(Lorg/jruby/runtime/ThreadContext;)V
- 21: areturn
- 22: aload_1
- 23: invokestatic #86; //Method org/jruby/javasupport/util/RuntimeHelpers.postLoad:(Lorg/jruby/runtime/ThreadContext;)V
- 26: athrow
- Exception table:
- from to target type
- 0 22 22 any
- StackMapTable: number_of_entries = 1
- frame_type = 86 /* same_locals_1_stack_item */
- stack = [ class java/lang/Throwable ]
- public static void main(java.lang.String[]);
- Code:
- Stack=5, Locals=1, Args_size=1
- 0: new #2; //class foo
- 3: dup
- 4: invokespecial #91; //Method "<init>":()V
- 7: new #93; //class org/jruby/RubyInstanceConfig
- 10: dup
- 11: invokespecial #94; //Method org/jruby/RubyInstanceConfig."<init>":()V
- 14: dup
- 15: aload_0
- 16: invokevirtual #97; //Method org/jruby/RubyInstanceConfig.setArgv:([Ljava/lang/String;)V
- 19: invokestatic #101; //Method org/jruby/Ruby.newInstance:(Lorg/jruby/RubyInstanceConfig;)Lorg/jruby/Ruby;
- 22: dup
- 23: invokevirtual #105; //Method org/jruby/Ruby.getCurrentContext:()Lorg/jruby/runtime/ThreadContext;
- 26: swap
- 27: invokevirtual #108; //Method org/jruby/Ruby.getTopSelf:()Lorg/jruby/runtime/builtin/IRubyObject;
- 30: getstatic #114; //Field org/jruby/runtime/builtin/IRubyObject.NULL_ARRAY:[Lorg/jruby/runtime/builtin/IRubyObject;
- 33: getstatic #120; //Field org/jruby/runtime/Block.NULL_BLOCK:Lorg/jruby/runtime/Block;
- 36: invokevirtual #122; //Method load:(Lorg/jruby/runtime/ThreadContext;Lorg/jruby/runtime/builtin/IRubyObject;[Lorg/jruby/runtime/builtin/IRubyObject;Lorg/jruby/runtime/Block;)Lorg/jruby/runtime/builtin/IRubyObject;
- 39: return
- }
Add Comment
Please, Sign In to add comment