harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From var...@apache.org
Subject svn commit: r506974 - in /harmony/enhanced/drlvm/trunk: src/test/regression/H3150/ src/test/regression/H3150/Test.java src/test/regression/H3150/run.test.xml vm/jitrino/src/translator/java/JavaByteCodeTranslator.cpp
Date Tue, 13 Feb 2007 11:26:34 GMT
Author: varlax
Date: Tue Feb 13 03:26:33 2007
New Revision: 506974

URL: http://svn.apache.org/viewvc?view=rev&rev=506974
Log:
Applied HARMONY-3150 [drlvm][jit][opt] translator asserts in debug mode when there is an anewarray
of unresolvable class
Tested on SUSE10@ia32

Added:
    harmony/enhanced/drlvm/trunk/src/test/regression/H3150/
    harmony/enhanced/drlvm/trunk/src/test/regression/H3150/Test.java
    harmony/enhanced/drlvm/trunk/src/test/regression/H3150/run.test.xml
Modified:
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/translator/java/JavaByteCodeTranslator.cpp

Added: harmony/enhanced/drlvm/trunk/src/test/regression/H3150/Test.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/src/test/regression/H3150/Test.java?view=auto&rev=506974
==============================================================================
--- harmony/enhanced/drlvm/trunk/src/test/regression/H3150/Test.java (added)
+++ harmony/enhanced/drlvm/trunk/src/test/regression/H3150/Test.java Tue Feb 13 03:26:33 2007
@@ -0,0 +1,17 @@
+package org.apache.harmony.drlvm.tests.regression.h3150;
+
+import junit.framework.TestCase;
+
+public class Test extends TestCase {
+
+    public void test() throws Exception {
+
+        try {
+            classToDelete[] classToDeletearr = new classToDelete[2];
+            fail();
+        } catch (NoClassDefFoundError ok) {}
+    }
+}
+
+class classToDelete {}
+

Added: harmony/enhanced/drlvm/trunk/src/test/regression/H3150/run.test.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/src/test/regression/H3150/run.test.xml?view=auto&rev=506974
==============================================================================
--- harmony/enhanced/drlvm/trunk/src/test/regression/H3150/run.test.xml (added)
+++ harmony/enhanced/drlvm/trunk/src/test/regression/H3150/run.test.xml Tue Feb 13 03:26:33
2007
@@ -0,0 +1,14 @@
+<project name="RUN HARMONY-3150 Regression Test">
+    <target name="run-test">
+        <!-- extend JUnit test launcher to run JNI test -->
+        <delete
+             file="${reg.test.class.path}/org/apache/harmony/drlvm/tests/regression/h3150/classToDelete.class"
+             verbose="true"/>
+        <echo message="Running on OPT"/>
+        <run-junit-test 
+             test="org.apache.harmony.drlvm.tests.regression.h3150.Test"
+             vmarg="-Xem:opt">
+        </run-junit-test>
+    </target>
+</project>
+

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/translator/java/JavaByteCodeTranslator.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/translator/java/JavaByteCodeTranslator.cpp?view=diff&rev=506974&r1=506973&r2=506974
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/translator/java/JavaByteCodeTranslator.cpp
(original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/translator/java/JavaByteCodeTranslator.cpp
Tue Feb 13 03:26:33 2007
@@ -2219,6 +2219,7 @@
     NamedType* type = resolveType(constPoolIndex);
     if (!type) {
         linkingException(constPoolIndex, OPCODE_ANEWARRAY);
+        popOpnd();
         pushOpnd(irBuilder.genLdNull());
         return;
     }



Mime
View raw message