harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hinde...@apache.org
Subject svn commit: r999573 [4/4] - in /harmony/enhanced/java/branches/mrh: ./ classlib/ classlib/depends/build/ classlib/depends/files/ classlib/depends/jars/ classlib/depends/manifests/icu4j_4.2.1/META-INF/ classlib/depends/manifests/icu4j_4.4.1.1/ classlib/...
Date Tue, 21 Sep 2010 19:46:00 GMT
Modified: harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/test/java/org/apache/harmony/pack200/tests/ArchiveTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/test/java/org/apache/harmony/pack200/tests/ArchiveTest.java?rev=999573&r1=999572&r2=999573&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/test/java/org/apache/harmony/pack200/tests/ArchiveTest.java (original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/test/java/org/apache/harmony/pack200/tests/ArchiveTest.java Tue Sep 21 19:45:57 2010
@@ -19,6 +19,7 @@ package org.apache.harmony.pack200.tests
 import java.io.BufferedReader;
 import java.io.File;
 import java.io.FileInputStream;
+import java.io.FileNotFoundException;
 import java.io.FileOutputStream;
 import java.io.IOException;
 import java.io.InputStream;
@@ -28,6 +29,7 @@ import java.net.URISyntaxException;
 import java.util.Enumeration;
 import java.util.jar.JarEntry;
 import java.util.jar.JarFile;
+import java.util.jar.JarInputStream;
 import java.util.jar.JarOutputStream;
 
 import junit.framework.TestCase;
@@ -47,6 +49,7 @@ public class ArchiveTest extends TestCas
         in = new JarFile(new File(Archive.class.getResource(
                 "/org/apache/harmony/pack200/tests/hw.jar").toURI()));
         file = File.createTempFile("helloworld", ".pack.gz");
+        file.deleteOnExit();
         out = new FileOutputStream(file);
         new Archive(in, out, null).pack();
         in.close();
@@ -55,6 +58,7 @@ public class ArchiveTest extends TestCas
         // now unpack
         InputStream in2 = new FileInputStream(file);
         File file2 = File.createTempFile("helloworld", ".jar");
+        file2.deleteOnExit();
         JarOutputStream out2 = new JarOutputStream(new FileOutputStream(file2));
         org.apache.harmony.unpack200.Archive archive = new org.apache.harmony.unpack200.Archive(
                 in2, out2);
@@ -63,7 +67,6 @@ public class ArchiveTest extends TestCas
         in2.close();
 
         JarFile jarFile = new JarFile(file2);
-        file2.deleteOnExit();
         JarEntry entry = jarFile
                 .getJarEntry("org/apache/harmony/archive/tests/internal/pack200/HelloWorld.class");
         assertNotNull(entry);
@@ -97,6 +100,7 @@ public class ArchiveTest extends TestCas
         in = new JarFile(new File(Archive.class.getResource(
                 "/org/apache/harmony/pack200/tests/sqlUnpacked.jar").toURI()));
         file = File.createTempFile("sql", ".pack");
+        file.deleteOnExit();
         out = new FileOutputStream(file);
         PackingOptions options = new PackingOptions();
         options.setGzip(false);
@@ -108,11 +112,11 @@ public class ArchiveTest extends TestCas
         // now unpack
         InputStream in2 = new FileInputStream(file);
         File file2 = File.createTempFile("sqlout", ".jar");
+        file2.deleteOnExit();
         JarOutputStream out2 = new JarOutputStream(new FileOutputStream(file2));
         org.apache.harmony.unpack200.Archive archive = new org.apache.harmony.unpack200.Archive(in2, out2);
         archive.unpack();
         JarFile jarFile = new JarFile(file2);
-        file2.deleteOnExit();
 
         File compareFile = new File(Archive.class.getResource(
                 "/org/apache/harmony/pack200/tests/sqlUnpacked.jar").toURI());
@@ -123,11 +127,26 @@ public class ArchiveTest extends TestCas
         compareFiles(jarFile, jarFile2);
     }
 
-    public void testLargeClass() throws IOException, Pack200Exception, URISyntaxException {
+    public void testAlternativeConstructor() throws FileNotFoundException,
+            IOException, URISyntaxException, Pack200Exception {
+        JarInputStream inStream = new JarInputStream(new FileInputStream(
+                new File(Archive.class.getResource(
+                        "/org/apache/harmony/pack200/tests/sqlUnpacked.jar").toURI())));
+        file = File.createTempFile("sql", ".pack.gz");
+        file.deleteOnExit();
+        out = new FileOutputStream(file);
+        new Archive(inStream, out, null).pack();
+        inStream.close();
+        out.close();
+    }
+
+    public void testLargeClass() throws IOException, Pack200Exception,
+            URISyntaxException {
         in = new JarFile(new File(Archive.class.getResource(
                 "/org/apache/harmony/pack200/tests/largeClassUnpacked.jar")
                 .toURI()));
         file = File.createTempFile("largeClass", ".pack");
+        file.deleteOnExit();
         out = new FileOutputStream(file);
         PackingOptions options = new PackingOptions();
         options.setGzip(false);
@@ -138,11 +157,11 @@ public class ArchiveTest extends TestCas
         // now unpack
         InputStream in2 = new FileInputStream(file);
         File file2 = File.createTempFile("largeClassOut", ".jar");
+        file2.deleteOnExit();
         JarOutputStream out2 = new JarOutputStream(new FileOutputStream(file2));
         org.apache.harmony.unpack200.Archive archive = new org.apache.harmony.unpack200.Archive(in2, out2);
         archive.unpack();
         JarFile jarFile = new JarFile(file2);
-        file2.deleteOnExit();
 
         File compareFile = new File(Archive.class.getResource(
                 "/org/apache/harmony/pack200/tests/largeClassUnpacked.jar").toURI());
@@ -157,6 +176,7 @@ public class ArchiveTest extends TestCas
         in = new JarFile(new File(Archive.class.getResource(
                 "/org/apache/harmony/pack200/tests/jndi.jar").toURI()));
         file = File.createTempFile("jndi", ".pack");
+        file.deleteOnExit();
         out = new FileOutputStream(file);
         PackingOptions options = new PackingOptions();
         options.setGzip(false);
@@ -167,162 +187,24 @@ public class ArchiveTest extends TestCas
         // now unpack
         InputStream in2 = new FileInputStream(file);
         File file2 = File.createTempFile("jndiout", ".jar");
+        file2.deleteOnExit();
         JarOutputStream out2 = new JarOutputStream(new FileOutputStream(file2));
         org.apache.harmony.unpack200.Archive archive = new org.apache.harmony.unpack200.Archive(in2, out2);
         archive.unpack();
         JarFile jarFile = new JarFile(file2);
-        file2.deleteOnExit();
         JarFile jarFile2 = new JarFile(new File(Archive.class.getResource(
                 "/org/apache/harmony/pack200/tests/jndiUnpacked.jar").toURI()));
 
         compareFiles(jarFile, jarFile2);
     }
 
-    public void testSegmentLimits() throws IOException, Pack200Exception,
-            URISyntaxException {
-        in = new JarFile(new File(Archive.class.getResource(
-                "/org/apache/harmony/pack200/tests/hw.jar").toURI()));
-        file = File.createTempFile("helloworld", ".pack.gz");
-        out = new FileOutputStream(file);
-        PackingOptions options = new PackingOptions();
-        options.setSegmentLimit(0);
-        Archive archive = new Archive(in, out, options);
-        archive.pack();
-        in.close();
-        out.close();
-
-        in = new JarFile(new File(Archive.class.getResource(
-                "/org/apache/harmony/pack200/tests/hw.jar").toURI()));
-        file = File.createTempFile("helloworld", ".pack.gz");
-        out = new FileOutputStream(file);
-        options = new PackingOptions();
-        options.setSegmentLimit(-1);
-        archive = new Archive(in, out, options);
-        archive.pack();
-        in.close();
-        out.close();
-
-        in = new JarFile(new File(Archive.class.getResource(
-                "/org/apache/harmony/pack200/tests/hw.jar").toURI()));
-        file = File.createTempFile("helloworld", ".pack.gz");
-        out = new FileOutputStream(file);
-        options = new PackingOptions();
-        options.setSegmentLimit(5000);
-        archive = new Archive(in, out, options);
-        archive.pack();
-        in.close();
-        out.close();
-    }
-
-    public void testStripDebug() throws IOException, Pack200Exception, URISyntaxException {
-        in = new JarFile(new File(Archive.class
-                .getResource("/org/apache/harmony/pack200/tests/sqlUnpacked.jar").toURI()));
-        file = File.createTempFile("sql", ".pack");
-        out = new FileOutputStream(file);
-        PackingOptions options = new PackingOptions();
-        options.setGzip(false);
-        options.setStripDebug(true);
-        Archive archive = new Archive(in, out, options);
-        archive.pack();
-        in.close();
-        out.close();
-
-        // now unpack
-        InputStream in2 = new FileInputStream(file);
-        File file2 = File.createTempFile("sqloutNoDebug", ".jar");
-        JarOutputStream out2 = new JarOutputStream(new FileOutputStream(file2));
-        org.apache.harmony.unpack200.Archive u2archive = new org.apache.harmony.unpack200.Archive(in2, out2);
-        u2archive.unpack();
-
-        File compareFile = new File(Archive.class.getResource(
-                "/org/apache/harmony/pack200/tests/sqlUnpackedNoDebug.jar").toURI());
-        JarFile jarFile = new JarFile(file2);
-        assertTrue(file2.length() < 250000);
-        file2.deleteOnExit();
-
-        JarFile jarFile2 = new JarFile(compareFile);
-
-        compareFiles(jarFile, jarFile2);
-    }
-
-    public void testPassFiles() throws IOException, URISyntaxException, Pack200Exception {
-        // Don't pass any
-        in = new JarFile(new File(Archive.class
-                .getResource("/org/apache/harmony/pack200/tests/sqlUnpacked.jar").toURI()));
-        File file0 = File.createTempFile("sql", ".pack");
-        out = new FileOutputStream(file0);
-        PackingOptions options = new PackingOptions();
-        options.setGzip(false);
-        Archive archive = new Archive(in, out, options);
-        archive.pack();
-        in.close();
-        out.close();
-
-        // Pass one file
-        in = new JarFile(new File(Archive.class
-                .getResource("/org/apache/harmony/pack200/tests/sqlUnpacked.jar").toURI()));
-        file = File.createTempFile("sql", ".pack");
-        out = new FileOutputStream(file);
-        options = new PackingOptions();
-        options.setGzip(false);
-        options.addPassFile("bin/test/org/apache/harmony/sql/tests/java/sql/DatabaseMetaDataTest.class");
-        assertTrue(options.isPassFile("bin/test/org/apache/harmony/sql/tests/java/sql/DatabaseMetaDataTest.class"));
-        archive = new Archive(in, out, options);
-        archive.pack();
-        in.close();
-        out.close();
-
-        // Pass a whole directory
-        in = new JarFile(new File(Archive.class
-                .getResource("/org/apache/harmony/pack200/tests/sqlUnpacked.jar").toURI()));
-        File file2 = File.createTempFile("sql", ".pack");
-        out = new FileOutputStream(file2);
-        options = new PackingOptions();
-        options.setGzip(false);
-        options.addPassFile("bin/test/org/apache/harmony/sql/tests/java/sql");
-        assertTrue(options.isPassFile("bin/test/org/apache/harmony/sql/tests/java/sql/DatabaseMetaDataTest.class"));
-        assertFalse(options.isPassFile("bin/test/org/apache/harmony/sql/tests/java/sqldata/SqlData.class"));
-        archive = new Archive(in, out, options);
-        archive.pack();
-        in.close();
-        out.close();
-
-        assertTrue("If files are passed then the pack file should be larger", file.length() > file0.length());
-        assertTrue("If more files are passed then the pack file should be larger", file2.length() > file.length());
-
-        // now unpack
-        InputStream in2 = new FileInputStream(file);
-        File file3 = File.createTempFile("sql", ".jar");
-        JarOutputStream out2 = new JarOutputStream(new FileOutputStream(file3));
-        org.apache.harmony.unpack200.Archive u2archive = new org.apache.harmony.unpack200.Archive(in2, out2);
-        u2archive.unpack();
-
-        File compareFile = new File(Archive.class.getResource(
-                "/org/apache/harmony/pack200/tests/sqlUnpacked.jar").toURI());
-        JarFile jarFile = new JarFile(file3);
-        file2.deleteOnExit();
-
-        JarFile jarFile2 = new JarFile(compareFile);
-        // Check that both jars have the same entries
-        compareJarEntries(jarFile, jarFile2);
-
-        // now unpack the file with lots of passed files
-        InputStream in3 = new FileInputStream(file2);
-        File file4 = File.createTempFile("sql", ".jar");
-        JarOutputStream out3 = new JarOutputStream(new FileOutputStream(file4));
-        u2archive = new org.apache.harmony.unpack200.Archive(in3, out3);
-        u2archive.unpack();
-        jarFile = new JarFile(file4);
-        jarFile2 = new JarFile(compareFile);
-        compareJarEntries(jarFile, jarFile2);
-    }
-
     public void testAnnotations() throws IOException, Pack200Exception,
             URISyntaxException {
         in = new JarFile(new File(Archive.class.getResource(
                 "/org/apache/harmony/pack200/tests/annotationsUnpacked.jar")
                 .toURI()));
         file = File.createTempFile("annotations", ".pack");
+        file.deleteOnExit();
         out = new FileOutputStream(file);
         PackingOptions options = new PackingOptions();
         options.setGzip(false);
@@ -333,12 +215,12 @@ public class ArchiveTest extends TestCas
         // now unpack
         InputStream in2 = new FileInputStream(file);
         File file2 = File.createTempFile("annotationsout", ".jar");
+        file2.deleteOnExit();
         JarOutputStream out2 = new JarOutputStream(new FileOutputStream(file2));
         org.apache.harmony.unpack200.Archive archive = new org.apache.harmony.unpack200.Archive(
                 in2, out2);
         archive.unpack();
         JarFile jarFile = new JarFile(file2);
-        file2.deleteOnExit();
         JarFile jarFile2 = new JarFile(new File(Archive.class.getResource(
                 "/org/apache/harmony/pack200/tests/annotationsUnpacked.jar").toURI()));
 
@@ -347,6 +229,7 @@ public class ArchiveTest extends TestCas
 
     public void testAnnotations2() throws IOException, Pack200Exception,
             URISyntaxException {
+
         in = new JarFile(new File(Archive.class.getResource(
                 "/org/apache/harmony/pack200/tests/annotations.jar").toURI()));
         file = File.createTempFile("annotations", ".pack");
@@ -361,51 +244,38 @@ public class ArchiveTest extends TestCas
         // now unpack
         InputStream in2 = new FileInputStream(file);
         File file2 = File.createTempFile("annotationsout", ".jar");
-        // file2.deleteOnExit();
+        file2.deleteOnExit();
         JarOutputStream out2 = new JarOutputStream(new FileOutputStream(file2));
         org.apache.harmony.unpack200.Archive archive = new org.apache.harmony.unpack200.Archive(
                 in2, out2);
         archive.unpack();
 
         // TODO: This isn't quite right - to fix
-//        JarFile jarFile = new JarFile(file2);
-//        JarFile jarFile2 = new JarFile(new File(Archive.class.getResource(
-//                "/org/apache/harmony/pack200/tests/annotations2unpacked.jar")
-//                .toURI()));
-//        compareFiles(jarFile, jarFile2);
+        JarFile jarFile = new JarFile(file2);
+        JarFile jarFile2 = new JarFile(new File(Archive.class.getResource(
+                "/org/apache/harmony/pack200/tests/annotationsRI.jar")
+                .toURI()));
+        compareFiles(jarFile, jarFile2);
     }
 
-    public void testE0() throws Pack200Exception, IOException, URISyntaxException {
-        File f1 = new File(Archive.class.getResource(
-                "/org/apache/harmony/pack200/tests/jndi.jar").toURI());
-        in = new JarFile(f1);
-        file = File.createTempFile("jndiE0", ".pack");
-        out = new FileOutputStream(file);
-        PackingOptions options = new PackingOptions();
-        options.setGzip(false);
-        options.setEffort(0);
-        Archive archive = new Archive(in, out, options);
-        archive.pack();
-        in.close();
-        out.close();
-        compareFiles(new JarFile(f1), new JarFile(file));
+//     Test with an archive containing Annotations
+    public void testWithAnnotations2() throws Exception {
+        InputStream i = Archive.class
+                .getResourceAsStream("/org/apache/harmony/pack200/tests/annotationsRI.pack.gz");
+        file = File.createTempFile("annotations", ".jar");
+        file.deleteOnExit();
+        JarOutputStream jout = new JarOutputStream(new FileOutputStream(file));
+        org.apache.harmony.unpack200.Archive archive = new org.apache.harmony.unpack200.Archive(
+                i, jout);
+        archive.unpack();
+        JarFile jarFile = new JarFile(file);
+        JarFile jarFile2 = new JarFile(new File(Archive.class.getResource(
+                "/org/apache/harmony/pack200/tests/annotationsRI.jar")
+                .toURI()));
 
+        compareFiles(jarFile, jarFile2);
     }
 
-//    public void testE0again() throws IOException, Pack200Exception, URISyntaxException {
-//        JarInputStream inputStream = new JarInputStream(Archive.class.getResourceAsStream("/org/apache/harmony/pack200/tests/jndi.jar"));
-//        file = File.createTempFile("jndiE0", ".pack");
-//        out = new FileOutputStream(file);
-//        Archive archive = new Archive(inputStream, out, false);
-//        archive.setEffort(0);
-//        archive.pack();
-//        inputStream.close();
-//        out.close();
-//        in = new JarFile(new File(Archive.class.getResource(
-//                "/org/apache/harmony/pack200/tests/jndi.jar").toURI()));
-//        compareFiles(in, new JarFile(file));
-//    }
-
     public void testMultipleJars() throws URISyntaxException, IOException, Pack200Exception {
     	File folder = new File(Archive.class
     			.getResource("/org/apache/harmony/pack200/tests/jars").toURI());
@@ -415,6 +285,7 @@ public class ArchiveTest extends TestCas
 				File inputFile = new File(folder, children[i]);
 				in = new JarFile(inputFile);
 				file = File.createTempFile("temp", ".pack.gz");
+		        file.deleteOnExit();
 		        out = new FileOutputStream(file);
 //		        System.out.println("packing " + children[i]);
 		        new Archive(in, out, null).pack();

Modified: harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/test/java/org/apache/harmony/pack200/tests/CodecTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/test/java/org/apache/harmony/pack200/tests/CodecTest.java?rev=999573&r1=999572&r2=999573&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/test/java/org/apache/harmony/pack200/tests/CodecTest.java (original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/test/java/org/apache/harmony/pack200/tests/CodecTest.java Tue Sep 21 19:45:57 2010
@@ -26,7 +26,6 @@ import org.apache.harmony.pack200.BHSDCo
 import org.apache.harmony.pack200.CanonicalCodecFamilies;
 import org.apache.harmony.pack200.Codec;
 import org.apache.harmony.pack200.Pack200Exception;
-import org.apache.harmony.pack200.RunCodec;
 
 /**
  * 
@@ -205,6 +204,15 @@ public class CodecTest extends TestCase 
         checkAscendingCardinalities(CanonicalCodecFamilies.deltaUnsignedCodecs3);
         checkAscendingCardinalities(CanonicalCodecFamilies.deltaUnsignedCodecs4);
         checkAscendingCardinalities(CanonicalCodecFamilies.deltaUnsignedCodecs5);
+        checkAscendingCardinalities(CanonicalCodecFamilies.nonDeltaSignedCodecs1);
+        checkAscendingCardinalities(CanonicalCodecFamilies.nonDeltaSignedCodecs2);
+        checkAscendingCardinalities(CanonicalCodecFamilies.nonDeltaDoubleSignedCodecs1);
+        checkAscendingCardinalities(CanonicalCodecFamilies.deltaSignedCodecs1);
+        checkAscendingCardinalities(CanonicalCodecFamilies.deltaSignedCodecs2);
+        checkAscendingCardinalities(CanonicalCodecFamilies.deltaSignedCodecs3);
+        checkAscendingCardinalities(CanonicalCodecFamilies.deltaSignedCodecs4);
+        checkAscendingCardinalities(CanonicalCodecFamilies.deltaSignedCodecs5);
+        checkAscendingCardinalities(CanonicalCodecFamilies.deltaDoubleSignedCodecs1);
     }
 
     private void checkAscendingCardinalities(BHSDCodec[] family) {

Modified: harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/test/java/org/apache/harmony/pack200/tests/NewAttributeBandsTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/test/java/org/apache/harmony/pack200/tests/NewAttributeBandsTest.java?rev=999573&r1=999572&r2=999573&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/test/java/org/apache/harmony/pack200/tests/NewAttributeBandsTest.java (original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/test/java/org/apache/harmony/pack200/tests/NewAttributeBandsTest.java Tue Sep 21 19:45:57 2010
@@ -24,14 +24,12 @@ import java.util.List;
 import junit.framework.TestCase;
 
 import org.apache.harmony.pack200.AttributeDefinitionBands;
+import org.apache.harmony.pack200.AttributeDefinitionBands.AttributeDefinition;
 import org.apache.harmony.pack200.CPUTF8;
 import org.apache.harmony.pack200.Codec;
 import org.apache.harmony.pack200.CpBands;
 import org.apache.harmony.pack200.NewAttribute;
 import org.apache.harmony.pack200.NewAttributeBands;
-import org.apache.harmony.pack200.Pack200Exception;
-import org.apache.harmony.pack200.SegmentHeader;
-import org.apache.harmony.pack200.AttributeDefinitionBands.AttributeDefinition;
 import org.apache.harmony.pack200.NewAttributeBands.Call;
 import org.apache.harmony.pack200.NewAttributeBands.Callable;
 import org.apache.harmony.pack200.NewAttributeBands.Integral;
@@ -39,6 +37,8 @@ import org.apache.harmony.pack200.NewAtt
 import org.apache.harmony.pack200.NewAttributeBands.Replication;
 import org.apache.harmony.pack200.NewAttributeBands.Union;
 import org.apache.harmony.pack200.NewAttributeBands.UnionCase;
+import org.apache.harmony.pack200.Pack200Exception;
+import org.apache.harmony.pack200.SegmentHeader;
 
 /**
  * Tests for pack200 support for non-predefined attributes
@@ -200,6 +200,65 @@ public class NewAttributeBandsTest exten
         Call call = (Call) repBody.get(0);
         assertEquals(1, call.getCallableIndex());
         assertEquals(secondCallable, call.getCallable());
+        assertFalse(firstCallable.isBackwardsCallable());
+        assertFalse(secondCallable.isBackwardsCallable());
+        assertFalse(thirdCallable.isBackwardsCallable());
+    }
+
+    public void testLayoutWithBackwardsCalls() throws Exception {
+        CPUTF8 name = new CPUTF8("TestAttribute");
+        CPUTF8 layout = new CPUTF8("[NH[(1)]][KIH][(-1)]");
+        MockNewAttributeBands newAttributeBands = new MockNewAttributeBands(1,
+                null, null, new AttributeDefinition(35,
+                        AttributeDefinitionBands.CONTEXT_CLASS, name, layout));
+        List layoutElements = newAttributeBands.getLayoutElements();
+        assertEquals(3, layoutElements.size());
+        Callable firstCallable = (Callable) layoutElements.get(0);
+        Callable secondCallable = (Callable) layoutElements.get(1);
+        Callable thirdCallable = (Callable) layoutElements.get(2);
+        List thirdBody = thirdCallable.getBody();
+        assertEquals(1, thirdBody.size());
+        Call call = (Call) thirdBody.get(0);
+        assertEquals(secondCallable, call.getCallable());
+        assertTrue(secondCallable.isBackwardsCallable());
+        assertFalse(firstCallable.isBackwardsCallable());
+        assertFalse(thirdCallable.isBackwardsCallable());
+
+        name = new CPUTF8("TestAttribute");
+        layout = new CPUTF8("[NH[(1)]][KIH][(-2)]");
+        newAttributeBands = new MockNewAttributeBands(1, null, null,
+                new AttributeDefinition(35,
+                        AttributeDefinitionBands.CONTEXT_CLASS, name, layout));
+        layoutElements = newAttributeBands.getLayoutElements();
+        assertEquals(3, layoutElements.size());
+        firstCallable = (Callable) layoutElements.get(0);
+        secondCallable = (Callable) layoutElements.get(1);
+        thirdCallable = (Callable) layoutElements.get(2);
+        thirdBody = thirdCallable.getBody();
+        assertEquals(1, thirdBody.size());
+        call = (Call) thirdBody.get(0);
+        assertEquals(firstCallable, call.getCallable());
+        assertTrue(firstCallable.isBackwardsCallable());
+        assertFalse(secondCallable.isBackwardsCallable());
+        assertFalse(thirdCallable.isBackwardsCallable());
+
+        name = new CPUTF8("TestAttribute");
+        layout = new CPUTF8("[NH[(1)]][KIH][(0)]");
+        newAttributeBands = new MockNewAttributeBands(1, null, null,
+                new AttributeDefinition(35,
+                        AttributeDefinitionBands.CONTEXT_CLASS, name, layout));
+        layoutElements = newAttributeBands.getLayoutElements();
+        assertEquals(3, layoutElements.size());
+        firstCallable = (Callable) layoutElements.get(0);
+        secondCallable = (Callable) layoutElements.get(1);
+        thirdCallable = (Callable) layoutElements.get(2);
+        thirdBody = thirdCallable.getBody();
+        assertEquals(1, thirdBody.size());
+        call = (Call) thirdBody.get(0);
+        assertEquals(thirdCallable, call.getCallable());
+        assertTrue(thirdCallable.isBackwardsCallable());
+        assertFalse(firstCallable.isBackwardsCallable());
+        assertFalse(secondCallable.isBackwardsCallable());
     }
 
     public void testAddAttributes() throws IOException, Pack200Exception {
@@ -208,12 +267,16 @@ public class NewAttributeBandsTest exten
         MockNewAttributeBands newAttributeBands = new MockNewAttributeBands(1,
                 null, null, new AttributeDefinition(35,
                         AttributeDefinitionBands.CONTEXT_CLASS, name, layout));
-        newAttributeBands.addAttribute(new NewAttribute(null, "TestAttribute", "B", new byte[] {27}, null, 0, null));
-        newAttributeBands.addAttribute(new NewAttribute(null, "TestAttribute", "B", new byte[] {56}, null, 0, null));
-        newAttributeBands.addAttribute(new NewAttribute(null, "TestAttribute", "B", new byte[] {3}, null, 0, null));
+        newAttributeBands.addAttribute(new NewAttribute(null, "TestAttribute",
+                "B", new byte[] { 27 }, null, 0, null));
+        newAttributeBands.addAttribute(new NewAttribute(null, "TestAttribute",
+                "B", new byte[] { 56 }, null, 0, null));
+        newAttributeBands.addAttribute(new NewAttribute(null, "TestAttribute",
+                "B", new byte[] { 3 }, null, 0, null));
         ByteArrayOutputStream out = new ByteArrayOutputStream();
         newAttributeBands.pack(out);
-        // BYTE1 is used for B layouts so we don't need to unpack to test the results
+        // BYTE1 is used for B layouts so we don't need to unpack to test the
+        // results
         byte[] bytes = out.toByteArray();
         assertEquals(3, bytes.length);
         assertEquals(27, bytes[0]);
@@ -221,17 +284,20 @@ public class NewAttributeBandsTest exten
         assertEquals(3, bytes[2]);
     }
 
-    public void testAddAttributesWithReplicationLayout() throws IOException, Pack200Exception {
+    public void testAddAttributesWithReplicationLayout() throws IOException,
+            Pack200Exception {
         CPUTF8 name = new CPUTF8("TestAttribute");
         CPUTF8 layout = new CPUTF8("NB[SH]");
         MockNewAttributeBands newAttributeBands = new MockNewAttributeBands(1,
                 null, null, new AttributeDefinition(35,
                         AttributeDefinitionBands.CONTEXT_CLASS, name, layout));
-        newAttributeBands.addAttribute(new NewAttribute(null, "TestAttribute", "B", new byte[] {1, 0, 100}, null, 0, null));
+        newAttributeBands.addAttribute(new NewAttribute(null, "TestAttribute",
+                "B", new byte[] { 1, 0, 100 }, null, 0, null));
         short s = -50;
-        byte b1 = (byte)(s>>>8);
-        byte b2 = (byte)s;
-        newAttributeBands.addAttribute(new NewAttribute(null, "TestAttribute", "B", new byte[] {3, 0, 5, 0, 25, b1, b2}, null, 0, null));
+        byte b1 = (byte) (s >>> 8);
+        byte b2 = (byte) s;
+        newAttributeBands.addAttribute(new NewAttribute(null, "TestAttribute",
+                "B", new byte[] { 3, 0, 5, 0, 25, b1, b2 }, null, 0, null));
         ByteArrayOutputStream out = new ByteArrayOutputStream();
         newAttributeBands.pack(out);
         byte[] bytes = out.toByteArray();
@@ -239,7 +305,8 @@ public class NewAttributeBandsTest exten
         assertEquals(3, bytes[1]);
         byte[] band = new byte[bytes.length - 2];
         System.arraycopy(bytes, 2, band, 0, band.length);
-        int[] decoded = Codec.SIGNED5.decodeInts(4, new ByteArrayInputStream(band));
+        int[] decoded = Codec.SIGNED5.decodeInts(4, new ByteArrayInputStream(
+                band));
         assertEquals(4, decoded.length);
         assertEquals(100, decoded[0]);
         assertEquals(5, decoded[1]);

Modified: harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/test/java/org/apache/harmony/unpack200/tests/ArchiveTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/test/java/org/apache/harmony/unpack200/tests/ArchiveTest.java?rev=999573&r1=999572&r2=999573&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/test/java/org/apache/harmony/unpack200/tests/ArchiveTest.java (original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/test/java/org/apache/harmony/unpack200/tests/ArchiveTest.java Tue Sep 21 19:45:57 2010
@@ -16,9 +16,13 @@
  */
 package org.apache.harmony.unpack200.tests;
 
+import java.io.BufferedInputStream;
+import java.io.BufferedOutputStream;
 import java.io.BufferedReader;
 import java.io.File;
+import java.io.FileInputStream;
 import java.io.FileOutputStream;
+import java.io.FileReader;
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.InputStreamReader;
@@ -26,6 +30,7 @@ import java.util.Enumeration;
 import java.util.jar.JarEntry;
 import java.util.jar.JarFile;
 import java.util.jar.JarOutputStream;
+import java.util.zip.ZipEntry;
 
 import junit.framework.TestCase;
 
@@ -65,11 +70,11 @@ public class ArchiveTest extends TestCas
         in = Archive.class
                 .getResourceAsStream("/org/apache/harmony/pack200/tests/sql.pack.gz");
         file = File.createTempFile("sql", ".jar");
+        file.deleteOnExit();
         out = new JarOutputStream(new FileOutputStream(file));
         Archive archive = new Archive(in, out);
         archive.unpack();
         JarFile jarFile = new JarFile(file);
-        file.deleteOnExit();
 
         File compareFile = new File(Archive.class.getResource(
                 "/org/apache/harmony/pack200/tests/sqlUnpacked.jar").toURI());
@@ -116,6 +121,16 @@ public class ArchiveTest extends TestCas
         }
     }
 
+    public void testAlternativeConstructor() throws Exception {
+        String inputFile = new File(Archive.class
+                .getResource("/org/apache/harmony/pack200/tests/sql.pack.gz").toURI()).getPath();
+        file = File.createTempFile("sql", ".jar");
+        file.deleteOnExit();
+        String outputFile = file.getPath();
+        Archive archive = new Archive(inputFile, outputFile);
+        archive.unpack();
+    }
+
     // Test with an archive containing Harmony's Pack200 module, packed with -E1
     public void testWithPack200E1() throws Exception {
         in = Archive.class
@@ -172,11 +187,64 @@ public class ArchiveTest extends TestCas
         in = Archive.class
                 .getResourceAsStream("/org/apache/harmony/pack200/tests/LargeClass.pack.gz");
         file = File.createTempFile("largeClass", ".jar");
+        file.deleteOnExit();
         out = new JarOutputStream(new FileOutputStream(file));
         Archive archive = new Archive(in, out);
         archive.unpack();
     }
 
+
+    public void testRemovePackFile() throws Exception {
+        File original = new File(Archive.class.getResource(
+                "/org/apache/harmony/pack200/tests/sql.pack.gz").toURI());
+        File copy = File.createTempFile("sqlcopy", ".pack.gz");
+        BufferedInputStream inputStream = new BufferedInputStream(
+                new FileInputStream(original));
+        BufferedOutputStream outputStream = new BufferedOutputStream(
+                new FileOutputStream(copy));
+        byte[] bytes = new byte[256];
+        int read = inputStream.read(bytes);
+        while (read > 0) {
+            outputStream.write(bytes, 0, read);
+            read = inputStream.read(bytes);
+        }
+        inputStream.close();
+        outputStream.close();
+        String inputFile = copy.getPath();
+        file = File.createTempFile("sqlout", ".jar");
+        file.deleteOnExit();
+        String outputFile = file.getPath();
+        Archive archive = new Archive(inputFile, outputFile);
+        archive.setRemovePackFile(true);
+        archive.unpack();
+        assertFalse(copy.exists());
+    }
+    
+    public void testDeflateHint() throws Exception {
+        in = Archive.class
+                .getResourceAsStream("/org/apache/harmony/pack200/tests/sql.pack.gz");
+        file = File.createTempFile("sql", ".jar");
+        file.deleteOnExit();
+        out = new JarOutputStream(new FileOutputStream(file));
+        Archive archive = new Archive(in, out);
+        archive.setDeflateHint(true);
+        archive.unpack();
+        JarFile jarFile = new JarFile(file);
+        assertEquals(ZipEntry.DEFLATED, jarFile.getEntry("bin/test/org/apache/harmony/sql/tests/internal/rowset/CachedRowSetImplTest.class").getMethod());
+        
+        in = Archive.class
+                .getResourceAsStream("/org/apache/harmony/pack200/tests/sql.pack.gz");
+        file = File.createTempFile("sql", ".jar");
+        file.deleteOnExit();
+        out = new JarOutputStream(new FileOutputStream(file));
+        archive = new Archive(in, out);
+        archive.setDeflateHint(false);
+        archive.unpack();
+        jarFile = new JarFile(file);
+        assertEquals(ZipEntry.STORED, jarFile.getEntry("bin/test/org/apache/harmony/sql/tests/internal/rowset/CachedRowSetImplTest.class").getMethod());
+        
+    }
+
     protected void tearDown() throws Exception {
         super.tearDown();
         if (in != null) {
@@ -196,4 +264,83 @@ public class ArchiveTest extends TestCas
         file.delete();
     }
 
+    // Test verbose, quiet and log file options.
+    public void testLoggingOptions() throws Exception {
+        // test default option, which is quiet (no output at all)
+        in = Archive.class
+                .getResourceAsStream("/org/apache/harmony/pack200/tests/sql.pack.gz");
+        file = File.createTempFile("logtest", ".jar");
+        file.deleteOnExit();
+        out = new JarOutputStream(new FileOutputStream(file));
+        Archive archive = new Archive(in, out);
+        File logFile = File.createTempFile("logfile", ".txt");
+        logFile.deleteOnExit();
+        archive.setLogFile(logFile.getPath());
+        archive.unpack();
+
+        // log file should be empty
+        FileReader reader = new FileReader(logFile);
+        assertFalse(reader.ready());
+        reader.close();
+
+        // test verbose
+        in = Archive.class
+                .getResourceAsStream("/org/apache/harmony/pack200/tests/sql.pack.gz");
+        file = File.createTempFile("logtest", ".jar");
+        file.deleteOnExit();
+        out = new JarOutputStream(new FileOutputStream(file));
+        archive = new Archive(in, out);
+        logFile = File.createTempFile("logfile", ".txt");
+        logFile.deleteOnExit();
+        archive.setLogFile(logFile.getPath());
+        archive.setVerbose(true);
+        archive.unpack();
+
+        // log file should not be empty
+        reader = new FileReader(logFile);
+        assertTrue(reader.ready());
+        reader.close();
+        
+        // test append option
+        long length = logFile.length();
+        in = Archive.class
+                .getResourceAsStream("/org/apache/harmony/pack200/tests/sql.pack.gz");
+        file = File.createTempFile("logtest", ".jar");
+        file.deleteOnExit();
+        out = new JarOutputStream(new FileOutputStream(file));
+        archive = new Archive(in, out);
+        archive.setLogFile(logFile.getPath(), true);
+        archive.setVerbose(true);
+        archive.unpack();
+        assertTrue(logFile.length() > length);
+        in = Archive.class
+                .getResourceAsStream("/org/apache/harmony/pack200/tests/sql.pack.gz");
+        file = File.createTempFile("logtest", ".jar");
+        file.deleteOnExit();
+        out = new JarOutputStream(new FileOutputStream(file));
+        archive = new Archive(in, out);
+        archive.setLogFile(logFile.getPath(), false);
+        archive.setVerbose(true);
+        archive.unpack();
+        assertTrue(logFile.length() == length);
+
+        // test setting quiet explicitly
+        in = Archive.class
+                .getResourceAsStream("/org/apache/harmony/pack200/tests/sql.pack.gz");
+        file = File.createTempFile("logtest", ".jar");
+        file.deleteOnExit();
+        out = new JarOutputStream(new FileOutputStream(file));
+        archive = new Archive(in, out);
+        logFile = File.createTempFile("logfile", ".txt");
+        logFile.deleteOnExit();
+        archive.setLogFile(logFile.getPath());
+        archive.setQuiet(true);
+        archive.unpack();
+
+        // log file should be empty
+        reader = new FileReader(logFile);
+        assertFalse(reader.ready());
+        reader.close();
+    }
+
 }
\ No newline at end of file

Modified: harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/test/java/org/apache/harmony/unpack200/tests/SegmentTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/test/java/org/apache/harmony/unpack200/tests/SegmentTest.java?rev=999573&r1=999572&r2=999573&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/test/java/org/apache/harmony/unpack200/tests/SegmentTest.java (original)
+++ harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/test/java/org/apache/harmony/unpack200/tests/SegmentTest.java Tue Sep 21 19:45:57 2010
@@ -80,13 +80,13 @@ public class SegmentTest extends TestCas
         in = Segment.class
                 .getResourceAsStream("/org/apache/harmony/pack200/tests/HelloWorld.pack");
         file = File.createTempFile("hello", "world.jar");
+        file.deleteOnExit();
         out = new JarOutputStream(new FileOutputStream(file));
         Segment segment = new Segment();
         segment.unpack(in, out);
         out.close();
         out = null;
         JarFile jarFile = new JarFile(file);
-        file.deleteOnExit();
 
         JarEntry entry = jarFile
                 .getJarEntry("org/apache/harmony/archive/tests/internal/pack200/HelloWorld.class");

Modified: harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/test/resources/org/apache/harmony/pack200/tests/annotations.jar
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/classlib/modules/pack200/src/test/resources/org/apache/harmony/pack200/tests/annotations.jar?rev=999573&r1=999572&r2=999573&view=diff
==============================================================================
Binary files - no diff available.

Propchange: harmony/enhanced/java/branches/mrh/common_resources/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Sep 21 19:45:57 2010
@@ -1,4 +1,4 @@
 /harmony/enhanced/java/branches/mrh/common_resources:935751
-/harmony/enhanced/java/trunk/common_resources:935751-996687
+/harmony/enhanced/java/trunk/common_resources:935751-999306
 /harmony/enhanced/trunk/common_resources:476395-921782
 /incubator/harmony/enhanced/trunk/common_resources:292550-476394

Modified: harmony/enhanced/java/branches/mrh/common_resources/make/depends.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/common_resources/make/depends.xml?rev=999573&r1=999572&r2=999573&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/common_resources/make/depends.xml (original)
+++ harmony/enhanced/java/branches/mrh/common_resources/make/depends.xml Tue Sep 21 19:45:57 2010
@@ -70,7 +70,7 @@
                 </or>
             </condition>
             <antcall target="-remove-file-if-bad">
-                <param name="jar" value="@{dest}" />
+                <param name="dest" value="@{dest}" />
             </antcall>
             <property name="@{dest}.fullpath" location="@{dest}" />
             <fail unless="@{dest}.md5.verified">

Modified: harmony/enhanced/java/branches/mrh/debian/control
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/debian/control?rev=999573&r1=999572&r2=999573&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/debian/control (original)
+++ harmony/enhanced/java/branches/mrh/debian/control Tue Sep 21 19:45:57 2010
@@ -7,7 +7,7 @@ Standards-Version: 3.7.2
 
 Package: harmony-5.0-drlvm
 Architecture: any
-Depends: ${shlibs:Depends}, ${misc:Depends}, zlib1g-dev
+Depends: ${shlibs:Depends}, ${misc:Depends}
 Provides: harmony-5.0-vm
 Suggests: harmony-5.0-jre
 Description: Apache Harmony DRL Virtual Machine
@@ -21,7 +21,7 @@ Description: Apache Harmony Java Class L
 
 Package: harmony-5.0-jre
 Architecture: any
-Depends: ${shlibs:Depends}, ${misc:Depends}, libstdc++6, zlib1g-dev, libxext6, libxmu6, harmony-5.0-vm, harmony-5.0-classlib
+Depends: ${shlibs:Depends}, ${misc:Depends}, libstdc++6, libxext6, libxmu6, harmony-5.0-vm, harmony-5.0-classlib
 Provides: java-virtual-machine, java-runtime, java1-runtime, java2-runtime, java2-runtime-headless, java5-runtime-headless
 Description: Apache Harmony JRE
  <insert long description, indented with spaces>

Propchange: harmony/enhanced/java/branches/mrh/drlvm/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Sep 21 19:45:57 2010
@@ -1,5 +1,5 @@
 /harmony/enhanced/java/branches/mrh/drlvm:935751
-/harmony/enhanced/java/trunk/drlvm:935751-996687
+/harmony/enhanced/java/trunk/drlvm:935751-999306
 /harmony/enhanced/trunk/drlvm:476395-926313
 /harmony/enhanced/trunk/working_vm:476396-920147
 /incubator/harmony/enhanced/trunk/working_vm:423974-476394

Modified: harmony/enhanced/java/branches/mrh/drlvm/build.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/drlvm/build.xml?rev=999573&r1=999572&r2=999573&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/drlvm/build.xml (original)
+++ harmony/enhanced/java/branches/mrh/drlvm/build.xml Tue Sep 21 19:45:57 2010
@@ -203,6 +203,16 @@ Usage:
         <make dir="modules/vm/src/main/native/gc_gen/${hy.os.family}" />
     </target>
 
+    <target name="-init-hdk">
+        <copy todir="${hy.hdk}/jdk/include">
+            <fileset dir="vm/include">
+                <include name="jvmti.h" />
+                <include name="jvmti_types.h" />
+                <include name="jni.h" />
+                <include name="jni_types.h" />
+            </fileset>
+        </copy>
+    </target>
 
     <!-- ================================================================
             import the deploy stuff from hdk / classlib

Modified: harmony/enhanced/java/branches/mrh/drlvm/modules/vm/src/main/native/gc_gen/shared/mark_compact/mspace_collect_compact.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/drlvm/modules/vm/src/main/native/gc_gen/shared/mark_compact/mspace_collect_compact.cpp?rev=999573&r1=999572&r2=999573&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/drlvm/modules/vm/src/main/native/gc_gen/shared/mark_compact/mspace_collect_compact.cpp (original)
+++ harmony/enhanced/java/branches/mrh/drlvm/modules/vm/src/main/native/gc_gen/shared/mark_compact/mspace_collect_compact.cpp Tue Sep 21 19:45:57 2010
@@ -292,7 +292,7 @@ void mspace_collection(Mspace* mspace) 
     TRACE2("gc.process", "\nGC: end of move compact algo ... \n");
 
   }else{
-    LDIE(75, "GC: The speficied major collection algorithm doesn't exist!");
+    LDIE(75, "GC: The specified major collection algorithm doesn't exist!");
   }
 
   if((!LOS_ADJUST_BOUNDARY)&&(kind != TRANS_NOTHING) ) {

Modified: harmony/enhanced/java/branches/mrh/drlvm/modules/vm/src/main/native/gc_gen/shared/mark_compact/mspace_extend_compact.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/drlvm/modules/vm/src/main/native/gc_gen/shared/mark_compact/mspace_extend_compact.cpp?rev=999573&r1=999572&r2=999573&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/drlvm/modules/vm/src/main/native/gc_gen/shared/mark_compact/mspace_extend_compact.cpp (original)
+++ harmony/enhanced/java/branches/mrh/drlvm/modules/vm/src/main/native/gc_gen/shared/mark_compact/mspace_extend_compact.cpp Tue Sep 21 19:45:57 2010
@@ -284,7 +284,7 @@ void mspace_extend_compact(Collector *co
   atomic_cas32( &num_space_changing_collectors, 0, num_active_collectors + 1);
   old_num = atomic_inc32(&num_space_changing_collectors);
   if( ++old_num == num_active_collectors ){
-     if(NOS_SIZE) /* when NOS_SIZE is speficied, it can't be shrunk. */
+     if(NOS_SIZE) /* when NOS_SIZE is specified, it can't be shrunk. */
        LWARN(59, "GC: collector[{0}]: MOS is overflowed, have to reduce NOS size." << ((POINTER_SIZE_INT)collector->thread_handle));
      Block *old_nos_boundary = nspace->blocks;
      nos_boundary = &mspace->blocks[mspace->free_block_idx - mspace->first_block_idx];

Modified: harmony/enhanced/java/branches/mrh/drlvm/modules/vm/src/main/native/port/unix/misc/dso.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/drlvm/modules/vm/src/main/native/port/unix/misc/dso.c?rev=999573&r1=999572&r2=999573&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/drlvm/modules/vm/src/main/native/port/unix/misc/dso.c (original)
+++ harmony/enhanced/java/branches/mrh/drlvm/modules/vm/src/main/native/port/unix/misc/dso.c Tue Sep 21 19:45:57 2010
@@ -63,10 +63,14 @@ APR_DECLARE(apr_status_t) port_dso_searc
 }
 
 APR_DECLARE(char *) port_dso_name_decorate(const char* dl_name,
-                            apr_pool_t* pool) {
-									
+                                           const char* dl_ver,
+                                           apr_pool_t* pool) {
 	if (!dl_name) {
 		return 0;
 	}
-	return apr_pstrcat(pool, "lib", dl_name, ".so", NULL);
+        if (dl_ver) {
+                return apr_pstrcat(pool, "lib", dl_name, ".so.", dl_ver, NULL);
+        } else {
+                return apr_pstrcat(pool, "lib", dl_name, ".so", NULL);
+        }
 }

Modified: harmony/enhanced/java/branches/mrh/drlvm/modules/vm/src/main/native/vmcore/shared/init/harmony.properties
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/drlvm/modules/vm/src/main/native/vmcore/shared/init/harmony.properties?rev=999573&r1=999572&r2=999573&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/drlvm/modules/vm/src/main/native/vmcore/shared/init/harmony.properties (original)
+++ harmony/enhanced/java/branches/mrh/drlvm/modules/vm/src/main/native/vmcore/shared/init/harmony.properties Tue Sep 21 19:45:57 2010
@@ -136,7 +136,7 @@ LDIE071=Unknown property table: {0}
 LDIE072=FAILED on unloading classloader: \n{0} live j.l.Class of unloaded class is de    tected: {1}
 LDIE073=Unexpected kind
 LDIE074=Unexpected register
-LDIE075=GC: The speficied major collection algorithm doesn't exist!
+LDIE075=GC: The specified major collection algorithm doesn't exist!
 LDIE076=Property value {0} is not set!
 LDIE077=Please define USE_UNIQUE_MARK_SWEEP_GC macro.
 LDIE078=GC: Run out GC metadata, please give it more segments!

Modified: harmony/enhanced/java/branches/mrh/drlvm/modules/vm/src/main/native/vmcore/shared/init/vm_properties.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/drlvm/modules/vm/src/main/native/vmcore/shared/init/vm_properties.cpp?rev=999573&r1=999572&r2=999573&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/drlvm/modules/vm/src/main/native/vmcore/shared/init/vm_properties.cpp (original)
+++ harmony/enhanced/java/branches/mrh/drlvm/modules/vm/src/main/native/vmcore/shared/init/vm_properties.cpp Tue Sep 21 19:45:57 2010
@@ -49,18 +49,18 @@ static apr_pool_t *prop_pool;
 
 static const char *api_dll_files[] =
 {
-    "harmonyvm",
-    "hythr",
-    "hyprt",
+    "harmonyvm", NULL,
+    "hythr", NULL,
+    "hyprt", NULL,
 #if defined(HY_LOCAL_ZLIB)
-    "z",
+    "z", "1",
 #else
-    "hyzlib",
+    "hyzlib", NULL,
 #endif
-    "hynio",
-    "vmi",
-    "hyluni",
-    "hyarchive"
+    "hynio", NULL,
+    "vmi", NULL,
+    "hyluni", NULL,
+    "hyarchive", NULL
 };
 
 /**
@@ -74,11 +74,12 @@ static const char *compose_full_files_pa
                                                 bool is_dll)
 {
     const char* full_name = "";
-    for (int iii = 0; iii < names_number; iii++)
+    for (int iii = 0; iii < names_number; )
     {
-        const char *tmp = dll_names[iii];
+        const char *tmp = dll_names[iii++];
+        const char *ver = dll_names[iii++];
         if (is_dll) {
-            tmp = port_dso_name_decorate(tmp, prop_pool);
+            tmp = port_dso_name_decorate(tmp, ver, prop_pool);
         }
         
         /*
@@ -92,9 +93,8 @@ static const char *compose_full_files_pa
         }
         
         full_name = apr_pstrcat(prop_pool, full_name, tmp, 
-            (iii + 1 < names_number) ? PORT_PATH_SEPARATOR_STR : "", NULL);
+            (iii < names_number) ? PORT_PATH_SEPARATOR_STR : "", NULL);
     }
-
     return full_name;
 }
 

Modified: harmony/enhanced/java/branches/mrh/drlvm/modules/vm/src/main/native/vmcore/shared/jvmti/jvmti.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/drlvm/modules/vm/src/main/native/vmcore/shared/jvmti/jvmti.cpp?rev=999573&r1=999572&r2=999573&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/drlvm/modules/vm/src/main/native/vmcore/shared/jvmti/jvmti.cpp (original)
+++ harmony/enhanced/java/branches/mrh/drlvm/modules/vm/src/main/native/vmcore/shared/jvmti/jvmti.cpp Tue Sep 21 19:45:57 2010
@@ -520,7 +520,7 @@ static void generate_platform_lib_name(a
     char *vm_libs = vm_properties_get_value("vm.boot.library.path", JAVA_PROPERTIES);
     assert(vm_libs);
     char *path1 = apr_pstrdup(pool, vm_libs);
-    char *path2 = port_dso_name_decorate(lib_name, pool);
+    char *path2 = port_dso_name_decorate(lib_name, NULL, pool);
     path1 = port_filepath_merge(path1, path2, pool);
     *p_path1 = path1;
     *p_path2 = path2;

Modified: harmony/enhanced/java/branches/mrh/drlvm/modules/vm/src/main/native/vmcore/shared/kernel_classes/java_lang_VMExecutionEngine.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/drlvm/modules/vm/src/main/native/vmcore/shared/kernel_classes/java_lang_VMExecutionEngine.cpp?rev=999573&r1=999572&r2=999573&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/drlvm/modules/vm/src/main/native/vmcore/shared/kernel_classes/java_lang_VMExecutionEngine.cpp (original)
+++ harmony/enhanced/java/branches/mrh/drlvm/modules/vm/src/main/native/vmcore/shared/kernel_classes/java_lang_VMExecutionEngine.cpp Tue Sep 21 19:45:57 2010
@@ -227,7 +227,7 @@ JNIEXPORT jstring JNICALL Java_java_lang
         const char* libname = GetStringUTFChars(jenv, jlibname, NULL);
         apr_pool_t *pp;
         if (APR_SUCCESS == apr_pool_create(&pp, 0)) {
-            res = NewStringUTF(jenv, port_dso_name_decorate(libname, pp));
+            res = NewStringUTF(jenv, port_dso_name_decorate(libname, NULL, pp));
             apr_pool_destroy(pp);
         }
         ReleaseStringUTFChars(jenv, jlibname, libname);

Modified: harmony/enhanced/java/branches/mrh/drlvm/modules/vm/src/main/native/vmcore/shared/util/jarfile_support.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/drlvm/modules/vm/src/main/native/vmcore/shared/util/jarfile_support.cpp?rev=999573&r1=999572&r2=999573&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/drlvm/modules/vm/src/main/native/vmcore/shared/util/jarfile_support.cpp (original)
+++ harmony/enhanced/java/branches/mrh/drlvm/modules/vm/src/main/native/vmcore/shared/util/jarfile_support.cpp Tue Sep 21 19:45:57 2010
@@ -121,8 +121,8 @@ bool JarEntry::GetContent(unsigned char*
         }
 #endif //_IPF
         break;
-    case JAR_FILE_ENCHANCED_DEFLATE:
-        printf( "Found ENCHANCED DEFLATE content. No support as of yet.\n" );
+    case JAR_FILE_ENHANCED_DEFLATE:
+        printf( "Found ENHANCED DEFLATE content. No support as of yet.\n" );
         return false;
     case JAR_FILE_PKWARED:
         printf( "Found PKWARED content. No support as of yet.\n" );

Modified: harmony/enhanced/java/branches/mrh/drlvm/vm/port/include/port_dso.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/drlvm/vm/port/include/port_dso.h?rev=999573&r1=999572&r2=999573&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/drlvm/vm/port/include/port_dso.h (original)
+++ harmony/enhanced/java/branches/mrh/drlvm/vm/port/include/port_dso.h Tue Sep 21 19:45:57 2010
@@ -104,10 +104,12 @@ APR_DECLARE(apr_status_t) port_dso_searc
 /**
  * Decorates shared library name (.dll <-> lib*.so).
  * @param dl_name - the name of the shared library
+ * @param dl_ver   - the version number of the shared library or NULL
  * @param pool    - storage to allocate the returned handle
  * @return The platform-specific filename for the library.
  */
 APR_DECLARE(char *) port_dso_name_decorate(const char* dl_name,
+                                           const char* dl_ver,
                             apr_pool_t* pool);
 
 /** @} */

Modified: harmony/enhanced/java/branches/mrh/drlvm/vm/port/src/misc/win/dso.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/drlvm/vm/port/src/misc/win/dso.c?rev=999573&r1=999572&r2=999573&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/drlvm/vm/port/src/misc/win/dso.c (original)
+++ harmony/enhanced/java/branches/mrh/drlvm/vm/port/src/misc/win/dso.c Tue Sep 21 19:45:57 2010
@@ -92,10 +92,10 @@ APR_DECLARE(apr_status_t) port_dso_searc
 }
 
 APR_DECLARE(char *) port_dso_name_decorate(const char* dl_name,
-                            apr_pool_t* pool) {
-									
+                                           const char* dl_ver,
+                                           apr_pool_t* pool) {
 	if (!dl_name) {
 		return 0;
 	}
-	return apr_pstrcat(pool, dl_name, ".dll", NULL);
+	return apr_pstrcat(pool, dl_name, (dl_ver ? dl_ver : ""), ".dll", NULL);
 }

Modified: harmony/enhanced/java/branches/mrh/drlvm/vm/vmcore/include/jarfile_support.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/drlvm/vm/vmcore/include/jarfile_support.h?rev=999573&r1=999572&r2=999573&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/drlvm/vm/vmcore/include/jarfile_support.h (original)
+++ harmony/enhanced/java/branches/mrh/drlvm/vm/vmcore/include/jarfile_support.h Tue Sep 21 19:45:57 2010
@@ -78,7 +78,7 @@ enum JarCompressionMethod
     JAR_FILE_IMPLODED,
     JAR_FILE_RESERVED_TCA,
     JAR_FILE_DEFLATED,
-    JAR_FILE_ENCHANCED_DEFLATE,
+    JAR_FILE_ENHANCED_DEFLATE,
     JAR_FILE_PKWARED
 };
 

Modified: harmony/enhanced/java/branches/mrh/ibm-v4/build.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/ibm-v4/build.xml?rev=999573&r1=999572&r2=999573&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/ibm-v4/build.xml (original)
+++ harmony/enhanced/java/branches/mrh/ibm-v4/build.xml Tue Sep 21 19:45:57 2010
@@ -43,6 +43,17 @@
 
     <property name="ibm.vme.dir" value="${hy.os}-${hy.arch}.vme" />
 
+    <target name="-init-hdk">
+        <copy todir="${hy.hdk}/jdk/include">
+            <fileset dir="include">
+                <include name="jvmti.h" />
+                <include name="jvmti_types.h" />
+                <include name="jni.h" />
+                <include name="jni_types.h" />
+            </fileset>
+        </copy>
+    </target>
+
     <target name="build">
         <mkdir dir="${hy.hdk}/jdk" />
         <copy todir="${hy.hdk}/jdk">

Modified: harmony/enhanced/java/branches/mrh/jdktools/modules/jdktools/src/main/java/org/apache/harmony/tools/jar/Main.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/jdktools/modules/jdktools/src/main/java/org/apache/harmony/tools/jar/Main.java?rev=999573&r1=999572&r2=999573&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/jdktools/modules/jdktools/src/main/java/org/apache/harmony/tools/jar/Main.java (original)
+++ harmony/enhanced/java/branches/mrh/jdktools/modules/jdktools/src/main/java/org/apache/harmony/tools/jar/Main.java Tue Sep 21 19:45:57 2010
@@ -212,9 +212,10 @@ public class Main {
                 File f = new File(ze.getName());
                 f.createNewFile();
                 FileOutputStream fos = new FileOutputStream(f);
-                int i;
-                while ((i = zis.read()) != -1) {
-                    fos.write(i);
+                int c;
+                byte[] bs = new byte[1024];
+                while ((c = zis.read(bs)) != -1) {
+                    fos.write(bs, 0, c);
                 }
                 fos.close();
                 if (verboseFlag) {

Modified: harmony/enhanced/java/branches/mrh/jdktools/modules/jretools/src/main/java/org/apache/harmony/jretools/pack200/Main.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/branches/mrh/jdktools/modules/jretools/src/main/java/org/apache/harmony/jretools/pack200/Main.java?rev=999573&r1=999572&r2=999573&view=diff
==============================================================================
--- harmony/enhanced/java/branches/mrh/jdktools/modules/jretools/src/main/java/org/apache/harmony/jretools/pack200/Main.java (original)
+++ harmony/enhanced/java/branches/mrh/jdktools/modules/jretools/src/main/java/org/apache/harmony/jretools/pack200/Main.java Tue Sep 21 19:45:57 2010
@@ -41,6 +41,7 @@ public class Main {
         String outputFileName = null;
         PackingOptions options = new PackingOptions();
         String value = null;
+        boolean repack = false;
 
         for (int i = 0; i < args.length; i++) {
             if ("--help".equals(args[i]) || "-help".equals(args[i])
@@ -219,10 +220,8 @@ public class Main {
                         nameEqualsAction[1]);
             } else if ("-v".equals(args[i]) || "--verbose".equals(args[i])) {
                 options.setVerbose(true);
-                options.setQuiet(false);
             } else if ("-q".equals(args[i]) || "--quiet".equals(args[i])) {
                 options.setQuiet(true);
-                options.setVerbose(false);
             } else if (args[i].startsWith("-l")) {
                 value = args[i].substring(2);
                 if (value.length() == 0) {
@@ -238,7 +237,7 @@ public class Main {
             } else if (args[i].startsWith("--log-file=")) {
                 options.setLogFile(args[i].substring(11));
             } else if ("-r".equals(args[i]) || "--repack".equals(args[i])) {
-                options.setRepack(true);
+                repack = true;
             } else if (args[i].startsWith("-f")) {
                 value = args[i].substring(2);
                 if (value.length() == 0) {
@@ -266,7 +265,7 @@ public class Main {
             }
         }
 
-        if (options.isRepack()) {
+        if (repack) {
             repack(inputFileName, outputFileName, options);
         } else {
             pack(inputFileName, outputFileName, options);
@@ -362,7 +361,6 @@ public class Main {
         org.apache.harmony.unpack200.Archive unpacker = new org.apache.harmony.unpack200.Archive(
                 inputStream, jarOutputStream);
         unpacker.setVerbose(options.isVerbose());
-        unpacker.setQuiet(options.isQuiet());
         // set deflate_hint option
         if (!options.isKeepDeflateHint()) {
             unpacker.setDeflateHint("true".equals(options.getDeflateHint()));



Mime
View raw message