X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=src%2Forg%2Fibex%2Fclassgen%2FCGConst.java;h=59a7f74c54538ff98921751e60e56c02e5051c9a;hb=83234d9a36beec5161709321fbe71b5b57b2f73f;hp=83d2056f54968af1f25e9e173df68f1c4a4f50c8;hpb=1a607deb9b281751feb3c57b163d17f7d1c0c801;p=org.ibex.classgen.git diff --git a/src/org/ibex/classgen/CGConst.java b/src/org/ibex/classgen/CGConst.java index 83d2056..59a7f74 100644 --- a/src/org/ibex/classgen/CGConst.java +++ b/src/org/ibex/classgen/CGConst.java @@ -1,6 +1,7 @@ package org.ibex.classgen; public interface CGConst { + // Class only public static final int ACC_INTERFACE = (byte) 0x0200; public static final int ACC_SUPER = (byte) 0x0020; @@ -235,23 +236,23 @@ public interface CGConst { /* #!/usr/bin/perl -w -@ARGV || push @ARGV,$0; +@ARGV || push @ARGV, $0; my @a = (); while(<>) { chomp; next unless(m|byte ([A-Z0-9_]+) = .*?([0-9xA-F]+);\s+//\s*(.*)$|i); - my ($name,$num) = ($1,hex($2)); + my ($name, $num) = ($1, hex($2)); $_ = $3; - my $n = 1; - $n |= (s/^(\d+)// ? $1 : (s/^V//||die,7)) << 1; + my $n = 1<<5; + $n |= s/^(\d+)// ? $1 : (s/^V//||die, 7); $n |= (1<<4) if(s/^C//); - $n |= (1<<5) if(s/^B//); + $n |= (1<<3) if(s/^B//); die if(/./); $a[$num] = $n; } print "private static final byte[] OP_DATA = {\n\t"; for(my $i=0;$i<256;$i++) { - printf "0x%02x%s", $a[$i]||2, $i==255?"\n};\n":($i%16)==15?",\n\t":", "; + printf "0x%02x%s", $a[$i]||1, $i==255?"\n};\n":($i%16)==15?", \n\t":", "; } __END__ */