Skip to content

Instantly share code, notes, and snippets.

@timfel
Created September 21, 2011 18:22
Show Gist options
  • Save timfel/1232873 to your computer and use it in GitHub Desktop.
Save timfel/1232873 to your computer and use it in GitHub Desktop.
// class version 51.0 (51)
// access flags 0x21
public class example extends org/jruby/ast/executable/AbstractScript {
// compiled from: example.rb
// debug info: /home/tim/example.rb
// access flags 0x100A
private static setPosition(Lorg/jruby/runtime/ThreadContext;I)V
ALOAD 0
LDC "example.rb"
ILOAD 1
INVOKEVIRTUAL org/jruby/runtime/ThreadContext.setFileAndLine (Ljava/lang/String;I)V
RETURN
MAXSTACK = 3
MAXLOCALS = 2
// access flags 0x1
public <init>()V
ALOAD 0
INVOKESPECIAL org/jruby/ast/executable/AbstractScript.<init> ()V
ALOAD 0
LDC "example.rb"
PUTFIELD example.filename : Ljava/lang/String;
ALOAD 0
NEW org/jruby/ast/executable/RuntimeCache
DUP
INVOKESPECIAL org/jruby/ast/executable/RuntimeCache.<init> ()V
PUTFIELD org/jruby/ast/executable/AbstractScript.runtimeCache : Lorg/jruby/ast/executable/RuntimeCache;
ALOAD 0
LDC "\uffff\u0002\u0000\u0000\u0000\u0001\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000"
INVOKEVIRTUAL org/jruby/ast/executable/AbstractScript.initFromDescriptor (Ljava/lang/String;)V
RETURN
MAXSTACK = 3
MAXLOCALS = 1
// access flags 0x9
public static __file__(Lexample;Lorg/jruby/runtime/ThreadContext;Lorg/jruby/runtime/builtin/IRubyObject;[Lorg/jruby/runtime/builtin/IRubyObject;Lorg/jruby/runtime/Block;)Lorg/jruby/runtime/builtin/IRubyObject;
@Lorg/jruby/anno/JRubyMethod;(name="__file__", frame=true, required=0, optional=0, rest=-2)
L0
LINENUMBER 1 L0
ALOAD 0
ALOAD 1
ALOAD 2
GETSTATIC org/jruby/runtime/Block.NULL_BLOCK : Lorg/jruby/runtime/Block;
INVOKESTATIC example.class_0$RUBY$DeepThought (Lexample;Lorg/jruby/runtime/ThreadContext;Lorg/jruby/runtime/builtin/IRubyObject;Lorg/jruby/runtime/Block;)Lorg/jruby/runtime/builtin/IRubyObject;
POP
L1
LINENUMBER 7 L1
ALOAD 1
ALOAD 2
ALOAD 1
ALOAD 2
ALOAD 0
ALOAD 1
LDC "DeepThought"
INVOKEVIRTUAL example.getConstant0 (Lorg/jruby/runtime/ThreadContext;Ljava/lang/String;)Lorg/jruby/runtime/builtin/IRubyObject;
LDC "new"
INVOKEDYNAMIC call (Lorg/jruby/runtime/ThreadContext;Lorg/jruby/runtime/builtin/IRubyObject;Lorg/jruby/runtime/builtin/IRubyObject;Ljava/lang/String;)Lorg/jruby/runtime/builtin/IRubyObject; [org/jruby/runtime/invokedynamic/InvocationLinker.invocationBootstrap(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite; (6)]
LDC "ultimate_answer?"
ALOAD 1
INVOKEDYNAMIC getFixnum (Lorg/jruby/runtime/ThreadContext;)Lorg/jruby/RubyFixnum; [org/jruby/runtime/invokedynamic/InvokeDynamicSupport.getFixnumBootstrap(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;J)Ljava/lang/invoke/CallSite; (6), 42]
INVOKEDYNAMIC call (Lorg/jruby/runtime/ThreadContext;Lorg/jruby/runtime/builtin/IRubyObject;Lorg/jruby/runtime/builtin/IRubyObject;Ljava/lang/String;Lorg/jruby/runtime/builtin/IRubyObject;)Lorg/jruby/runtime/builtin/IRubyObject; [org/jruby/runtime/invokedynamic/InvocationLinker.invocationBootstrap(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite; (6)]
ARETURN
MAXSTACK = 7
MAXLOCALS = 5
// access flags 0x1
public __file__(Lorg/jruby/runtime/ThreadContext;Lorg/jruby/runtime/builtin/IRubyObject;[Lorg/jruby/runtime/builtin/IRubyObject;Lorg/jruby/runtime/Block;)Lorg/jruby/runtime/builtin/IRubyObject;
ALOAD 0
ALOAD 1
ALOAD 2
ALOAD 3
ALOAD 4
INVOKESTATIC example.__file__ (Lexample;Lorg/jruby/runtime/ThreadContext;Lorg/jruby/runtime/builtin/IRubyObject;[Lorg/jruby/runtime/builtin/IRubyObject;Lorg/jruby/runtime/Block;)Lorg/jruby/runtime/builtin/IRubyObject;
ARETURN
MAXSTACK = 5
MAXLOCALS = 5
// access flags 0x9
public static class_0$RUBY$DeepThought(Lexample;Lorg/jruby/runtime/ThreadContext;Lorg/jruby/runtime/builtin/IRubyObject;Lorg/jruby/runtime/Block;)Lorg/jruby/runtime/builtin/IRubyObject;
TRYCATCHBLOCK L0 L1 L2 null
ACONST_NULL
ALOAD 1
ALOAD 1
GETFIELD org/jruby/runtime/ThreadContext.nil : Lorg/jruby/runtime/builtin/IRubyObject;
INVOKESTATIC org/jruby/javasupport/util/RuntimeHelpers.prepareClassNamespace (Lorg/jruby/runtime/ThreadContext;Lorg/jruby/runtime/builtin/IRubyObject;)Lorg/jruby/RubyModule;
SWAP
LDC "DeepThought"
SWAP
INVOKEVIRTUAL org/jruby/RubyModule.defineOrGetClassUnder (Ljava/lang/String;Lorg/jruby/RubyClass;)Lorg/jruby/RubyClass;
DUP
ASTORE 2
ALOAD 1
SWAP
ALOAD 0
ALOAD 1
INVOKEDYNAMIC getStaticScope (Lorg/jruby/ast/executable/AbstractScript;Lorg/jruby/runtime/ThreadContext;)Lorg/jruby/parser/StaticScope; [org/jruby/runtime/invokedynamic/InvokeDynamicSupport.getStaticScopeBootstrap(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;I)Ljava/lang/invoke/CallSite; (6), ",0,0,-1", 0]
INVOKEVIRTUAL org/jruby/runtime/ThreadContext.preCompiledClassDummyScope (Lorg/jruby/RubyModule;Lorg/jruby/parser/StaticScope;)V
L0
LINENUMBER 2 L0
ALOAD 1
ALOAD 2
ALOAD 0
LDC "ultimate_answer?"
LDC "method__1$RUBY$ultimate_answer_p_"
ALOAD 0
ALOAD 1
INVOKEDYNAMIC getStaticScope (Lorg/jruby/ast/executable/AbstractScript;Lorg/jruby/runtime/ThreadContext;)Lorg/jruby/parser/StaticScope; [org/jruby/runtime/invokedynamic/InvokeDynamicSupport.getStaticScopeBootstrap(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;I)Ljava/lang/invoke/CallSite; (6), "value,1,0,-1", 1]
ICONST_1
LDC "example.rb"
LDC 1
GETSTATIC org/jruby/internal/runtime/methods/CallConfiguration.FrameNoneScopeNone : Lorg/jruby/internal/runtime/methods/CallConfiguration;
LDC "qvalue"
INVOKESTATIC org/jruby/javasupport/util/RuntimeHelpers.def (Lorg/jruby/runtime/ThreadContext;Lorg/jruby/runtime/builtin/IRubyObject;Ljava/lang/Object;Ljava/lang/String;Ljava/lang/String;Lorg/jruby/parser/StaticScope;ILjava/lang/String;ILorg/jruby/internal/runtime/methods/CallConfiguration;Ljava/lang/String;)Lorg/jruby/runtime/builtin/IRubyObject;
L1
ALOAD 1
INVOKEVIRTUAL org/jruby/runtime/ThreadContext.postCompiledClass ()V
GOTO L3
L2
FRAME FULL [example org/jruby/runtime/ThreadContext org/jruby/RubyClass org/jruby/runtime/Block] [java/lang/Throwable]
ALOAD 1
INVOKEVIRTUAL org/jruby/runtime/ThreadContext.postCompiledClass ()V
ATHROW
L3
FRAME SAME1 org/jruby/runtime/builtin/IRubyObject
ARETURN
MAXSTACK = 11
MAXLOCALS = 4
// access flags 0x9
public static method__1$RUBY$ultimate_answer_p_(Lexample;Lorg/jruby/runtime/ThreadContext;Lorg/jruby/runtime/builtin/IRubyObject;Lorg/jruby/runtime/builtin/IRubyObject;Lorg/jruby/runtime/Block;)Lorg/jruby/runtime/builtin/IRubyObject;
@Lorg/jruby/anno/JRubyMethod;(name="ultimate_answer?", frame=true, required=1, optional=0, rest=-1)
ALOAD 3
ASTORE 9
L0
LINENUMBER 3 L0
ALOAD 1
ALOAD 2
ALOAD 1
ALOAD 2
ALOAD 9
LDC "to_s"
INVOKEDYNAMIC call (Lorg/jruby/runtime/ThreadContext;Lorg/jruby/runtime/builtin/IRubyObject;Lorg/jruby/runtime/builtin/IRubyObject;Ljava/lang/String;)Lorg/jruby/runtime/builtin/IRubyObject; [org/jruby/runtime/invokedynamic/InvocationLinker.invocationBootstrap(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite; (6)]
LDC "=="
ALOAD 1
INVOKEDYNAMIC getString (Lorg/jruby/runtime/ThreadContext;)Lorg/jruby/RubyString; [org/jruby/runtime/invokedynamic/InvokeDynamicSupport.getStringBootstrap(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/String;Ljava/lang/String;I)Ljava/lang/invoke/CallSite; (6), "42", "ASCII-8BIT", 32]
INVOKEDYNAMIC call (Lorg/jruby/runtime/ThreadContext;Lorg/jruby/runtime/builtin/IRubyObject;Lorg/jruby/runtime/builtin/IRubyObject;Ljava/lang/String;Lorg/jruby/runtime/builtin/IRubyObject;)Lorg/jruby/runtime/builtin/IRubyObject; [org/jruby/runtime/invokedynamic/InvocationLinker.invocationBootstrap(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite; (6)]
ARETURN
L1
LOCALVARIABLE value Lorg/jruby/runtime/builtin/IRubyObject; L0 L1 9
MAXSTACK = 6
MAXLOCALS = 10
// access flags 0x1009
public static method__1$RUBY$ultimate_answer_p_(Lexample;Lorg/jruby/runtime/ThreadContext;Lorg/jruby/runtime/builtin/IRubyObject;[Lorg/jruby/runtime/builtin/IRubyObject;Lorg/jruby/runtime/Block;)Lorg/jruby/runtime/builtin/IRubyObject;
ALOAD 1
ALOAD 3
ICONST_1
INVOKESTATIC org/jruby/javasupport/util/RuntimeHelpers.checkArgumentCount (Lorg/jruby/runtime/ThreadContext;[Lorg/jruby/runtime/builtin/IRubyObject;I)V
ALOAD 0
ALOAD 1
ALOAD 2
ALOAD 3
LDC 0
AALOAD
ALOAD 4
INVOKESTATIC example.method__1$RUBY$ultimate_answer_p_ (Lexample;Lorg/jruby/runtime/ThreadContext;Lorg/jruby/runtime/builtin/IRubyObject;Lorg/jruby/runtime/builtin/IRubyObject;Lorg/jruby/runtime/Block;)Lorg/jruby/runtime/builtin/IRubyObject;
ARETURN
MAXSTACK = 5
MAXLOCALS = 5
// access flags 0x9
public static class_0$RUBY$DeepThought(Lexample;Lorg/jruby/runtime/ThreadContext;Lorg/jruby/runtime/builtin/IRubyObject;[Lorg/jruby/runtime/builtin/IRubyObject;Lorg/jruby/runtime/Block;)Lorg/jruby/runtime/builtin/IRubyObject;
ALOAD 1
INVOKEVIRTUAL org/jruby/runtime/ThreadContext.getRuntime ()Lorg/jruby/Ruby;
ALOAD 3
ICONST_0
ICONST_0
INVOKESTATIC org/jruby/runtime/Arity.checkArgumentCount (Lorg/jruby/Ruby;[Lorg/jruby/runtime/builtin/IRubyObject;II)I
POP
ALOAD 0
ALOAD 1
ALOAD 2
ALOAD 4
INVOKESTATIC example.class_0$RUBY$DeepThought (Lexample;Lorg/jruby/runtime/ThreadContext;Lorg/jruby/runtime/builtin/IRubyObject;Lorg/jruby/runtime/Block;)Lorg/jruby/runtime/builtin/IRubyObject;
ARETURN
MAXSTACK = 4
MAXLOCALS = 5
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment