Skip to content

Instantly share code, notes, and snippets.

@KengoTODA
Created January 22, 2012 05:33
Show Gist options
  • Select an option

  • Save KengoTODA/1655778 to your computer and use it in GitHub Desktop.

Select an option

Save KengoTODA/1655778 to your computer and use it in GitHub Desktop.
Test code to check the 'bastore' opcode doesn't need the 'i2b' opcode
.class public HelloWorld
.super java/lang/Object
.method public <init>()V
aload_0
invokenonvirtual java/lang/Object/<init>()V
return
.end method
.method public static main([Ljava/lang/String;)V
.limit stack 6
getstatic java/lang/System/out Ljava/io/PrintStream;
iconst_1
newarray byte
dup
iconst_0
bipush 127
iconst_1
iadd
bastore
iconst_0
baload
invokevirtual java/io/PrintStream/println(I)V
return
.end method
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment