Skip to content

Instantly share code, notes, and snippets.

@jruby
Created June 15, 2009 05:52
Show Gist options
  • Save jruby/129957 to your computer and use it in GitHub Desktop.
Save jruby/129957 to your computer and use it in GitHub Desktop.
~/projects/juby ➔ JAVA_HOME=../davinci/sources/build/bsd-i586/j2sdk-image/ JAVA_OPTS=-XX:+EnableInvokeDynamic CLASSPATH=src jruby -I ../bitescript/lib/ src/compiler.rb -e "puts 1.compareTo 2"
~/projects/juby ➔ ../davinci/sources/build/bsd-i586/j2sdk-image/bin/javap -c dash_eCompiled from "dash_e"
public class dash_e extends java.lang.Object {
public static void main(java.lang.String[]);
Code:
0: ldc2_w #7; //long 1l
3: invokestatic #14; //Method java/lang/Long.valueOf:(J)Ljava/lang/Long;
6: ldc2_w #15; //long 2l
9: invokestatic #14; //Method java/lang/Long.valueOf:(J)Ljava/lang/Long;
12: invokedynamic #34, 0; //NameAndType compareTo:(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
17: getstatic #40; //Field java/lang/System.out:Ljava/io/PrintStream;
20: swap
21: invokevirtual #46; //Method java/io/PrintStream.println:(Ljava/lang/Object;)V
24: return
static {};
Code:
0: ldc #19; //String dash_e
2: invokestatic #25; //Method java/lang/Class.forName:(Ljava/lang/String;)Ljava/lang/Class;
5: invokestatic #31; //Method com/headius/juby/SimpleJavaBootstrap.registerBootstrap:(Ljava/lang/Class;)V
8: return
}
~/projects/juby ➔ ../davinci/sources/build/bsd-i586/j2sdk-image/bin/java -cp src:. -XX:+EnableInvokeDynamic dash_e-1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment