/hg/icedtea6-hg: 10 new changesets

andrew at icedtea.classpath.org andrew at icedtea.classpath.org
Thu Mar 10 11:33:58 PST 2011


changeset 0df8f7938769 in /hg/icedtea6-hg
details: http://icedtea.classpath.org/hg/icedtea6-hg?cmd=changeset;node=0df8f7938769
author: Xerxes R?nby <xerxes at zafena.se>
date: Thu Mar 03 15:32:46 2011 +0100

	JamVM: Ignore all unknown options.

	2011-03-03 Xerxes Ranby <xerxes at zafena.se>

	 JamVM: Ignore all unknown options.
		* Makefile.am: Replaced JamVM patch.
		* patches/jamvm/ignore-more-XX-options.patch: Removed.
		* patches/jamvm/ignore-unknown-options.patch: Added.


changeset 13df4d5a5bc2 in /hg/icedtea6-hg
details: http://icedtea.classpath.org/hg/icedtea6-hg?cmd=changeset;node=13df4d5a5bc2
author: Xerxes R?nby <xerxes at zafena.se>
date: Fri Mar 04 02:13:35 2011 +0100

	CACAO: Ignore all unknown options.

	2011-03-04 Xerxes Ranby <xerxes at zafena.se>

	 CACAO: Ignore all unknown options.
		* Makefile.am: Add CACAO patch.
		* patches/cacao/ignore-unknown-options.patch: Added.


changeset 55bfe07e584d in /hg/icedtea6-hg
details: http://icedtea.classpath.org/hg/icedtea6-hg?cmd=changeset;node=55bfe07e584d
author: doko at ubuntu.com
date: Fri Mar 04 16:09:19 2011 +0100

	Makefile.am (jtregcheck): Allow setting which tests to run.

	2011-02-24 Matthias Klose <doko at ubuntu.com>

	 * Makefile.am (jtregcheck): Allow setting which tests to
	run.


changeset 115b18bbcedb in /hg/icedtea6-hg
details: http://icedtea.classpath.org/hg/icedtea6-hg?cmd=changeset;node=115b18bbcedb
author: ptisnovs
date: Mon Mar 07 18:49:08 2011 +0100

	Patches to remove regression tests which are not valid in OpenJDK6.


changeset 97a8f2681254 in /hg/icedtea6-hg
details: http://icedtea.classpath.org/hg/icedtea6-hg?cmd=changeset;node=97a8f2681254
author: Omair Majid <omajid at redhat.com>
date: Mon Mar 07 15:17:27 2011 -0500

	Fix build breakage on hs19 caused by previous changeset

	2011-03-07 Omair Majid <omajid at redhat.com>

	 * Makefile.am (ICEDTEA_PATCHES): Apply patches/jtreg-remove-
	test-6987555.patch and patches/jtreg-remove-test-6991596.patch
	only on ALT_HSBUILD.


changeset 478d3f5f6a59 in /hg/icedtea6-hg
details: http://icedtea.classpath.org/hg/icedtea6-hg?cmd=changeset;node=478d3f5f6a59
author: ptisnovs
date: Tue Mar 08 13:19:47 2011 +0100

	PR637: make check should exit with an error code if any of
	regression test failed.


changeset c2eb2f9d1227 in /hg/icedtea6-hg
details: http://icedtea.classpath.org/hg/icedtea6-hg?cmd=changeset;node=c2eb2f9d1227
author: ptisnovs
date: Tue Mar 08 13:55:45 2011 +0100

	Added new hotspot regresion test.


changeset 83f325a1a5ed in /hg/icedtea6-hg
details: http://icedtea.classpath.org/hg/icedtea6-hg?cmd=changeset;node=83f325a1a5ed
author: ptisnovs
date: Tue Mar 08 14:22:29 2011 +0100

	Fixed number of patched lines in patch jtreg-hotspot-
	bug-6196102.patch.


changeset 4cbe17b91cc8 in /hg/icedtea6-hg
details: http://icedtea.classpath.org/hg/icedtea6-hg?cmd=changeset;node=4cbe17b91cc8
author: ptisnovs
date: Wed Mar 09 10:50:40 2011 +0100

	New patch which adds more test cases to a regression test
	java/lang/Double/ToString


changeset b3627e530d7c in /hg/icedtea6-hg
details: http://icedtea.classpath.org/hg/icedtea6-hg?cmd=changeset;node=b3627e530d7c
author: Andrew John Hughes <ahughes at redhat.com>
date: Wed Mar 09 23:47:23 2011 +0000

	Merge


diffstat:

 ChangeLog                                  |   65 ++++
 Makefile.am                                |   28 +-
 NEWS                                       |    7 +
 patches/cacao/ignore-unknown-options.patch |   16 +
 patches/jamvm/ignore-more-XX-options.patch |   40 --
 patches/jamvm/ignore-unknown-options.patch |   12 +
 patches/jtreg-double-to-string.patch       |   47 ++
 patches/jtreg-hotspot-bug-6196102.patch    |   40 ++
 patches/jtreg-remove-test-6987555.patch    |  183 +++++++++++
 patches/jtreg-remove-test-6991596.patch    |  471 +++++++++++++++++++++++++++++
 10 files changed, 862 insertions(+), 47 deletions(-)

diffs (truncated from 1032 to 500 lines):

diff -r 84ca681adf9a -r b3627e530d7c ChangeLog
--- a/ChangeLog	Thu Mar 03 01:49:30 2011 +0000
+++ b/ChangeLog	Wed Mar 09 23:47:23 2011 +0000
@@ -1,3 +1,68 @@
+2011-03-09  Pavel Tisnovsky  <ptisnovs at redhat.com>
+
+	* Makefile.am: Add new patch.
+	* patches/jtreg-double-to-string.patch:
+	Patch which adds more test cases to test
+	java/lang/Double/ToString
+
+2011-03-08  Pavel Tisnovsky  <ptisnovs at redhat.com>
+
+	* patches/jtreg-hotspot-bug-6196102.patch:
+	Fixed number of patched lines.
+
+2011-03-08  Pavel Tisnovsky  <ptisnovs at redhat.com>
+
+	* Makefile.am: Add new patch.
+	* patches/jtreg-hotspot-bug-6196102.patch:
+	Added new hotspot regresion test.
+
+2011-03-08  Pavel Tisnovsky  <ptisnovs at redhat.com>
+
+	* Makefile.am:
+	Added checking of JTreg results - if at least one
+	regression test failed, make exits with error code
+	* NEWS: Updated, added PR637 to a list of bug fixes.
+
+2011-03-07  Omair Majid  <omajid at redhat.com>
+
+	* Makefile.am (ICEDTEA_PATCHES): Apply
+	patches/jtreg-remove-test-6987555.patch and
+	patches/jtreg-remove-test-6991596.patch only on ALT_HSBUILD.
+
+2011-03-07  Pavel Tisnovsky  <ptisnovs at redhat.com>
+
+	* Makefile.am: Added two new patches.
+	* patches/jtreg-remove-test-6987555.patch:
+	Patch to remove regression test
+	hotspot/test/compiler/6987555/Test6987555
+	which is not valid for OpenJDK6
+	* patches/jtreg-remove-test-6991596.patch:
+	Patch to remove regression test
+	hotspot/test/compiler/6991596/Test6991596
+	which is not valid for OpenJDK6
+
+2011-02-24  Matthias Klose  <doko at ubuntu.com>
+
+	* Makefile.am (jtregcheck): Allow setting which tests to run.
+
+2011-03-04  Xerxes Ranby  <xerxes at zafena.se>
+
+	CACAO: Ignore all unknown options.
+	* Makefile.am: Add CACAO patch.
+	* patches/cacao/ignore-unknown-options.patch: Added.
+
+2011-03-03  Xerxes Ranby  <xerxes at zafena.se>
+
+	JamVM: Ignore all unknown options.
+	* Makefile.am: Replaced JamVM patch.
+	* patches/jamvm/ignore-more-XX-options.patch: Removed.
+	* patches/jamvm/ignore-unknown-options.patch: Added.
+
+2011-03-03  Andrew John Hughes  <ahughes at redhat.com>
+
+	* Makefile.am:
+	Bump to b23.
+
 2011-03-03  Andrew John Hughes  <ahughes at redhat.com>
 
 	* INSTALL: Update documentation
diff -r 84ca681adf9a -r b3627e530d7c Makefile.am
--- a/Makefile.am	Thu Mar 03 01:49:30 2011 +0000
+++ b/Makefile.am	Wed Mar 09 23:47:23 2011 +0000
@@ -2,7 +2,7 @@
 
 OPENJDK_DATE = 28_feb_2011
 OPENJDK_MD5SUM = 2d2bbbb0f9b81f1fec41ec730da8a933
-OPENJDK_VERSION = b22
+OPENJDK_VERSION = b23
 OPENJDK_URL = http://download.java.net/openjdk/jdk6/promoted/$(OPENJDK_VERSION)/
 
 CACAO_VERSION = 6a5eda011e49
@@ -324,12 +324,16 @@
 	patches/openjdk/6766342-AA-simple-shape-performance.patch \
 	patches/openjdk/7016856-pisces-performance.patch \
 	patches/openjdk/6934977-MappedByteBuffer.load.patch \
-	patches/jaxp-serial-version-uid.patch
+	patches/jaxp-serial-version-uid.patch \
+	patches/jtreg-hotspot-bug-6196102.patch \
+	patches/jtreg-double-to-string.patch
 
 if WITH_ALT_HSBUILD
 ICEDTEA_PATCHES += \
 	patches/pr639-broken_shark_build.patch \
-	patches/hotspot/$(HSBUILD)/powerpc-stacksize.patch
+	patches/hotspot/$(HSBUILD)/powerpc-stacksize.patch \
+	patches/jtreg-remove-test-6987555.patch \
+	patches/jtreg-remove-test-6991596.patch
 else
 ICEDTEA_PATCHES += \
 	patches/hotspot/$(HSBUILD)/no-precompiled-headers.patch \
@@ -347,7 +351,8 @@
 	patches/cacao/launcher.patch \
 	patches/cacao/arm-arch-defines.patch \
 	patches/cacao/jsig.patch \
-	patches/cacao/memory.patch
+	patches/cacao/memory.patch \
+	patches/cacao/ignore-unknown-options.patch
 endif
 
 if ENABLE_CACAO
@@ -358,7 +363,7 @@
 
 if BUILD_JAMVM
 ICEDTEA_PATCHES += \
-	patches/jamvm/ignore-more-XX-options.patch
+	patches/jamvm/ignore-unknown-options.patch
 endif
 
 if ENABLE_PULSE_JAVA
@@ -622,7 +627,8 @@
 	clean-rewriter clean-rewrite-rhino clean-add-systemtap clean-add-systemtap-debug \
 	clean-add-pulseaudio clean-add-pulseaudio-debug clean-add-nss clean-add-nss-debug \
 	clean-add-tzdata-support clean-add-tzdata-support-debug clean-add-systemtap-ecj \
-	clean-add-pulseaudio-ecj clean-add-nss-ecj clean-add-tzdata-support-ecj clean-fonts
+	clean-add-pulseaudio-ecj clean-add-nss-ecj clean-add-tzdata-support-ecj clean-fonts \
+	jtregcheck-summary
 
 env:
 	@echo 'unset JAVA_HOME'
@@ -2069,6 +2075,7 @@
 		$(ICEDTEA_JTREG_OPTIONS) \
 		`pwd`/openjdk/hotspot/test \
 	    | tee test/$@.log
+	test -z `grep "^Error:\|^FAILED:" test/$@.log`
 
 check-langtools: stamps/jtreg.stamp
 	mkdir -p test/langtools/JTwork test/langtools/JTreport
@@ -2079,6 +2086,7 @@
 		$(ICEDTEA_JTREG_OPTIONS) \
 		`pwd`/openjdk/langtools/test \
 	    | tee test/$@.log
+	test -z `grep "^Error:\|^FAILED:" test/$@.log`
 
 check-jdk: stamps/jtreg.stamp
 	mkdir -p test/jdk/JTwork test/jdk/JTreport
@@ -2095,6 +2103,7 @@
 		$(ICEDTEA_JTREG_OPTIONS) \
 		`pwd`/openjdk/jdk/test \
 	    | tee test/$@.log
