You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by ay...@apache.org on 2007/03/27 12:46:44 UTC
svn commit: r522864 - in
/harmony/enhanced/classlib/trunk/modules/pack200/src:
main/java/org/apache/harmony/pack200/
main/java/org/apache/harmony/pack200/bytecode/
test/java/org/apache/harmony/pack200/tests/
test/java/org/apache/harmony/pack200/tests/b...
Author: ayza
Date: Tue Mar 27 03:46:41 2007
New Revision: 522864
URL: http://svn.apache.org/viewvc?view=rev&rev=522864
Log:
Update of pack200 classes from HARMONY-3499 ([classlib][pack200] Ongoing implementation of pack200)
Added:
harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/IMatcher.java (with props)
harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/SegmentUtils.java (with props)
harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/ByteCode.java (with props)
harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/CPInterfaceMethodRef.java (with props)
harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/CPMethodRef.java (with props)
harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/CPRef.java (with props)
harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/ExceptionTableEntry.java (with props)
harmony/enhanced/classlib/trunk/modules/pack200/src/test/java/org/apache/harmony/pack200/tests/SegmentUtilsTest.java (with props)
harmony/enhanced/classlib/trunk/modules/pack200/src/test/java/org/apache/harmony/pack200/tests/bytecode/ByteCodeTest.java (with props)
Modified:
harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/Attribute.java
harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/CPFieldRef.java
harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/CPMethod.java
harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/ClassFileEntry.java
Added: harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/IMatcher.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/IMatcher.java?view=auto&rev=522864
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/IMatcher.java (added)
+++ harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/IMatcher.java Tue Mar 27 03:46:41 2007
@@ -0,0 +1,7 @@
+package org.apache.harmony.pack200;
+
+public interface IMatcher {
+
+ public abstract boolean matches(long value);
+
+}
\ No newline at end of file
Propchange: harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/IMatcher.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/SegmentUtils.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/SegmentUtils.java?view=auto&rev=522864
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/SegmentUtils.java (added)
+++ harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/SegmentUtils.java Tue Mar 27 03:46:41 2007
@@ -0,0 +1,65 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.harmony.pack200;
+
+// TODO Write doc
+public final class SegmentUtils {
+ public static int countArgs(String descriptor) {
+ int bra = descriptor.indexOf("(");
+ int ket = descriptor.indexOf(")");
+ if (bra == -1 || ket == -1 || ket < bra)
+ throw new IllegalArgumentException("No arguments");
+
+ boolean inType = false;
+ int count = 0;
+ for (int i = bra + 1; i < ket; i++) {
+ char charAt = descriptor.charAt(i);
+ if (inType && charAt == ';') {
+ inType = false;
+ } else if (!inType && charAt == 'L') {
+ inType = true;
+ count++;
+ } else if (charAt == '[' || inType) {
+ // NOP
+ } else {
+ count++;
+ }
+ }
+ return count;
+ }
+
+ public static int countMatches(long[] flags, IMatcher matcher) {
+ int count = 0;
+ for (int i = 0; i < flags.length; i++) {
+ if (matcher.matches(flags[i]))
+ count++;
+ }
+ return count;
+ }
+
+ public static int countMatches(long[][] flags, IMatcher matcher) {
+ int count = 0;
+ for (int i = 0; i < flags.length; i++) {
+ count += countMatches(flags[i], matcher);
+ }
+ return count;
+ }
+
+ private SegmentUtils() {
+ // Intended to be a helper class
+ }
+}
Propchange: harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/SegmentUtils.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/Attribute.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/Attribute.java?view=diff&rev=522864&r1=522863&r2=522864
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/Attribute.java (original)
+++ harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/Attribute.java Tue Mar 27 03:46:41 2007
@@ -19,9 +19,8 @@
import java.io.DataOutputStream;
import java.io.IOException;
-
public abstract class Attribute extends ClassFileEntry {
- private CPUTF8 attributeName;
+ private final CPUTF8 attributeName;
private int attributeNameIndex;
@@ -29,6 +28,12 @@
this.attributeName = new CPUTF8(attributeName);
}
+ protected void doWrite(DataOutputStream dos) throws IOException {
+ dos.writeShort(attributeNameIndex);
+ dos.writeInt(getLength());
+ writeBody(dos);
+ }
+
public boolean equals(Object obj) {
if (this == obj)
return true;
@@ -51,7 +56,10 @@
protected abstract int getLength();
-
+ protected ClassFileEntry[] getNestedClassFileEntries() {
+ return new ClassFileEntry[] { getAttributeName() };
+ }
+
public int hashCode() {
final int PRIME = 31;
int result = 1;
@@ -65,13 +73,6 @@
attributeNameIndex = pool.indexOf(attributeName);
}
- protected void doWrite(DataOutputStream dos) throws IOException {
- dos.writeShort(attributeNameIndex);
- dos.writeInt(getLength());
- writeBody(dos);
- }
-
- protected abstract void writeBody(DataOutputStream dos)
- throws IOException;
+ protected abstract void writeBody(DataOutputStream dos) throws IOException;
}
Added: harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/ByteCode.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/ByteCode.java?view=auto&rev=522864
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/ByteCode.java (added)
+++ harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/ByteCode.java Tue Mar 27 03:46:41 2007
@@ -0,0 +1,342 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.harmony.pack200.bytecode;
+
+import java.io.DataOutputStream;
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
+
+public class ByteCode extends ClassFileEntry {
+ private static final Map byteCodes = new HashMap();
+ static {
+ ByteCode[] byteCodeArray = new ByteCode[256];
+ byteCodeArray[0] = new ByteCode(0, "nop");
+ byteCodeArray[1] = new ByteCode(1, "aconst_null");
+ byteCodeArray[2] = new ByteCode(2, "iconst_m1");
+ byteCodeArray[3] = new ByteCode(3, "iconst_0");
+ byteCodeArray[4] = new ByteCode(4, "iconst_1");
+ byteCodeArray[5] = new ByteCode(5, "iconst_2");
+ byteCodeArray[6] = new ByteCode(6, "iconst_3");
+ byteCodeArray[7] = new ByteCode(7, "iconst_4");
+ byteCodeArray[8] = new ByteCode(8, "iconst_5");
+ byteCodeArray[9] = new ByteCode(9, "lconst_0");
+ byteCodeArray[10] = new ByteCode(10, "lconst_1");
+ byteCodeArray[11] = new ByteCode(11, "fconst_0");
+ byteCodeArray[12] = new ByteCode(12, "fconst_1");
+ byteCodeArray[13] = new ByteCode(13, "fconst_2");
+ byteCodeArray[14] = new ByteCode(14, "dconst_0");
+ byteCodeArray[15] = new ByteCode(15, "dconst_1");
+ byteCodeArray[16] = new ByteCode(16, "bipush");
+ byteCodeArray[17] = new ByteCode(17, "sipush");
+ byteCodeArray[18] = new ByteCode(18, "ldc", new int[] { 18, 0 });
+ byteCodeArray[19] = new ByteCode(19, "ldc_w");
+ byteCodeArray[20] = new ByteCode(20, "ldc2_w");
+ byteCodeArray[21] = new ByteCode(21, "iload");
+ byteCodeArray[22] = new ByteCode(22, "lload");
+ byteCodeArray[23] = new ByteCode(23, "fload");
+ byteCodeArray[24] = new ByteCode(24, "dload");
+ byteCodeArray[25] = new ByteCode(25, "aload");
+ byteCodeArray[26] = new ByteCode(26, "iload_0");
+ byteCodeArray[27] = new ByteCode(27, "iload_1");
+ byteCodeArray[28] = new ByteCode(28, "iload_2");
+ byteCodeArray[29] = new ByteCode(29, "iload_3");
+ byteCodeArray[30] = new ByteCode(30, "lload_0");
+ byteCodeArray[31] = new ByteCode(31, "lload_1");
+ byteCodeArray[32] = new ByteCode(32, "lload_2");
+ byteCodeArray[33] = new ByteCode(33, "lload_3");
+ byteCodeArray[34] = new ByteCode(34, "fload_0");
+ byteCodeArray[35] = new ByteCode(35, "fload_1");
+ byteCodeArray[36] = new ByteCode(36, "fload_2");
+ byteCodeArray[37] = new ByteCode(37, "fload_3");
+ byteCodeArray[38] = new ByteCode(38, "dload_0");
+ byteCodeArray[39] = new ByteCode(39, "dload_1");
+ byteCodeArray[40] = new ByteCode(40, "dload_2");
+ byteCodeArray[41] = new ByteCode(41, "dload_3");
+ byteCodeArray[42] = new ByteCode(42, "aload_0");
+ byteCodeArray[43] = new ByteCode(43, "aload_1");
+ byteCodeArray[44] = new ByteCode(44, "aload_2");
+ byteCodeArray[45] = new ByteCode(45, "aload_3");
+ byteCodeArray[46] = new ByteCode(46, "iaload");
+ byteCodeArray[47] = new ByteCode(47, "laload");
+ byteCodeArray[48] = new ByteCode(48, "faload");
+ byteCodeArray[49] = new ByteCode(49, "daload");
+ byteCodeArray[50] = new ByteCode(50, "aaload");
+ byteCodeArray[51] = new ByteCode(51, "baload");
+ byteCodeArray[52] = new ByteCode(52, "caload");
+ byteCodeArray[53] = new ByteCode(53, "saload");
+ byteCodeArray[54] = new ByteCode(54, "istore");
+ byteCodeArray[55] = new ByteCode(55, "lstore");
+ byteCodeArray[56] = new ByteCode(56, "fstore");
+ byteCodeArray[57] = new ByteCode(57, "dstore");
+ byteCodeArray[58] = new ByteCode(58, "astore");
+ byteCodeArray[59] = new ByteCode(59, "istore_0");
+ byteCodeArray[60] = new ByteCode(60, "istore_1");
+ byteCodeArray[61] = new ByteCode(61, "istore_2");
+ byteCodeArray[62] = new ByteCode(62, "istore_3");
+ byteCodeArray[63] = new ByteCode(63, "lstore_0");
+ byteCodeArray[64] = new ByteCode(64, "lstore_1");
+ byteCodeArray[65] = new ByteCode(65, "lstore_2");
+ byteCodeArray[66] = new ByteCode(66, "lstore_3");
+ byteCodeArray[67] = new ByteCode(67, "fstore_0");
+ byteCodeArray[68] = new ByteCode(68, "fstore_1");
+ byteCodeArray[69] = new ByteCode(69, "fstore_2");
+ byteCodeArray[70] = new ByteCode(70, "fstore_3");
+ byteCodeArray[71] = new ByteCode(71, "dstore_0");
+ byteCodeArray[72] = new ByteCode(72, "dstore_1");
+ byteCodeArray[73] = new ByteCode(73, "dstore_2");
+ byteCodeArray[74] = new ByteCode(74, "dstore_3");
+ byteCodeArray[75] = new ByteCode(75, "astore_0");
+ byteCodeArray[76] = new ByteCode(76, "astore_1");
+ byteCodeArray[77] = new ByteCode(77, "astore_2");
+ byteCodeArray[78] = new ByteCode(78, "astore_3");
+ byteCodeArray[79] = new ByteCode(79, "iastore");
+ byteCodeArray[80] = new ByteCode(80, "lastore");
+ byteCodeArray[81] = new ByteCode(81, "fastore");
+ byteCodeArray[82] = new ByteCode(82, "dastore");
+ byteCodeArray[83] = new ByteCode(83, "aastore");
+ byteCodeArray[84] = new ByteCode(84, "bastore");
+ byteCodeArray[85] = new ByteCode(85, "castore");
+ byteCodeArray[86] = new ByteCode(86, "sastore");
+ byteCodeArray[87] = new ByteCode(87, "pop");
+ byteCodeArray[88] = new ByteCode(88, "pop2");
+ byteCodeArray[89] = new ByteCode(89, "dup");
+ byteCodeArray[90] = new ByteCode(90, "dup_x1");
+ byteCodeArray[91] = new ByteCode(91, "dup_x2");
+ byteCodeArray[92] = new ByteCode(92, "dup2");
+ byteCodeArray[93] = new ByteCode(93, "dup2_x1");
+ byteCodeArray[94] = new ByteCode(94, "dup2_x2");
+ byteCodeArray[95] = new ByteCode(95, "swap");
+ byteCodeArray[96] = new ByteCode(96, "iadd");
+ byteCodeArray[97] = new ByteCode(97, "ladd");
+ byteCodeArray[98] = new ByteCode(98, "fadd");
+ byteCodeArray[99] = new ByteCode(99, "dadd");
+ byteCodeArray[100] = new ByteCode(100, "isub");
+ byteCodeArray[101] = new ByteCode(101, "lsub");
+ byteCodeArray[102] = new ByteCode(102, "fsub");
+ byteCodeArray[103] = new ByteCode(103, "dsub");
+ byteCodeArray[104] = new ByteCode(104, "imul");
+ byteCodeArray[105] = new ByteCode(105, "lmul");
+ byteCodeArray[106] = new ByteCode(106, "fmul");
+ byteCodeArray[107] = new ByteCode(107, "dmul");
+ byteCodeArray[108] = new ByteCode(108, "idiv");
+ byteCodeArray[109] = new ByteCode(109, "ldiv");
+ byteCodeArray[110] = new ByteCode(110, "fdiv");
+ byteCodeArray[111] = new ByteCode(111, "ddiv");
+ byteCodeArray[112] = new ByteCode(112, "irem");
+ byteCodeArray[113] = new ByteCode(113, "lrem");
+ byteCodeArray[114] = new ByteCode(114, "frem");
+ byteCodeArray[115] = new ByteCode(115, "drem");
+ byteCodeArray[116] = new ByteCode(116, "");
+ byteCodeArray[117] = new ByteCode(117, "lneg");
+ byteCodeArray[118] = new ByteCode(118, "fneg");
+ byteCodeArray[119] = new ByteCode(119, "dneg");
+ byteCodeArray[120] = new ByteCode(120, "ishl");
+ byteCodeArray[121] = new ByteCode(121, "lshl");
+ byteCodeArray[122] = new ByteCode(122, "ishr");
+ byteCodeArray[123] = new ByteCode(123, "lshr");
+ byteCodeArray[124] = new ByteCode(124, "iushr");
+ byteCodeArray[125] = new ByteCode(125, "lushr");
+ byteCodeArray[126] = new ByteCode(126, "iand");
+ byteCodeArray[127] = new ByteCode(127, "land");
+ byteCodeArray[128] = new ByteCode(128, "ior");
+ byteCodeArray[129] = new ByteCode(129, "lor");
+ byteCodeArray[130] = new ByteCode(130, "ixor");
+ byteCodeArray[131] = new ByteCode(131, "lxor");
+ byteCodeArray[132] = new ByteCode(132, "iinc");
+ byteCodeArray[133] = new ByteCode(133, "i2l");
+ byteCodeArray[134] = new ByteCode(134, "i2f");
+ byteCodeArray[135] = new ByteCode(135, "i2d");
+ byteCodeArray[136] = new ByteCode(136, "l2i");
+ byteCodeArray[137] = new ByteCode(137, "l2f");
+ byteCodeArray[138] = new ByteCode(138, "l2d");
+ byteCodeArray[139] = new ByteCode(139, "f2i");
+ byteCodeArray[140] = new ByteCode(140, "f2l");
+ byteCodeArray[141] = new ByteCode(141, "f2d");
+ byteCodeArray[142] = new ByteCode(142, "d2i");
+ byteCodeArray[143] = new ByteCode(143, "d2l");
+ byteCodeArray[144] = new ByteCode(144, "d2f");
+ byteCodeArray[145] = new ByteCode(145, "i2b");
+ byteCodeArray[146] = new ByteCode(146, "i2c");
+ byteCodeArray[147] = new ByteCode(147, "i2s");
+ byteCodeArray[148] = new ByteCode(148, "lcmp");
+ byteCodeArray[149] = new ByteCode(149, "fcmpl");
+ byteCodeArray[150] = new ByteCode(150, "fcmpg");
+ byteCodeArray[151] = new ByteCode(151, "dcmpl");
+ byteCodeArray[152] = new ByteCode(152, "dcmpg");
+ byteCodeArray[153] = new ByteCode(153, "ifeq");
+ byteCodeArray[154] = new ByteCode(154, "ifne");
+ byteCodeArray[155] = new ByteCode(155, "iflt");
+ byteCodeArray[156] = new ByteCode(156, "ifge");
+ byteCodeArray[157] = new ByteCode(157, "ifgt");
+ byteCodeArray[158] = new ByteCode(158, "ifle");
+ byteCodeArray[159] = new ByteCode(159, "if_icmpeq");
+ byteCodeArray[160] = new ByteCode(160, "if_icmpne");
+ byteCodeArray[161] = new ByteCode(161, "if_icmplt");
+ byteCodeArray[162] = new ByteCode(162, "if_icmpge");
+ byteCodeArray[163] = new ByteCode(163, "if_icmpgt");
+ byteCodeArray[164] = new ByteCode(164, "if_icmple");
+ byteCodeArray[165] = new ByteCode(165, "if_acmpeq");
+ byteCodeArray[166] = new ByteCode(166, "if_acmpne");
+ byteCodeArray[167] = new ByteCode(167, "goto");
+ byteCodeArray[168] = new ByteCode(168, "jsr");
+ byteCodeArray[169] = new ByteCode(169, "ret");
+ byteCodeArray[170] = new ByteCode(170, "tableswitch");
+ byteCodeArray[171] = new ByteCode(171, "lookupswitch");
+ byteCodeArray[172] = new ByteCode(172, "ireturn");
+ byteCodeArray[173] = new ByteCode(173, "lreturn");
+ byteCodeArray[174] = new ByteCode(174, "freturn");
+ byteCodeArray[175] = new ByteCode(175, "dreturn");
+ byteCodeArray[176] = new ByteCode(176, "areturn");
+ byteCodeArray[177] = new ByteCode(177, "return");
+ byteCodeArray[178] = new ByteCode(178, "getstatic", new int[] { 178, 0,
+ 0 });
+ byteCodeArray[179] = new ByteCode(179, "putstatic", new int[] { 179, 0,
+ 0 });
+ byteCodeArray[180] = new ByteCode(180, "getfield", new int[] { 180, 0,
+ 0 });
+ byteCodeArray[181] = new ByteCode(181, "putfield", new int[] { 181, 0,
+ 0 });
+ byteCodeArray[182] = new ByteCode(182, "invokevirtual", new int[] {
+ 182, 0, 0 });
+ byteCodeArray[183] = new ByteCode(183, "invokespecial", new int[] {
+ 183, 0, 0 });
+ byteCodeArray[184] = new ByteCode(184, "invokestatic", new int[] { 184,
+ 0, 0 });
+ byteCodeArray[185] = new ByteCode(185, "invokeinterface");
+ byteCodeArray[186] = new ByteCode(186, "xxxunusedxxx");
+ byteCodeArray[187] = new ByteCode(187, "new");
+ byteCodeArray[188] = new ByteCode(188, "newarray");
+ byteCodeArray[189] = new ByteCode(189, "anewarray");
+ byteCodeArray[190] = new ByteCode(190, "arraylength");
+ byteCodeArray[191] = new ByteCode(191, "athrow");
+ byteCodeArray[192] = new ByteCode(192, "checkcast");
+ byteCodeArray[193] = new ByteCode(193, "instanceof");
+ byteCodeArray[194] = new ByteCode(194, "monitorenter");
+ byteCodeArray[195] = new ByteCode(195, "monitorexit");
+ byteCodeArray[196] = new ByteCode(196, "wide");
+ byteCodeArray[197] = new ByteCode(197, "multianewarray");
+ byteCodeArray[198] = new ByteCode(198, "ifnull");
+ byteCodeArray[199] = new ByteCode(199, "ifnonnull");
+ byteCodeArray[200] = new ByteCode(200, "goto_w");
+ byteCodeArray[201] = new ByteCode(201, "jsr_w");
+ // Extra ones defined by pack200
+ byteCodeArray[202] = new ByteCode(202, "getstatic_this", new int[] {
+ 178, 0, 0 });
+ byteCodeArray[203] = new ByteCode(203, "putstatic_this", new int[] {
+ 179, 0, 0 });
+ byteCodeArray[204] = new ByteCode(204, "getfield_this", new int[] {
+ 180, 0, 0 });
+ byteCodeArray[205] = new ByteCode(205, "putfield_this", new int[] {
+ 181, 0, 0 });
+ byteCodeArray[231] = new ByteCode(231, "invokespecial_super_init",
+ new int[] { 183, 0, 0 });
+ // Reserved bytecodes
+ byteCodeArray[254] = new ByteCode(254, "impdep1");
+ byteCodeArray[255] = new ByteCode(255, "impdep2");
+ for (int i = 0; i < byteCodeArray.length; i++) {
+ ByteCode byteCode = byteCodeArray[i];
+ if (byteCode != null) {
+ byteCodes.put(new Integer(i), byteCode);
+ byteCodes.put(byteCode.name, byteCode);
+ }
+ }
+ }
+
+ public static ByteCode getByteCode(int opcode) {
+ ByteCode byteCode = (ByteCode) byteCodes
+ .get(new Integer(0xff & opcode));
+ if (byteCode == null)
+ throw new Error("Unknown bytecode");
+ return byteCode;
+ }
+
+ private final String name;
+ private final ClassFileEntry[] nested;
+ private final int opcode;
+ private final int[] rewrite;
+
+ protected ByteCode(int opcode, String name) {
+ this(opcode, name, new int[] { opcode });
+ }
+
+ protected ByteCode(int opcode, String name, int[] rewrite) {
+ this(opcode, name, rewrite, ClassFileEntry.NONE);
+ }
+
+ protected ByteCode(int opcode, String name, int[] rewrite,
+ ClassFileEntry[] nested) {
+ this.opcode = opcode;
+ this.name = name;
+ this.rewrite = rewrite;
+ this.nested = nested;
+ }
+
+ protected void doWrite(DataOutputStream dos) throws IOException {
+ // TODO operands?
+ for (int i = 0; i < rewrite.length; i++) {
+ if (opcode == 231 && i == 2)
+ dos.writeByte(8);
+ else
+ dos.writeByte(rewrite[i]);
+ }
+ }
+
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ final ByteCode other = (ByteCode) obj;
+ if (opcode != other.opcode)
+ return false;
+ return true;
+ }
+
+ public int getLength() {
+ return rewrite.length;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ protected ClassFileEntry[] getNestedClassFileEntries() {
+ if (opcode == 231) // TODO HACK
+ return new ClassFileEntry[] { new CPMethodRef("java/lang/Object",
+ "<init>:()V") };
+ else
+ return nested;
+ }
+
+ public int getOpcode() {
+ return opcode;
+ }
+
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + opcode;
+ return result;
+ }
+
+ public String toString() {
+ return name;
+ }
+}
Propchange: harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/ByteCode.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/CPFieldRef.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/CPFieldRef.java?view=diff&rev=522864&r1=522863&r2=522864
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/CPFieldRef.java (original)
+++ harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/CPFieldRef.java Tue Mar 27 03:46:41 2007
@@ -16,82 +16,10 @@
*/
package org.apache.harmony.pack200.bytecode;
-import java.io.DataOutputStream;
-import java.io.IOException;
+public class CPFieldRef extends CPRef {
-
-public class CPFieldRef extends ConstantPoolEntry {
-
- CPClass className;
- transient int classNameIndex;
-
-
- private CPNameAndType nameAndType;
- transient int nameAndTypeIndex;
public CPFieldRef(String className, String descriptor) {
- super(ConstantPoolEntry.CP_Fieldref);
- this.className = new CPClass(className);
- this.nameAndType = new CPNameAndType(descriptor);
- }
-
-
-
- protected ClassFileEntry[] getNestedClassFileEntries() {
- ClassFileEntry[] entries = new ClassFileEntry[2];
- entries[0] = className;
- entries[1] = nameAndType;
- return entries;
- }
-
-
-
- protected void resolve(ClassConstantPool pool) {
- super.resolve(pool);
- nameAndTypeIndex = pool.indexOf(nameAndType);
- classNameIndex = pool.indexOf(className);
- }
-
- protected void writeBody(DataOutputStream dos) throws IOException {
- dos.writeShort(classNameIndex);
- dos.writeShort(nameAndTypeIndex);
- }
-
-
- public String toString() {
- return "FieldRef: " + className + "#" + nameAndType;
- }
-
-
-
- public int hashCode() {
- final int PRIME = 31;
- int result = 1;
- result = PRIME * result + ((className == null) ? 0 : className.hashCode());
- result = PRIME * result + ((nameAndType == null) ? 0 : nameAndType.hashCode());
- return result;
- }
-
-
-
- public boolean equals(Object obj) {
- if (this == obj)
- return true;
- if (obj == null)
- return false;
- if (getClass() != obj.getClass())
- return false;
- final CPFieldRef other = (CPFieldRef) obj;
- if (className == null) {
- if (other.className != null)
- return false;
- } else if (!className.equals(other.className))
- return false;
- if (nameAndType == null) {
- if (other.nameAndType != null)
- return false;
- } else if (!nameAndType.equals(other.nameAndType))
- return false;
- return true;
+ super(ConstantPoolEntry.CP_Fieldref, className, descriptor);
}
-}
\ No newline at end of file
+}
Added: harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/CPInterfaceMethodRef.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/CPInterfaceMethodRef.java?view=auto&rev=522864
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/CPInterfaceMethodRef.java (added)
+++ harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/CPInterfaceMethodRef.java Tue Mar 27 03:46:41 2007
@@ -0,0 +1,25 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.harmony.pack200.bytecode;
+
+public class CPInterfaceMethodRef extends CPRef {
+
+ public CPInterfaceMethodRef(String className, String descriptor) {
+ super(ConstantPoolEntry.CP_InterfaceMethodref, className, descriptor);
+ }
+
+}
Propchange: harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/CPInterfaceMethodRef.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/CPMethod.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/CPMethod.java?view=diff&rev=522864&r1=522863&r2=522864
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/CPMethod.java (original)
+++ harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/CPMethod.java Tue Mar 27 03:46:41 2007
@@ -21,7 +21,8 @@
public class CPMethod extends CPMember {
public CPMethod(String descriptor, long flags, List attributes) {
- super(descriptor, flags, attributes);
+ // TODO Check that we only pass these on, or remap
+ super(descriptor, 0x7FFF & flags, attributes);
}
}
Added: harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/CPMethodRef.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/CPMethodRef.java?view=auto&rev=522864
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/CPMethodRef.java (added)
+++ harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/CPMethodRef.java Tue Mar 27 03:46:41 2007
@@ -0,0 +1,25 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.harmony.pack200.bytecode;
+
+public class CPMethodRef extends CPRef {
+
+ public CPMethodRef(String className, String descriptor) {
+ super(ConstantPoolEntry.CP_Methodref, className, descriptor);
+ }
+
+}
Propchange: harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/CPMethodRef.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/CPRef.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/CPRef.java?view=auto&rev=522864
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/CPRef.java (added)
+++ harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/CPRef.java Tue Mar 27 03:46:41 2007
@@ -0,0 +1,99 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.harmony.pack200.bytecode;
+
+import java.io.DataOutputStream;
+import java.io.IOException;
+
+public abstract class CPRef extends ConstantPoolEntry {
+
+ CPClass className;
+ transient int classNameIndex;
+
+ private final CPNameAndType nameAndType;
+ transient int nameAndTypeIndex;
+
+ public CPRef(byte type, String className, String descriptor) {
+ super(type);
+ this.className = new CPClass(className);
+ this.nameAndType = new CPNameAndType(descriptor);
+ }
+
+ public boolean equals(Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ final CPRef other = (CPRef) obj;
+ if (className == null) {
+ if (other.className != null)
+ return false;
+ } else if (!className.equals(other.className))
+ return false;
+ if (nameAndType == null) {
+ if (other.nameAndType != null)
+ return false;
+ } else if (!nameAndType.equals(other.nameAndType))
+ return false;
+ return true;
+ }
+
+ protected ClassFileEntry[] getNestedClassFileEntries() {
+ ClassFileEntry[] entries = new ClassFileEntry[2];
+ entries[0] = className;
+ entries[1] = nameAndType;
+ return entries;
+ }
+
+ public int hashCode() {
+ final int PRIME = 31;
+ int result = 1;
+ result = PRIME * result
+ + ((className == null) ? 0 : className.hashCode());
+ result = PRIME * result
+ + ((nameAndType == null) ? 0 : nameAndType.hashCode());
+ return result;
+ }
+
+ protected void resolve(ClassConstantPool pool) {
+ super.resolve(pool);
+ nameAndTypeIndex = pool.indexOf(nameAndType);
+ classNameIndex = pool.indexOf(className);
+ }
+
+ public String toString() {
+ String type;
+ if (getTag() == ConstantPoolEntry.CP_Fieldref) {
+ type = "FieldRef"; //$NON-NLS-1$
+ } else if (getTag() == ConstantPoolEntry.CP_Methodref) {
+ type = "MethoddRef"; //$NON-NLS-1$
+ } else if (getTag() == ConstantPoolEntry.CP_InterfaceMethodref) {
+ type = "InterfaceMethodRef"; //$NON-NLS-1$
+ } else {
+ type = "unknown"; //$NON-NLS-1$
+ }
+ return type + ": " + className + "#" + nameAndType; //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ protected void writeBody(DataOutputStream dos) throws IOException {
+ dos.writeShort(classNameIndex);
+ dos.writeShort(nameAndTypeIndex);
+ }
+
+}
\ No newline at end of file
Propchange: harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/CPRef.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/ClassFileEntry.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/ClassFileEntry.java?view=diff&rev=522864&r1=522863&r2=522864
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/ClassFileEntry.java (original)
+++ harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/ClassFileEntry.java Tue Mar 27 03:46:41 2007
@@ -24,9 +24,11 @@
import java.io.IOException;
public abstract class ClassFileEntry {
- private static final ClassFileEntry[] NONE = new ClassFileEntry[0];
+ protected static final ClassFileEntry[] NONE = new ClassFileEntry[0];
private boolean resolved;
+ protected abstract void doWrite(DataOutputStream dos) throws IOException;
+
public abstract boolean equals(Object arg0);
protected ClassFileEntry[] getNestedClassFileEntries() {
@@ -47,11 +49,9 @@
public abstract String toString();
public final void write(DataOutputStream dos) throws IOException {
- if(!resolved)
+ if (!resolved)
throw new IllegalStateException("Entry has not been resolved");
doWrite(dos);
}
-
- protected abstract void doWrite(DataOutputStream dos) throws IOException;
}
Added: harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/ExceptionTableEntry.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/ExceptionTableEntry.java?view=auto&rev=522864
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/ExceptionTableEntry.java (added)
+++ harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/ExceptionTableEntry.java Tue Mar 27 03:46:41 2007
@@ -0,0 +1,34 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.harmony.pack200.bytecode;
+
+import java.io.DataOutputStream;
+import java.io.IOException;
+
+public class ExceptionTableEntry {
+ public int catchType;
+ public int endPC;
+ public int handlerPC;
+ public int startPC;
+
+ public void write(DataOutputStream dos) throws IOException {
+ dos.writeShort(startPC);
+ dos.writeShort(endPC);
+ dos.writeShort(handlerPC);
+ dos.writeShort(catchType);
+ }
+}
Propchange: harmony/enhanced/classlib/trunk/modules/pack200/src/main/java/org/apache/harmony/pack200/bytecode/ExceptionTableEntry.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: harmony/enhanced/classlib/trunk/modules/pack200/src/test/java/org/apache/harmony/pack200/tests/SegmentUtilsTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/pack200/src/test/java/org/apache/harmony/pack200/tests/SegmentUtilsTest.java?view=auto&rev=522864
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/pack200/src/test/java/org/apache/harmony/pack200/tests/SegmentUtilsTest.java (added)
+++ harmony/enhanced/classlib/trunk/modules/pack200/src/test/java/org/apache/harmony/pack200/tests/SegmentUtilsTest.java Tue Mar 27 03:46:41 2007
@@ -0,0 +1,49 @@
+package org.apache.harmony.pack200.tests;
+
+import junit.framework.TestCase;
+
+import org.apache.harmony.pack200.IMatcher;
+import org.apache.harmony.pack200.SegmentUtils;
+
+public class SegmentUtilsTest extends TestCase {
+ private static class MultipleMatches implements IMatcher {
+ private final int divisor;
+
+ public MultipleMatches(int divisor) {
+ this.divisor = divisor;
+ }
+
+ public boolean matches(long value) {
+ return value % divisor == 0;
+ }
+
+ }
+
+ public static final IMatcher even = new MultipleMatches(2);
+ public static final IMatcher five = new MultipleMatches(5);
+
+ public void testCountArgs() {
+ assertEquals(0, SegmentUtils.countArgs("()V"));
+ assertEquals(1, SegmentUtils.countArgs("(D)V"));
+ assertEquals(1, SegmentUtils.countArgs("([D)V"));
+ assertEquals(1, SegmentUtils.countArgs("([[D)V"));
+ assertEquals(2, SegmentUtils.countArgs("(DD)V"));
+ assertEquals(3, SegmentUtils.countArgs("(DDD)V"));
+ assertEquals(2, SegmentUtils.countArgs("(Lblah/blah;D)V"));
+ assertEquals(3, SegmentUtils.countArgs("(Lblah/blah;DLbLah;)V"));
+ }
+
+ public void testMatches() {
+ long[] oneToTen = new long[] { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };
+ assertEquals(6, SegmentUtils.countMatches(new long[][] { oneToTen,
+ new long[] { 5, 6, 7 } }, even));
+ assertEquals(5, SegmentUtils.countMatches(new long[][] { oneToTen },
+ even));
+ assertEquals(5, SegmentUtils.countMatches(oneToTen, even));
+ assertEquals(3, SegmentUtils.countMatches(new long[][] { oneToTen,
+ new long[] { 5, 6, 7 } }, five));
+ assertEquals(2, SegmentUtils.countMatches(new long[][] { oneToTen },
+ five));
+ assertEquals(2, SegmentUtils.countMatches(oneToTen, five));
+ }
+}
Propchange: harmony/enhanced/classlib/trunk/modules/pack200/src/test/java/org/apache/harmony/pack200/tests/SegmentUtilsTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: harmony/enhanced/classlib/trunk/modules/pack200/src/test/java/org/apache/harmony/pack200/tests/bytecode/ByteCodeTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/pack200/src/test/java/org/apache/harmony/pack200/tests/bytecode/ByteCodeTest.java?view=auto&rev=522864
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/pack200/src/test/java/org/apache/harmony/pack200/tests/bytecode/ByteCodeTest.java (added)
+++ harmony/enhanced/classlib/trunk/modules/pack200/src/test/java/org/apache/harmony/pack200/tests/bytecode/ByteCodeTest.java Tue Mar 27 03:46:41 2007
@@ -0,0 +1,29 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.harmony.pack200.tests.bytecode;
+
+import junit.framework.TestCase;
+
+import org.apache.harmony.pack200.bytecode.ByteCode;
+
+public class ByteCodeTest extends TestCase {
+ public void testByteCode() {
+ assertEquals("nop", ByteCode.getByteCode(0).getName());
+ assertEquals("return", ByteCode.getByteCode(-79).getName());
+ assertEquals("return", ByteCode.getByteCode(177).getName());
+ }
+}
Propchange: harmony/enhanced/classlib/trunk/modules/pack200/src/test/java/org/apache/harmony/pack200/tests/bytecode/ByteCodeTest.java
------------------------------------------------------------------------------
svn:eol-style = native