+	test -z `grep "^Error:\|^FAILED:" test/$@.log`
 
 clean-jtreg-reports:
 	rm -rf test/hotspot test/langtools test/jdk
@@ -2107,8 +2116,13 @@
 jtreg_pids = ps x --no-headers -ww -o pid,ppid,args \
 	| awk '$$2 == 1 && $$3 ~ /^$(subst /,\/,$(CURDIR)/$(sdkimg))/ {print $$1}'
 
-jtregcheck: jtreg check-hotspot check-langtools check-jdk
+jtreg_checks = hotspot langtools jdk
+
+jtregcheck: jtreg $(jtreg_checks:%=check-%) jtregcheck-summary
+
+jtregcheck-summary:
 	for i in hotspot langtools jdk; do \
+	  touch test/check-$$i.log; \
 	  echo "--------------- jtreg console summary for $$i ---------------"; \
 	  egrep -v '^(Passed:|Directory|Re[a-z]+\ written\ to)' test/check-$$i.log; \
 	done | tee test/jtreg-summary.log
diff -r 84ca681adf9a -r b3627e530d7c NEWS
--- a/NEWS	Thu Mar 03 01:49:30 2011 +0000
+++ b/NEWS	Wed Mar 09 23:47:23 2011 +0000
@@ -11,6 +11,13 @@
 New in release 1.11 (2011-XX-XX):
 
 * Use HotSpot 20 as the default virtual machine.
+* Bug fixes
+  - PR637: make check should exit with an error code if any of regression test
+    failed. Use make check -k if you want to run all three test suites. And it
+    is now also possible to run individual jtreg testsuite (jdk,langtools and
+    hotspot) with the jtreg_checks argument:
+    make check jtreg_checks="langtools hotspot".
+    If none is provided make check runs all testsuites.
 
 New in release 1.10 (2011-XX-XX):
 
diff -r 84ca681adf9a -r b3627e530d7c patches/cacao/ignore-unknown-options.patch
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/cacao/ignore-unknown-options.patch	Wed Mar 09 23:47:23 2011 +0000
@@ -0,0 +1,17 @@
+Index: cacao/cacao/src/vm/vm.cpp
+===================================================================
+--- cacao.orig/cacao/src/vm/vm.cpp	2011-03-04 00:20:24.000000000 +0100
++++ cacao/cacao/src/vm/vm.cpp	2011-03-04 01:12:45.000000000 +0100
+@@ -1239,9 +1239,10 @@
+ 
+ #endif
+ 		default:
+-			printf("Unknown option: %s\n",
++			fprintf(stderr,"Unknown option: %s\n",
+ 				   vm_args->options[opt_index].optionString);
+-			usage();
++			opt_index++;
++			/* Ignore */
+ 		}
+ 	}
+ 
diff -r 84ca681adf9a -r b3627e530d7c patches/jamvm/ignore-more-XX-options.patch
--- a/patches/jamvm/ignore-more-XX-options.patch	Thu Mar 03 01:49:30 2011 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,41 +0,0 @@
-Index: jamvm/jamvm/src/jni.c
-===================================================================
---- jamvm/jamvm.orig/src/jni.c	2011-02-23 09:54:17.000000000 +0100
-+++ jamvm/jamvm/src/jni.c	2011-02-23 09:58:21.000000000 +0100
-@@ -1638,6 +1638,36 @@
- #endif
-         /* Compatibility options */
-         } else if(strncmp(string, "-XX:PermSize=", 13) == 0 ||
-+                  strncmp(string, "-esa", 4) == 0 ||
-+                  strncmp(string, "-Xbatch", 7) == 0 ||
-+                  strncmp(string, "-Xcomp", 6) == 0 ||
-+                  strncmp(string, "-Xverify:all", 12) == 0 ||
-+                  strncmp(string, "-XX:+AggressiveOpts", 19) == 0 ||
-+                  strncmp(string, "-XX:-BlockLayoutRotateLoops", 27) == 0 ||
-+                  strncmp(string, "-XX:CompileCommand=", 19) == 0 ||
-+                  strncmp(string, "-XX:CompileOnly=", 16) == 0 ||
-+                  strncmp(string, "-XX:CompileThreshold=", 21) == 0 ||
-+                  strncmp(string, "-XX:+DeoptimizeALot", 19) == 0 ||
-+                  strncmp(string, "-XX:+DoEscapeAnalysis", 21) == 0 ||
-+                  strncmp(string, "-XX:HeapBaseMinAddress=", 23) == 0 ||
-+                  strncmp(string, "-XX:+IgnoreUnrecognizedVMOptions", 32) == 0 ||
-+                  strncmp(string, "-XX:-Inline", 11) == 0 ||
-+                  strncmp(string, "-XX:-InlineObjectHash", 21) == 0 ||
-+                  strncmp(string, "-XX:InlineSmallCode=", 20) == 0 ||
-+                  strncmp(string, "-XX:LoopUnrollLimit=", 20) == 0 ||
-+                  strncmp(string, "-XX:-LoopUnswitching", 20) == 0 ||
-+                  strncmp(string, "-XX:MaxInlineSize=", 18) == 0 ||
-+                  strncmp(string, "-XX:+OptimizeFill", 17) == 0 ||
-+                  strncmp(string, "-XX:+PrintCompilation", 21) == 0 ||
-+                  strncmp(string, "-XX:-ProfileInterpreter", 23) == 0 ||
-+                  strncmp(string, "-XX:+ScavengeALot", 17) == 0 ||
-+                  strncmp(string, "-XX:ThreadStackSize=", 20) == 0 ||
-+                  strncmp(string, "-XX:+UnlockDiagnosticVMOptions", 30) == 0 ||
-+                  strncmp(string, "-XX:-UseCompressedOops", 22) == 0 ||
-+                  strncmp(string, "-XX:+UseCompressedOops", 22) == 0 ||
-+                  strncmp(string, "-XX:+UseConcMarkSweepGC", 23) == 0 ||
-+                  strncmp(string, "-XX:UseSSE=", 11) == 0 ||
-+                  strncmp(string, "-XX:+VerifyBeforeGC", 19) == 0 ||
-                   strncmp(string, "-XX:MaxPermSize=", 16) == 0) {
-             /* Ignore */
-         } else if(!vm_args->ignoreUnrecognized) {
diff -r 84ca681adf9a -r b3627e530d7c patches/jamvm/ignore-unknown-options.patch
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/jamvm/ignore-unknown-options.patch	Wed Mar 09 23:47:23 2011 +0000
@@ -0,0 +1,13 @@
+Index: jamvm/jamvm/src/jni.c
+===================================================================
+--- jamvm.orig/jamvm/src/jni.c	2011-02-27 04:35:37.000000000 +0100
++++ jamvm/jamvm/src/jni.c	2011-03-03 13:48:31.897900208 +0100
+@@ -1642,7 +1642,7 @@
+             /* Ignore */
+         } else if(!vm_args->ignoreUnrecognized) {
+             optError(args, "Unrecognised option: %s\n", string);
+-            goto error;
++            /* Ignore */
+         }
+     }
+ 
diff -r 84ca681adf9a -r b3627e530d7c patches/jtreg-double-to-string.patch
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/jtreg-double-to-string.patch	Wed Mar 09 23:47:23 2011 +0000
@@ -0,0 +1,48 @@
+--- openjdk-old/jdk/test/java/lang/Double/ToString.java	2011-02-28 10:51:09.454128000 +0100
++++ openjdk/jdk/test/java/lang/Double/ToString.java	2011-02-28 10:51:09.454128000 +0100
+@@ -23,17 +23,39 @@
+ 
+ /*
+  * @test
+- * @bug 4428022
++ * @bug 4428022 4511638
+  * @summary Tests for Double.toString
+- * @author Andrew Haley <aph at redhat.com>
++ * @author Andrew Haley <aph at redhat.com>, Pavel Tisnovsky <ptisnovs at redhat.com>
+  */
+ 
+ public class ToString {
++    private static boolean conversionFailure = false;
++
++    public static void check(double d, String str) {
++        String converted = Double.toString(d);
++        if (!converted.equals(str)) {
++            conversionFailure = true;
++            System.out.println("Double.toString(" + str + ") is not \"" + str + "\" but \"" + converted + "\"");
++        }
++        else {
++            System.out.println("Double value " + str + " converted correctly");
++        }
++    }
+ 
+     public static void main(String args[]) {
+-      if (!Double.toString(0.001).equals("0.001"))
+-	  throw new RuntimeException("Double.toString(0.001) is not \"0.001\"");
+-      if (!Double.toString(0.002).equals("0.002"))
+-	  throw new RuntimeException("Double.toString(0.001) is not \"0.002\"");
++        check(0.001, "0.001");
++        check(0.002, "0.002");
++        check(7.79625120912E289, "7.79625120912E289");
++        check(1.0E23, "1.0E23");
++        check(9.999999999999999E22, "1.0E23");
++        check(8.41E21, "8.41E21");
++        check(2.0E23, "2.0E23");
++        check(8.962E21, "8.962E21");
++        check(7.3879E20, "7.3879E20");
++        check(3.1E22, "3.1E22");
++        check(5.63E21, "5.63E21");
++        if (conversionFailure) {
++            throw new RuntimeException("At least one conversion failure occured");
++        }
+     }
+ }
diff -r 84ca681adf9a -r b3627e530d7c patches/jtreg-hotspot-bug-6196102.patch
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/jtreg-hotspot-bug-6196102.patch	Wed Mar 09 23:47:23 2011 +0000
@@ -0,0 +1,41 @@
+--- /dev/null	1970-01-01 01:00:00.000000000 +0100
++++ openjdk/hotspot/test/runtime/6196102/LoopTest.java	2011-02-28 22:06:47.654895000 +0100
+@@ -0,0 +1,38 @@
++/*
++ * Copyright 2011 Red Hat, Inc.  All Rights Reserved.
++ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
++ *
++ * This code is free software; you can redistribute it and/or modify it
++ * under the terms of the GNU General Public License version 2 only, as
++ * published by the Free Software Foundation.
++ *
++ * This code is distributed in the hope that it will be useful, but WITHOUT
++ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
++ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
++ * version 2 for more details (a copy is included in the LICENSE file that
++ * accompanied this code).
++ *
++ * You should have received a copy of the GNU General Public License version
++ * 2 along with this work; if not, write to the Free Software Foundation,
++ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
++ */
++
++/*
++ * @test LoopTest
++ * @bug 6196102 5091921
++ * @summary verify that loop control variable is always computed correctly
++ * @run main LoopTest
++ * @author ptisnovs at redhat.com
++*/
++public class LoopTest {
++    static public void main(String[] args) {
++        int i1 = 0;
++        int i2 = Integer.MAX_VALUE;
++        while (i1 >= 0) {
++            i1++;
++            if (i1 > i2) {
++                throw new RuntimeException("Failed when i1 == " + i1 + " and i2 == " + i2);
++            }
++        }
++    }
++}
diff -r 84ca681adf9a -r b3627e530d7c patches/jtreg-remove-test-6987555.patch
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/jtreg-remove-test-6987555.patch	Wed Mar 09 23:47:23 2011 +0000
@@ -0,0 +1,184 @@
+The regression test openjdk/hotspot/test/compiler/6987555/Test6987555.java is
+based on JSR-292 which is not part of OpenJDK6 - this means this test should be
+removed.
+
+--- openjdk/hotspot/test/compiler/6987555/Test6987555.java	2011-02-22 17:51:24.000000000 +0100
++++ /dev/null	2010-06-29 10:52:54.337250608 +0200
+@@ -1,177 +0,0 @@
+-/*
+- * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+- *
+- * This code is free software; you can redistribute it and/or modify it
+- * under the terms of the GNU General Public License version 2 only, as
+- * published by the Free Software Foundation.
+- *
+- * This code is distributed in the hope that it will be useful, but WITHOUT
+- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+- * version 2 for more details (a copy is included in the LICENSE file that
+- * accompanied this code).
+- *
+- * You should have received a copy of the GNU General Public License version
+- * 2 along with this work; if not, write to the Free Software Foundation,
+- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+- *
+- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+- * or visit www.oracle.com if you need additional information or have any
+- * questions.
+- *
+- */
+-
+-/**
+- * @test
+- * @bug 6987555
+- * @summary JSR 292 unboxing to a boolean value fails on big-endian SPARC
+- *
+- * @run main/othervm -Xint -ea -XX:+UnlockExperimentalVMOptions -XX:+EnableMethodHandles -XX:+EnableInvokeDynamic -XX:+UnlockDiagnosticVMOptions -XX:+VerifyMethodHandles Test6987555
+- */
+-
+-import java.dyn.*;
+-
+-public class Test6987555 {
+-    private static final Class   CLASS = Test6987555.class;
+-    private static final String  NAME  = "foo";
+-    private static final boolean DEBUG = false;
+-
+-    public static void main(String[] args) throws Throwable {
+-        testboolean();
+-        testbyte();
+-        testchar();
+-        testshort();
+-        testint();
+-    }
+-
+-    // boolean
+-    static void testboolean() throws Throwable {
+-        doboolean(false);
+-        doboolean(true);
+-    }
+-    static void doboolean(boolean x) throws Throwable {
+-        if (DEBUG)  System.out.println("boolean=" + x);
+-        MethodHandle mh1 = MethodHandles.lookup().findStatic(CLASS, NAME, MethodType.methodType(boolean.class, boolean.class));
+-        MethodHandle mh2 = mh1.asType(MethodType.methodType(boolean.class, Boolean.class));
+-        boolean a = mh1.<boolean>invokeExact(x);
+-        boolean b = mh2.<boolean>invokeExact(Boolean.valueOf(x));
+-        assert a == b : a + " != " + b;
+-    }
+-
+-    // byte
+-    static void testbyte() throws Throwable {
+-        byte[] a = new byte[] {
+-            Byte.MIN_VALUE,
+-            Byte.MIN_VALUE + 1,
+-            -0x0F,
+-            -1,
+-            0,
+-            1,
+-            0x0F,
+-            Byte.MAX_VALUE - 1,
+-            Byte.MAX_VALUE
+-        };
+-        for (int i = 0; i < a.length; i++) {
+-            dobyte(a[i]);
+-        }
+-    }
+-    static void dobyte(byte x) throws Throwable {
+-        if (DEBUG)  System.out.println("byte=" + x);
+-        MethodHandle mh1 = MethodHandles.lookup().findStatic(CLASS, NAME, MethodType.methodType(byte.class, byte.class));
+-        MethodHandle mh2 = mh1.asType(MethodType.methodType(byte.class, Byte.class));
+-        byte a = mh1.<byte>invokeExact(x);
+-        byte b = mh2.<byte>invokeExact(Byte.valueOf(x));
+-        assert a == b : a + " != " + b;
+-    }
+-
+-    // char
+-    static void testchar() throws Throwable {
+-        char[] a = new char[] {
+-            Character.MIN_VALUE,
+-            Character.MIN_VALUE + 1,
+-            0x000F,
+-            0x00FF,
+-            0x0FFF,
+-            Character.MAX_VALUE - 1,
+-            Character.MAX_VALUE
+-        };
+-        for (int i = 0; i < a.length; i++) {
+-            dochar(a[i]);
+-        }
+-    }
+-    static void dochar(char x) throws Throwable {
+-        if (DEBUG)  System.out.println("char=" + x);
+-        MethodHandle mh1 = MethodHandles.lookup().findStatic(CLASS, NAME, MethodType.methodType(char.class, char.class));
+-        MethodHandle mh2 = mh1.asType(MethodType.methodType(char.class, Character.class));
+-        char a = mh1.<char>invokeExact(x);
+-        char b = mh2.<char>invokeExact(Character.valueOf(x));
+-        assert a == b : a + " != " + b;
+-    }
+-
+-    // short
+-    static void testshort() throws Throwable {
+-        short[] a = new short[] {
+-            Short.MIN_VALUE,
+-            Short.MIN_VALUE + 1,
+-            -0x0FFF,
+-            -0x00FF,
+-            -0x000F,
+-            -1,
+-            0,



More information about the distro-pkg-dev mailing list