Mercurial > hg > icedtea6-hg
changeset 3147:faaea522af93
Update to b32.
2014-07-30 Andrew John Hughes <gnu.andrew@redhat.com>
* patches/jtreg-T6638712-fix.patch,
* patches/jtreg-T6650759m-fix.patch,
* patches/openjdk/6638712-wildcard_types.patch,
* patches/openjdk/6650759-missing_inference.patch:
Remove upstreamed patches.
* Makefile.am:
(OPENJDK_DATE): Update to b32 release date.
(OPENJDK_SHA256SUM): Set to hash of new b32 tarball.
(OPENJDK_VERSION): Set to b32.
(ICEDTEA_PATCHES): Drop removed patches.
* patches/openjdk/6636370-appcontext_simplification.patch:
Regenerated.
* patches/openjdk/6729772-opt_cleanup.patch,
* patches/openjdk/6799141-split_out_versions.patch,
* patches/openjdk/6816311-compiler_name.patch,
* patches/windows-awt.patch:
Remove Windows fragments added upstream.
* patches/openjdk/8013057-detect_mmap_commit_failures.patch:
Remove redundant copyright header change.
author | Andrew John Hughes <gnu.andrew@redhat.com> |
---|---|
date | Wed, 30 Jul 2014 14:41:18 +0100 |
parents | 0e26048bb9e3 |
children | 5094b84a8a5c e992d073f853 |
files | ChangeLog Makefile.am patches/jtreg-T6638712-fix.patch patches/jtreg-T6650759m-fix.patch patches/openjdk/6636370-appcontext_simplification.patch patches/openjdk/6638712-wildcard_types.patch patches/openjdk/6650759-missing_inference.patch patches/openjdk/6729772-opt_cleanup.patch patches/openjdk/6799141-split_out_versions.patch patches/openjdk/6816311-compiler_name.patch patches/openjdk/8013057-detect_mmap_commit_failures.patch patches/windows-awt.patch |
diffstat | 12 files changed, 354 insertions(+), 2271 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Tue Jul 29 01:20:12 2014 +0100 +++ b/ChangeLog Wed Jul 30 14:41:18 2014 +0100 @@ -1,3 +1,25 @@ +2014-07-30 Andrew John Hughes <gnu.andrew@redhat.com> + + * patches/jtreg-T6638712-fix.patch, + * patches/jtreg-T6650759m-fix.patch, + * patches/openjdk/6638712-wildcard_types.patch, + * patches/openjdk/6650759-missing_inference.patch: + Remove upstreamed patches. + * Makefile.am: + (OPENJDK_DATE): Update to b32 release date. + (OPENJDK_SHA256SUM): Set to hash of new b32 tarball. + (OPENJDK_VERSION): Set to b32. + (ICEDTEA_PATCHES): Drop removed patches. + * patches/openjdk/6636370-appcontext_simplification.patch: + Regenerated. + * patches/openjdk/6729772-opt_cleanup.patch, + * patches/openjdk/6799141-split_out_versions.patch, + * patches/openjdk/6816311-compiler_name.patch, + * patches/windows-awt.patch: + Remove Windows fragments added upstream. + * patches/openjdk/8013057-detect_mmap_commit_failures.patch: + Remove redundant copyright header change. + 2014-07-28 Andrew John Hughes <gnu.andrew@redhat.com> OJ39: Handle fonts with the non-canonical
--- a/Makefile.am Tue Jul 29 01:20:12 2014 +0100 +++ b/Makefile.am Wed Jul 30 14:41:18 2014 +0100 @@ -1,8 +1,8 @@ # Dependencies -OPENJDK_DATE = 15_apr_2014 -OPENJDK_SHA256SUM = 362d9bf20e91393b52dd0513896d39831cf320c49bd4bf1e28124f21569b72eb -OPENJDK_VERSION = b31 +OPENJDK_DATE = 15_jul_2014 +OPENJDK_SHA256SUM = 1a7404f38b3fa7cbb25d4273c0d94885912badd3343c5184c3b0947437501256 +OPENJDK_VERSION = b32 OPENJDK_URL = https://java.net/downloads/openjdk6/ CACAO_VERSION = 68fe50ac34ec @@ -374,12 +374,8 @@ patches/ipv4-mapped-ipv6-addresses.patch \ patches/jtreg-OpenGLContextInit.patch \ patches/openjdk/6510892-httpserver_test.patch \ - patches/openjdk/6638712-wildcard_types.patch \ - patches/openjdk/6650759-missing_inference.patch \ patches/jtreg-international-fonts.patch \ patches/f14-fonts.patch \ - patches/jtreg-T6638712-fix.patch \ - patches/jtreg-T6650759m-fix.patch \ patches/openjdk/7003777-bad-html-entity-parse.patch \ patches/rendering-engine-tests.patch \ patches/openjdk/6800846-printing-quality.patch \
--- a/patches/jtreg-T6638712-fix.patch Tue Jul 29 01:20:12 2014 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,30 +0,0 @@ ---- openjdk-old/langtools/test/tools/javac/generics/inference/6638712/T6638712a.out 2010-11-30 14:44:29.000000000 +0100 -+++ openjdk/langtools/test/tools/javac/generics/inference/6638712/T6638712a.out 2010-11-30 15:27:57.000000000 +0100 -@@ -1,2 +1,2 @@ --T6638712a.java:39:41: compiler.err.invalid.inferred.types: T, (- compiler.misc.inferred.do.not.conform.to.params: java.lang.Iterable<? extends java.util.Comparator<? super java.lang.String>>, java.util.List<java.util.Comparator<?>>) -+T6638712a.java:16:41: compiler.err.invalid.inferred.types: T, (- compiler.misc.inferred.do.not.conform.to.params: java.lang.Iterable<? extends java.util.Comparator<? super java.lang.String>>, java.util.List<java.util.Comparator<?>>) - 1 error ---- openjdk-old/langtools/test/tools/javac/generics/inference/6638712/T6638712b.out 2010-11-30 14:44:29.000000000 +0100 -+++ openjdk/langtools/test/tools/javac/generics/inference/6638712/T6638712b.out 2010-11-30 15:27:58.000000000 +0100 -@@ -1,2 +1,2 @@ --T6638712b.java:37:21: compiler.err.prob.found.req: (- compiler.misc.incompatible.types.1: (- compiler.misc.no.conforming.instance.exists: T, T, java.lang.String)), <T>T, java.lang.String -+T6638712b.java:14:21: compiler.err.prob.found.req: (- compiler.misc.incompatible.types.1: (- compiler.misc.no.conforming.instance.exists: T, T, java.lang.String)), <T>T, java.lang.String - 1 error ---- openjdk-old/langtools/test/tools/javac/generics/inference/6638712/T6638712c.out 2010-11-30 14:44:29.000000000 +0100 -+++ openjdk/langtools/test/tools/javac/generics/inference/6638712/T6638712c.out 2010-11-30 15:27:59.000000000 +0100 -@@ -1,2 +1,2 @@ --T6638712c.java:39:9: compiler.err.cant.apply.symbol: <T>sort(T[],java.util.Comparator<? super T>), T6638712c, , java.lang.Enum[],java.util.Comparator<java.lang.Enum<?>>, null -+T6638712c.java:16:9: compiler.err.cant.apply.symbol: <T>sort(T[],java.util.Comparator<? super T>), T6638712c, , java.lang.Enum[],java.util.Comparator<java.lang.Enum<?>>, null - 1 error ---- openjdk-old/langtools/test/tools/javac/generics/inference/6638712/T6638712d.out 2010-11-30 14:44:29.000000000 +0100 -+++ openjdk/langtools/test/tools/javac/generics/inference/6638712/T6638712d.out 2010-11-30 15:28:01.000000000 +0100 -@@ -1,2 +1,2 @@ --T6638712d.java:39:9: compiler.err.cant.apply.symbol: <U>m(U,java.util.List<java.util.List<U>>), T6638712d, , int,java.util.List<java.util.List<java.lang.String>>, null -+T6638712d.java:16:9: compiler.err.cant.apply.symbol: <U>m(U,java.util.List<java.util.List<U>>), T6638712d, , int,java.util.List<java.util.List<java.lang.String>>, null - 1 error ---- openjdk-old/langtools/test/tools/javac/generics/inference/6638712/T6638712e.out 2010-11-30 14:44:29.000000000 +0100 -+++ openjdk/langtools/test/tools/javac/generics/inference/6638712/T6638712e.out 2010-11-30 15:28:02.000000000 +0100 -@@ -1,2 +1,2 @@ --T6638712e.java:40:27: compiler.err.prob.found.req: (- compiler.misc.incompatible.types.1: (- compiler.misc.no.conforming.instance.exists: X, T6638712e.Foo<X,java.lang.String>, T6638712e.Foo<java.lang.Object,java.lang.String>)), <X>T6638712e.Foo<X,java.lang.String>, T6638712e.Foo<java.lang.Object,java.lang.String> -+T6638712e.java:17:27: compiler.err.prob.found.req: (- compiler.misc.incompatible.types.1: (- compiler.misc.no.conforming.instance.exists: X, T6638712e.Foo<X,java.lang.String>, T6638712e.Foo<java.lang.Object,java.lang.String>)), <X>T6638712e.Foo<X,java.lang.String>, T6638712e.Foo<java.lang.Object,java.lang.String> - 1 error
--- a/patches/jtreg-T6650759m-fix.patch Tue Jul 29 01:20:12 2014 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,6 +0,0 @@ ---- openjdk-old/langtools/test/tools/javac/generics/inference/6650759/T6650759m.out 2010-12-03 16:08:35.000000000 +0100 -+++ openjdk/langtools/test/tools/javac/generics/inference/6650759/T6650759m.out 2010-12-03 16:12:08.000000000 +0100 -@@ -1,2 +1,2 @@ --T6650759m.java:43:36: compiler.err.prob.found.req: (compiler.misc.incompatible.types), java.util.List<? super java.lang.Integer>, java.util.List<? super java.lang.String> -+T6650759m.java:43:36: compiler.err.prob.found.req: (- compiler.misc.incompatible.types), java.util.List<? super java.lang.Integer>, java.util.List<? super java.lang.String> - 1 error
--- a/patches/openjdk/6636370-appcontext_simplification.patch Tue Jul 29 01:20:12 2014 +0100 +++ b/patches/openjdk/6636370-appcontext_simplification.patch Wed Jul 30 14:41:18 2014 +0100 @@ -1,6 +1,6 @@ diff -Nru openjdk.orig/jdk/src/share/classes/sun/awt/AppContext.java openjdk/jdk/src/share/classes/sun/awt/AppContext.java ---- openjdk.orig/jdk/src/share/classes/sun/awt/AppContext.java 2013-08-05 16:49:37.120128300 +0100 -+++ openjdk/jdk/src/share/classes/sun/awt/AppContext.java 2013-08-05 17:02:51.304664462 +0100 +--- openjdk.orig/jdk/src/share/classes/sun/awt/AppContext.java 2014-07-30 05:35:13.829679786 +0100 ++++ openjdk/jdk/src/share/classes/sun/awt/AppContext.java 2014-07-30 05:41:13.086698718 +0100 @@ -151,7 +151,7 @@ contained in another AppContext. It is implicitly created for standalone apps only (i.e. not applets) @@ -71,58 +71,17 @@ // Special case: we implicitly create the main app context // if no contexts have been created yet. This covers standalone apps -@@ -308,28 +297,29 @@ - } - } +@@ -338,8 +327,7 @@ + } -- AppContext context = threadGroup2appContext.get(threadGroup); -- while (context == null) { -- threadGroup = threadGroup.getParent(); -- if (threadGroup == null) { -- return null; -+ AppContext context = threadGroup2appContext.get(threadGroup); -+ while (context == null) { -+ threadGroup = threadGroup.getParent(); -+ if (threadGroup == null) { -+ return null; -+ } -+ context = threadGroup2appContext.get(threadGroup); -+ } -+ -+ // In case we did anything in the above while loop, we add -+ // all the intermediate ThreadGroups to threadGroup2appContext -+ // so we won't spin again. -+ for (ThreadGroup tg = currentThreadGroup; tg != threadGroup; tg = tg.getParent()) { -+ threadGroup2appContext.put(tg, context); -+ } -+ -+ // Now we're done, so we cache the latest key/value pair. -+ threadAppContext.set(context); -+ -+ -+ return context; - } -- context = threadGroup2appContext.get(threadGroup); -- } -- // In case we did anything in the above while loop, we add -- // all the intermediate ThreadGroups to threadGroup2appContext -- // so we won't spin again. -- for (ThreadGroup tg = currentThreadGroup; tg != threadGroup; tg = tg.getParent()) { -- threadGroup2appContext.put(tg, context); -- } -- -- // Now we're done, so we cache the latest key/value pair. + // Now we're done, so we cache the latest key/value pair. - mostRecentThreadAppContext = - new MostRecentThreadAppContext(currentThread, context); -- -- return context; -- } -- }); -+ }); - } ++ threadAppContext.set(context); - return appContext; -@@ -473,7 +463,7 @@ + return context; + } +@@ -487,7 +475,7 @@ // Threads in the ThreadGroup to exit. long startTime = System.currentTimeMillis(); @@ -131,7 +90,7 @@ while ((this.threadGroup.activeCount() > 0) && (System.currentTimeMillis() < endTime)) { try { -@@ -488,7 +478,7 @@ +@@ -502,7 +490,7 @@ // Threads in the ThreadGroup to die. startTime = System.currentTimeMillis(); @@ -140,7 +99,7 @@ while ((this.threadGroup.activeCount() > 0) && (System.currentTimeMillis() < endTime)) { try { -@@ -507,10 +497,7 @@ +@@ -521,10 +509,7 @@ } threadGroup2appContext.remove(this.threadGroup); @@ -152,15 +111,7 @@ // Finally, we destroy the ThreadGroup entirely. try { -@@ -693,6 +680,7 @@ - * Returns a string representation of this AppContext. - * @since 1.2 - */ -+ @Override - public String toString() { - return getClass().getName() + "[threadGroup=" + threadGroup.getName() + "]"; - } -@@ -842,15 +830,6 @@ +@@ -856,15 +842,6 @@ } }
--- a/patches/openjdk/6638712-wildcard_types.patch Tue Jul 29 01:20:12 2014 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,563 +0,0 @@ -# HG changeset patch -# User mcimadamore -# Date 1284137253 -3600 -# Node ID c5fe15e03287286fa8e668798409c4d7493ee834 -# Parent 27f03394a69d018c1c2badadee65ea39c7274606 -6638712: Inference with wildcard types causes selection of inapplicable method -Summary: Added global sanity check in order to make sure that return type inference does not violate bounds constraints -Reviewed-by: jjg - -diff -r 27f03394a69d -r c5fe15e03287 src/share/classes/com/sun/tools/javac/code/Type.java ---- openjdk.orig/langtools/src/share/classes/com/sun/tools/javac/code/Type.java Wed Jun 23 16:44:15 2010 -0700 -+++ openjdk/langtools/src/share/classes/com/sun/tools/javac/code/Type.java Fri Sep 10 17:47:33 2010 +0100 -@@ -1061,6 +1061,21 @@ - return qtype.isErroneous(); - } - -+ /** -+ * Replaces this ForAll's typevars with a set of concrete Java types -+ * and returns the instantiated generic type. Subclasses might override -+ * in order to check that the list of types is a valid instantiation -+ * of the ForAll's typevars. -+ * -+ * @param actuals list of actual types -+ * @param types types instance -+ * @return qtype where all occurrences of tvars are replaced -+ * by types in actuals -+ */ -+ public Type inst(List<Type> actuals, Types types) { -+ return types.subst(qtype, tvars, actuals); -+ } -+ - public Type map(Mapping f) { - return f.apply(qtype); - } -diff -r 27f03394a69d -r c5fe15e03287 src/share/classes/com/sun/tools/javac/code/Types.java ---- openjdk.orig/langtools/src/share/classes/com/sun/tools/javac/code/Types.java Wed Jun 23 16:44:15 2010 -0700 -+++ openjdk/langtools/src/share/classes/com/sun/tools/javac/code/Types.java Fri Sep 10 17:47:33 2010 +0100 -@@ -331,6 +331,14 @@ - if (s.tag >= firstPartialTag) - return isSuperType(s, t); - -+ if (s.isCompound()) { -+ for (Type s2 : interfaces(s).prepend(supertype(s))) { -+ if (!isSubtype(t, s2, capture)) -+ return false; -+ } -+ return true; -+ } -+ - Type lower = lowerBound(s); - if (s != lower) - return isSubtype(capture ? capture(t) : t, lower, false); -@@ -2766,6 +2774,14 @@ - /** - * Capture conversion as specified by JLS 3rd Ed. - */ -+ -+ public List<Type> capture(List<Type> ts) { -+ List<Type> buf = List.nil(); -+ for (Type t : ts) { -+ buf = buf.prepend(capture(t)); -+ } -+ return buf.reverse(); -+ } - public Type capture(Type t) { - if (t.tag != CLASS) - return t; -diff -r 27f03394a69d -r c5fe15e03287 src/share/classes/com/sun/tools/javac/comp/Check.java ---- openjdk.orig/langtools/src/share/classes/com/sun/tools/javac/comp/Check.java Wed Jun 23 16:44:15 2010 -0700 -+++ openjdk/langtools/src/share/classes/com/sun/tools/javac/comp/Check.java Fri Sep 10 17:47:33 2010 +0100 -@@ -383,6 +383,10 @@ - JCDiagnostic.fragment("incompatible.types" + (d!=null ? ".1" : ""), d), - t, pt); - } -+ } catch (Infer.InvalidInstanceException ex) { -+ JCDiagnostic d = ex.getDiagnostic(); -+ log.error(pos, "invalid.inferred.types", t.tvars, d); -+ return syms.errType; - } - } - } -diff -r 27f03394a69d -r c5fe15e03287 src/share/classes/com/sun/tools/javac/comp/Infer.java ---- openjdk.orig/langtools/src/share/classes/com/sun/tools/javac/comp/Infer.java Wed Jun 23 16:44:15 2010 -0700 -+++ openjdk/langtools/src/share/classes/com/sun/tools/javac/comp/Infer.java Fri Sep 10 17:47:33 2010 +0100 -@@ -29,6 +29,7 @@ - import com.sun.tools.javac.util.List; - import com.sun.tools.javac.code.*; - import com.sun.tools.javac.code.Type.*; -+import com.sun.tools.javac.code.Symbol.*; - - import static com.sun.tools.javac.code.Flags.*; - import static com.sun.tools.javac.code.Kinds.*; -@@ -50,6 +51,7 @@ - - Symtab syms; - Types types; -+ Resolve rs; - - public static Infer instance(Context context) { - Infer instance = context.get(inferKey); -@@ -62,43 +64,51 @@ - context.put(inferKey, this); - syms = Symtab.instance(context); - types = Types.instance(context); -+ rs = Resolve.instance(context); - } - -- public static class NoInstanceException extends RuntimeException { -+ public static class InferenceException extends RuntimeException { - private static final long serialVersionUID = 0; - -- boolean isAmbiguous; // exist several incomparable best instances? -- - JCDiagnostic diagnostic; - -- NoInstanceException(boolean isAmbiguous) { -+ InferenceException() { - this.diagnostic = null; -- this.isAmbiguous = isAmbiguous; - } -- NoInstanceException setMessage(String key) { -- this.diagnostic = JCDiagnostic.fragment(key); -+ InferenceException setMessage(String key, Object... args) { -+ this.diagnostic = JCDiagnostic.fragment(key, args); - return this; - } -- NoInstanceException setMessage(String key, Object arg1) { -- this.diagnostic = JCDiagnostic.fragment(key, arg1); -- return this; -- } -- NoInstanceException setMessage(String key, Object arg1, Object arg2) { -- this.diagnostic = JCDiagnostic.fragment(key, arg1, arg2); -- return this; -- } -- NoInstanceException setMessage(String key, Object arg1, Object arg2, Object arg3) { -- this.diagnostic = JCDiagnostic.fragment(key, arg1, arg2, arg3); -- return this; -- } -+ - public JCDiagnostic getDiagnostic() { - return diagnostic; - } - } -+ -+ public static class NoInstanceException extends InferenceException { -+ private static final long serialVersionUID = 1; -+ -+ boolean isAmbiguous; // exist several incomparable best instances? -+ -+ NoInstanceException(boolean isAmbiguous) { -+ super(); -+ this.isAmbiguous = isAmbiguous; -+ } -+ } -+ -+ public static class InvalidInstanceException extends InferenceException { -+ private static final long serialVersionUID = 2; -+ -+ InvalidInstanceException() { -+ super(); -+ } -+ } -+ - private final NoInstanceException ambiguousNoInstanceException = - new NoInstanceException(true); - private final NoInstanceException unambiguousNoInstanceException = - new NoInstanceException(false); -+ private final InvalidInstanceException invalidInstanceException = new InvalidInstanceException(); - - /*************************************************************************** - * Auxiliary type values and classes -@@ -247,7 +257,7 @@ - */ - public Type instantiateExpr(ForAll that, - Type to, -- Warner warn) throws NoInstanceException { -+ Warner warn) throws InferenceException { - List<Type> undetvars = Type.map(that.tvars, fromTypeVarFun); - for (List<Type> l = undetvars; l.nonEmpty(); l = l.tail) { - UndetVar v = (UndetVar) l.head; -@@ -273,8 +283,7 @@ - List<Type> targs = Type.map(undetvars, getInstFun); - targs = types.subst(targs, that.tvars, targs); - checkWithinBounds(that.tvars, targs, warn); -- -- return getInstFun.apply(qtype1); -+ return that.inst(targs, types); - } - - /** Instantiate method type `mt' by finding instantiations of -@@ -282,36 +291,42 @@ - */ - public Type instantiateMethod(List<Type> tvars, - MethodType mt, -- List<Type> argtypes, -- boolean allowBoxing, -- boolean useVarargs, -- Warner warn) throws NoInstanceException { -+ final List<Type> argtypes, -+ final boolean allowBoxing, -+ final boolean useVarargs, -+ final Warner warn) throws InferenceException { - //-System.err.println("instantiateMethod(" + tvars + ", " + mt + ", " + argtypes + ")"); //DEBUG - List<Type> undetvars = Type.map(tvars, fromTypeVarFun); - List<Type> formals = mt.argtypes; -- -+ //need to capture exactly once - otherwise subsequent -+ //applicability checks might fail -+ final List<Type> capturedArgs = types.capture(argtypes); -+ List<Type> actuals = capturedArgs; -+ List<Type> actualsNoCapture = argtypes; - // instantiate all polymorphic argument types and - // set up lower bounds constraints for undetvars - Type varargsFormal = useVarargs ? formals.last() : null; -- while (argtypes.nonEmpty() && formals.head != varargsFormal) { -- Type ft = formals.head; -- Type at = argtypes.head.baseType(); -- if (at.tag == FORALL) -- at = instantiateArg((ForAll) at, ft, tvars, warn); -- Type sft = types.subst(ft, tvars, undetvars); -+ while (actuals.nonEmpty() && formals.head != varargsFormal) { -+ Type formal = formals.head; -+ Type actual = actuals.head.baseType(); -+ Type actualNoCapture = actualsNoCapture.head.baseType(); -+ if (actual.tag == FORALL) -+ actual = instantiateArg((ForAll)actual, formal, tvars, warn); -+ Type undetFormal = types.subst(formal, tvars, undetvars); - boolean works = allowBoxing -- ? types.isConvertible(at, sft, warn) -- : types.isSubtypeUnchecked(at, sft, warn); -+ ? types.isConvertible(actual, undetFormal, warn) -+ : types.isSubtypeUnchecked(actual, undetFormal, warn); - if (!works) { - throw unambiguousNoInstanceException - .setMessage("no.conforming.assignment.exists", -- tvars, at, ft); -+ tvars, actualNoCapture, formal); - } - formals = formals.tail; -- argtypes = argtypes.tail; -+ actuals = actuals.tail; -+ actualsNoCapture = actualsNoCapture.tail; - } - if (formals.head != varargsFormal || // not enough args -- !useVarargs && argtypes.nonEmpty()) { // too many args -+ !useVarargs && actuals.nonEmpty()) { // too many args - // argument lists differ in length - throw unambiguousNoInstanceException - .setMessage("arg.length.mismatch"); -@@ -319,20 +334,21 @@ - - // for varargs arguments as well - if (useVarargs) { -- Type elt = types.elemtype(varargsFormal); -- Type sft = types.subst(elt, tvars, undetvars); -- while (argtypes.nonEmpty()) { -- Type ft = sft; -- Type at = argtypes.head.baseType(); -- if (at.tag == FORALL) -- at = instantiateArg((ForAll) at, ft, tvars, warn); -- boolean works = types.isConvertible(at, sft, warn); -+ Type elemType = types.elemtype(varargsFormal); -+ Type elemUndet = types.subst(elemType, tvars, undetvars); -+ while (actuals.nonEmpty()) { -+ Type actual = actuals.head.baseType(); -+ Type actualNoCapture = actualsNoCapture.head.baseType(); -+ if (actual.tag == FORALL) -+ actual = instantiateArg((ForAll)actual, elemType, tvars, warn); -+ boolean works = types.isConvertible(actual, elemUndet, warn); - if (!works) { - throw unambiguousNoInstanceException - .setMessage("no.conforming.assignment.exists", -- tvars, at, ft); -+ tvars, actualNoCapture, elemType); - } -- argtypes = argtypes.tail; -+ actuals = actuals.tail; -+ actualsNoCapture = actualsNoCapture.tail; - } - } - -@@ -363,16 +379,38 @@ - } - checkWithinBounds(tvars, undettypes.toList(), warn); - -+ mt = (MethodType)types.subst(mt, tvars, insttypes.toList()); -+ - if (!restvars.isEmpty()) { - // if there are uninstantiated variables, - // quantify result type with them -- mt = new MethodType(mt.argtypes, -- new ForAll(restvars.toList(), mt.restype), -- mt.thrown, syms.methodClass); -+ final List<Type> inferredTypes = insttypes.toList(); -+ final List<Type> all_tvars = tvars; //this is the wrong tvars -+ final MethodType mt2 = new MethodType(mt.argtypes, null, mt.thrown, syms.methodClass); -+ mt2.restype = new ForAll(restvars.toList(), mt.restype) { -+ @Override -+ public Type inst(List<Type> inferred, Types types) throws NoInstanceException { -+ List<Type> formals = types.subst(mt2.argtypes, tvars, inferred); -+ if (!rs.argumentsAcceptable(capturedArgs, formals, -+ allowBoxing, useVarargs, warn)) { -+ // inferred method is not applicable -+ throw invalidInstanceException.setMessage("inferred.do.not.conform.to.params", formals, argtypes); -+ } -+ // check that inferred bounds conform to their bounds -+ checkWithinBounds(all_tvars, -+ types.subst(inferredTypes, tvars, inferred), warn); -+ return super.inst(inferred, types); -+ }}; -+ return mt2; - } -- -- // return instantiated version of method type -- return types.subst(mt, tvars, insttypes.toList()); -+ else if (!rs.argumentsAcceptable(capturedArgs, mt.getParameterTypes(), allowBoxing, useVarargs, warn)) { -+ // inferred method is not applicable -+ throw invalidInstanceException.setMessage("inferred.do.not.conform.to.params", mt.getParameterTypes(), argtypes); -+ } -+ else { -+ // return instantiated version of method type -+ return mt; -+ } - } - //where - -@@ -384,7 +422,7 @@ - private Type instantiateArg(ForAll that, - Type to, - List<Type> tvars, -- Warner warn) throws NoInstanceException { -+ Warner warn) throws InferenceException { - List<Type> targs; - try { - return instantiateExpr(that, to, warn); -@@ -401,16 +439,16 @@ - private void checkWithinBounds(List<Type> tvars, - List<Type> arguments, - Warner warn) -- throws NoInstanceException { -+ throws InvalidInstanceException { - for (List<Type> tvs = tvars, args = arguments; - tvs.nonEmpty(); - tvs = tvs.tail, args = args.tail) { - if (args.head instanceof UndetVar) continue; - List<Type> bounds = types.subst(types.getBounds((TypeVar)tvs.head), tvars, arguments); - if (!types.isSubtypeUnchecked(args.head, bounds, warn)) -- throw unambiguousNoInstanceException -+ throw invalidInstanceException - .setMessage("inferred.do.not.conform.to.bounds", -- arguments, tvars); -+ args.head, bounds); - } - } - } -diff -r 27f03394a69d -r c5fe15e03287 src/share/classes/com/sun/tools/javac/comp/Resolve.java ---- openjdk.orig/langtools/src/share/classes/com/sun/tools/javac/comp/Resolve.java Wed Jun 23 16:44:15 2010 -0700 -+++ openjdk/langtools/src/share/classes/com/sun/tools/javac/comp/Resolve.java Fri Sep 10 17:47:33 2010 +0100 -@@ -279,7 +279,7 @@ - boolean allowBoxing, - boolean useVarargs, - Warner warn) -- throws Infer.NoInstanceException { -+ throws Infer.InferenceException { - if (useVarargs && (m.flags() & VARARGS) == 0) return null; - Type mt = types.memberType(site, m); - -@@ -350,7 +350,7 @@ - try { - return rawInstantiate(env, site, m, argtypes, typeargtypes, - allowBoxing, useVarargs, warn); -- } catch (Infer.NoInstanceException ex) { -+ } catch (Infer.InferenceException ex) { - return null; - } - } -@@ -562,7 +562,7 @@ - default: return bestSoFar; - } - } -- } catch (Infer.NoInstanceException ex) { -+ } catch (Infer.InferenceException ex) { - switch (bestSoFar.kind) { - case ABSENT_MTH: - return wrongMethod.setWrongSym(sym, ex.getDiagnostic()); -diff -r 27f03394a69d -r c5fe15e03287 src/share/classes/com/sun/tools/javac/resources/compiler.properties ---- openjdk.orig/langtools/src/share/classes/com/sun/tools/javac/resources/compiler.properties Wed Jun 23 16:44:15 2010 -0700 -+++ openjdk/langtools/src/share/classes/com/sun/tools/javac/resources/compiler.properties Fri Sep 10 17:47:33 2010 +0100 -@@ -454,6 +454,8 @@ - type parameters of {0} cannot be determined - compiler.err.undetermined.type.1=\ - type parameters of {0} cannot be determined; {1} -+compiler.err.invalid.inferred.types=\ -+ invalid inferred types for {0}; {1} - compiler.err.unreachable.stmt=\ - unreachable statement - compiler.err.initializer.must.be.able.to.complete.normally=\ -@@ -960,7 +962,13 @@ - compiler.misc.arg.length.mismatch=\ - cannot instantiate from arguments because actual and formal argument lists differ in length - compiler.misc.inferred.do.not.conform.to.bounds=\ -- inferred type argument(s) {0} do not conform to bounds of type variable(s) {1} -+ inferred type does not conform to declared bound(s)\n\ -+ inferred: {0}\n\ -+ bound(s): {1} -+compiler.misc.inferred.do.not.conform.to.params=\ -+ actual arguments do not conforms to inferred formal arguments\n\ -+ required: {0}\n\ -+ found: {1} - - ##### - -diff -r 27f03394a69d -r c5fe15e03287 test/tools/javac/generics/inference/6302954/T6476073.java ---- openjdk.orig/langtools/test/tools/javac/generics/inference/6302954/T6476073.java Wed Jun 23 16:44:15 2010 -0700 -+++ openjdk/langtools/test/tools/javac/generics/inference/6302954/T6476073.java Fri Sep 10 17:47:33 2010 +0100 -@@ -25,6 +25,7 @@ - * @test - * @bug 6476073 - * @summary Capture using super wildcard of type variables doesn't work -+ * @ignore awaiting for 6650759 (see bug report for a detailed evaluation) - * @compile T6476073.java - */ - -diff -r 27f03394a69d -r c5fe15e03287 test/tools/javac/generics/inference/6638712/T6638712a.java ---- /dev/null Thu Jan 01 00:00:00 1970 +0000 -+++ openjdk/langtools/test/tools/javac/generics/inference/6638712/T6638712a.java Fri Sep 10 17:47:33 2010 +0100 -@@ -0,0 +1,18 @@ -+/* -+ * @test /nodynamiccopyright/ -+ * @bug 6638712 -+ * @author mcimadamore -+ * @summary Inference with wildcard types causes selection of inapplicable method -+ * @compile/fail/ref=T6638712a.out -XDrawDiagnostics T6638712a.java -+ */ -+ -+import java.util.*; -+ -+class T6638712a { -+ -+ <T> Comparator<T> compound(Iterable<? extends Comparator<? super T>> it) {} -+ -+ public void test(List<Comparator<?>> x) { -+ Comparator<String> c3 = compound(x); -+ } -+} -diff -r 27f03394a69d -r c5fe15e03287 test/tools/javac/generics/inference/6638712/T6638712a.out ---- /dev/null Thu Jan 01 00:00:00 1970 +0000 -+++ openjdk/langtools/test/tools/javac/generics/inference/6638712/T6638712a.out Fri Sep 10 17:47:33 2010 +0100 -@@ -0,0 +1,2 @@ -+T6638712a.java:39:41: compiler.err.invalid.inferred.types: T, (- compiler.misc.inferred.do.not.conform.to.params: java.lang.Iterable<? extends java.util.Comparator<? super java.lang.String>>, java.util.List<java.util.Comparator<?>>) -+1 error -diff -r 27f03394a69d -r c5fe15e03287 test/tools/javac/generics/inference/6638712/T6638712b.java ---- /dev/null Thu Jan 01 00:00:00 1970 +0000 -+++ openjdk/langtools/test/tools/javac/generics/inference/6638712/T6638712b.java Fri Sep 10 17:47:33 2010 +0100 -@@ -0,0 +1,16 @@ -+/* -+ * @test /nodynamiccopyright/ -+ * @bug 6638712 -+ * @author mcimadamore -+ * @summary Inference with wildcard types causes selection of inapplicable method -+ * @compile/fail/ref=T6638712b.out -XDrawDiagnostics T6638712b.java -+ */ -+ -+class T6638712b<X> { -+ -+ <I extends T6638712b<T>, T> T m(I test) { return null; } -+ -+ void test(T6638712b<Integer> x) { -+ String i = m(x); -+ } -+} -diff -r 27f03394a69d -r c5fe15e03287 test/tools/javac/generics/inference/6638712/T6638712b.out ---- /dev/null Thu Jan 01 00:00:00 1970 +0000 -+++ openjdk/langtools/test/tools/javac/generics/inference/6638712/T6638712b.out Fri Sep 10 17:47:33 2010 +0100 -@@ -0,0 +1,2 @@ -+T6638712b.java:37:21: compiler.err.prob.found.req: (- compiler.misc.incompatible.types.1: (- compiler.misc.no.conforming.instance.exists: T, T, java.lang.String)), <T>T, java.lang.String -+1 error -diff -r 27f03394a69d -r c5fe15e03287 test/tools/javac/generics/inference/6638712/T6638712c.java ---- /dev/null Thu Jan 01 00:00:00 1970 +0000 -+++ openjdk/langtools/test/tools/javac/generics/inference/6638712/T6638712c.java Fri Sep 10 17:47:33 2010 +0100 -@@ -0,0 +1,18 @@ -+/* -+ * @test /nodynamiccopyright/ -+ * @bug 6638712 6707034 -+ * @author mcimadamore -+ * @summary Inference with wildcard types causes selection of inapplicable method -+ * @compile/fail/ref=T6638712c.out -XDrawDiagnostics T6638712c.java -+ */ -+ -+import java.util.*; -+ -+class T6638712c { -+ -+ <T> T sort(T[] a, Comparator<? super T> c) { return null; } -+ -+ void test(Enum[] e, Comparator<Enum<?>> comp) { -+ sort(e, comp); -+ } -+} -diff -r 27f03394a69d -r c5fe15e03287 test/tools/javac/generics/inference/6638712/T6638712c.out ---- /dev/null Thu Jan 01 00:00:00 1970 +0000 -+++ openjdk/langtools/test/tools/javac/generics/inference/6638712/T6638712c.out Fri Sep 10 17:47:33 2010 +0100 -@@ -0,0 +1,2 @@ -+T6638712c.java:39:9: compiler.err.cant.apply.symbol: <T>sort(T[],java.util.Comparator<? super T>), T6638712c, , java.lang.Enum[],java.util.Comparator<java.lang.Enum<?>>, null -+1 error -diff -r 27f03394a69d -r c5fe15e03287 test/tools/javac/generics/inference/6638712/T6638712d.java ---- /dev/null Thu Jan 01 00:00:00 1970 +0000 -+++ openjdk/langtools/test/tools/javac/generics/inference/6638712/T6638712d.java Fri Sep 10 17:47:33 2010 +0100 -@@ -0,0 +1,18 @@ -+/* -+ * @test /nodynamiccopyright/ -+ * @bug 6638712 6730468 -+ * @author mcimadamore -+ * @summary Inference with wildcard types causes selection of inapplicable method -+ * @compile/fail/ref=T6638712d.out -XDrawDiagnostics T6638712d.java -+ */ -+ -+import java.util.*; -+ -+public class T6638712d { -+ -+ <U> U m(U u, List<List<U>> list) { return null; } -+ -+ void test(List<List<String>> lls) { -+ m(1, lls); -+ } -+} -diff -r 27f03394a69d -r c5fe15e03287 test/tools/javac/generics/inference/6638712/T6638712d.out ---- /dev/null Thu Jan 01 00:00:00 1970 +0000 -+++ openjdk/langtools/test/tools/javac/generics/inference/6638712/T6638712d.out Fri Sep 10 17:47:33 2010 +0100 -@@ -0,0 +1,2 @@ -+T6638712d.java:39:9: compiler.err.cant.apply.symbol: <U>m(U,java.util.List<java.util.List<U>>), T6638712d, , int,java.util.List<java.util.List<java.lang.String>>, null -+1 error -diff -r 27f03394a69d -r c5fe15e03287 test/tools/javac/generics/inference/6638712/T6638712e.java ---- /dev/null Thu Jan 01 00:00:00 1970 +0000 -+++ openjdk/langtools/test/tools/javac/generics/inference/6638712/T6638712e.java Fri Sep 10 17:47:33 2010 +0100 -@@ -0,0 +1,20 @@ -+/* -+ * @test /nodynamiccopyright/ -+ * @bug 6638712 6795689 -+ * @author mcimadamore -+ * @summary Inference with wildcard types causes selection of inapplicable method -+ * @compile/fail/ref=T6638712e.out -XDrawDiagnostics T6638712e.java -+ */ -+ -+class T6638712e { -+ -+ static class Foo<A, B> { -+ <X> Foo<X, B> m(Foo<? super X, ? extends A> foo) { return null;} -+ } -+ -+ static class Test { -+ Foo<Object, String> test(Foo<Boolean, String> foo1, Foo<Boolean, Boolean> foo2) { -+ return foo1.m(foo2); -+ } -+ } -+} -diff -r 27f03394a69d -r c5fe15e03287 test/tools/javac/generics/inference/6638712/T6638712e.out ---- /dev/null Thu Jan 01 00:00:00 1970 +0000 -+++ openjdk/langtools/test/tools/javac/generics/inference/6638712/T6638712e.out Fri Sep 10 17:47:33 2010 +0100 -@@ -0,0 +1,2 @@ -+T6638712e.java:40:27: compiler.err.prob.found.req: (- compiler.misc.incompatible.types.1: (- compiler.misc.no.conforming.instance.exists: X, T6638712e.Foo<X,java.lang.String>, T6638712e.Foo<java.lang.Object,java.lang.String>)), <X>T6638712e.Foo<X,java.lang.String>, T6638712e.Foo<java.lang.Object,java.lang.String> -+1 error
--- a/patches/openjdk/6650759-missing_inference.patch Tue Jul 29 01:20:12 2014 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,884 +0,0 @@ -diff -Nru openjdk.orig/langtools/src/share/classes/com/sun/tools/javac/code/Type.java openjdk/langtools/src/share/classes/com/sun/tools/javac/code/Type.java ---- openjdk.orig/langtools/src/share/classes/com/sun/tools/javac/code/Type.java 2010-09-09 20:03:34.000000000 +0100 -+++ openjdk/langtools/src/share/classes/com/sun/tools/javac/code/Type.java 2010-09-09 20:24:56.236744893 +0100 -@@ -1063,7 +1063,7 @@ - - /** - * Replaces this ForAll's typevars with a set of concrete Java types -- * and returns the instantiated generic type. Subclasses might override -+ * and returns the instantiated generic type. Subclasses should override - * in order to check that the list of types is a valid instantiation - * of the ForAll's typevars. - * -@@ -1076,6 +1076,42 @@ - return types.subst(qtype, tvars, actuals); - } - -+ /** -+ * Kind of type-constraint derived during type inference -+ */ -+ public enum ConstraintKind { -+ /** -+ * upper bound constraint (a type variable must be instantiated -+ * with a type T, where T is a subtype of all the types specified by -+ * its EXTENDS constraints). -+ */ -+ EXTENDS, -+ /** -+ * lower bound constraint (a type variable must be instantiated -+ * with a type T, where T is a supertype of all the types specified by -+ * its SUPER constraints). -+ */ -+ SUPER, -+ /** -+ * equality constraint (a type variable must be instantiated to the type -+ * specified by its EQUAL constraint. -+ */ -+ EQUAL; -+ } -+ -+ /** -+ * Get the type-constraints of a given kind for a given type-variable of -+ * this ForAll type. Subclasses should override in order to return more -+ * accurate sets of constraints. -+ * -+ * @param tv the type-variable for which the constraint is to be retrieved -+ * @param ck the constraint kind to be retrieved -+ * @return the list of types specified by the selected constraint -+ */ -+ public List<Type> getConstraints(TypeVar tv, ConstraintKind ck) { -+ return List.nil(); -+ } -+ - public Type map(Mapping f) { - return f.apply(qtype); - } -diff -Nru openjdk.orig/langtools/src/share/classes/com/sun/tools/javac/comp/Infer.java openjdk/langtools/src/share/classes/com/sun/tools/javac/comp/Infer.java ---- openjdk.orig/langtools/src/share/classes/com/sun/tools/javac/comp/Infer.java 2010-09-09 20:03:34.000000000 +0100 -+++ openjdk/langtools/src/share/classes/com/sun/tools/javac/comp/Infer.java 2010-09-09 20:25:15.752817376 +0100 -@@ -29,6 +29,7 @@ - import com.sun.tools.javac.util.List; - import com.sun.tools.javac.code.*; - import com.sun.tools.javac.code.Type.*; -+import com.sun.tools.javac.code.Type.ForAll.ConstraintKind; - import com.sun.tools.javac.code.Symbol.*; - - import static com.sun.tools.javac.code.Flags.*; -@@ -51,6 +52,7 @@ - - Symtab syms; - Types types; -+ Check chk; - Resolve rs; - - public static Infer instance(Context context) { -@@ -65,6 +67,7 @@ - syms = Symtab.instance(context); - types = Types.instance(context); - rs = Resolve.instance(context); -+ chk = Check.instance(context); - } - - public static class InferenceException extends RuntimeException { -@@ -260,14 +263,19 @@ - Warner warn) throws InferenceException { - List<Type> undetvars = Type.map(that.tvars, fromTypeVarFun); - for (List<Type> l = undetvars; l.nonEmpty(); l = l.tail) { -- UndetVar v = (UndetVar) l.head; -+ UndetVar uv = (UndetVar) l.head; -+ TypeVar tv = (TypeVar)uv.qtype; - ListBuffer<Type> hibounds = new ListBuffer<Type>(); -- for (List<Type> l1 = types.getBounds((TypeVar) v.qtype); l1.nonEmpty(); l1 = l1.tail) { -- if (!l1.head.containsSome(that.tvars)) { -- hibounds.append(l1.head); -+ for (Type t : that.getConstraints(tv, ConstraintKind.EXTENDS).prependList(types.getBounds(tv))) { -+ if (!t.containsSome(that.tvars) && t.tag != BOT) { -+ hibounds.append(t); - } - } -- v.hibounds = hibounds.toList(); -+ List<Type> inst = that.getConstraints(tv, ConstraintKind.EQUAL); -+ if (inst.nonEmpty() && inst.head.tag != BOT) { -+ uv.inst = inst.head; -+ } -+ uv.hibounds = hibounds.toList(); - } - Type qtype1 = types.subst(that.qtype, that.tvars, undetvars); - if (!types.isSubtype(qtype1, to)) { -@@ -283,7 +291,7 @@ - List<Type> targs = Type.map(undetvars, getInstFun); - targs = types.subst(targs, that.tvars, targs); - checkWithinBounds(that.tvars, targs, warn); -- return that.inst(targs, types); -+ return chk.checkType(warn.pos(), that.inst(targs, types), to); - } - - /** Instantiate method type `mt' by finding instantiations of -@@ -359,6 +367,9 @@ - /** Type variables instantiated to bottom */ - ListBuffer<Type> restvars = new ListBuffer<Type>(); - -+ /** Undet vars instantiated to bottom */ -+ final ListBuffer<Type> restundet = new ListBuffer<Type>(); -+ - /** Instantiated types or TypeVars if under-constrained */ - ListBuffer<Type> insttypes = new ListBuffer<Type>(); - -@@ -369,6 +380,7 @@ - UndetVar uv = (UndetVar)t; - if (uv.inst.tag == BOT) { - restvars.append(uv.qtype); -+ restundet.append(uv); - insttypes.append(uv.qtype); - undettypes.append(uv); - uv.inst = null; -@@ -389,17 +401,32 @@ - final MethodType mt2 = new MethodType(mt.argtypes, null, mt.thrown, syms.methodClass); - mt2.restype = new ForAll(restvars.toList(), mt.restype) { - @Override -+ public List<Type> getConstraints(TypeVar tv, ConstraintKind ck) { -+ for (Type t : restundet.toList()) { -+ UndetVar uv = (UndetVar)t; -+ if (uv.qtype == tv) { -+ switch (ck) { -+ case EXTENDS: return uv.hibounds; -+ case SUPER: return uv.lobounds; -+ case EQUAL: return uv.inst != null ? List.of(uv.inst) : List.<Type>nil(); -+ } -+ } -+ } -+ return List.nil(); -+ } -+ -+ @Override - public Type inst(List<Type> inferred, Types types) throws NoInstanceException { - List<Type> formals = types.subst(mt2.argtypes, tvars, inferred); -- if (!rs.argumentsAcceptable(capturedArgs, formals, -+ if (!rs.argumentsAcceptable(capturedArgs, formals, - allowBoxing, useVarargs, warn)) { - // inferred method is not applicable - throw invalidInstanceException.setMessage("inferred.do.not.conform.to.params", formals, argtypes); -- } -- // check that inferred bounds conform to their bounds -- checkWithinBounds(all_tvars, -+ } -+ // check that inferred bounds conform to their bounds -+ checkWithinBounds(all_tvars, - types.subst(inferredTypes, tvars, inferred), warn); -- return super.inst(inferred, types); -+ return super.inst(inferred, types); - }}; - return mt2; - } -diff -Nru openjdk.orig/langtools/test/tools/javac/generics/inference/6302954/T6476073.java openjdk/langtools/test/tools/javac/generics/inference/6302954/T6476073.java ---- openjdk.orig/langtools/test/tools/javac/generics/inference/6302954/T6476073.java 2010-09-09 20:03:34.000000000 +0100 -+++ openjdk/langtools/test/tools/javac/generics/inference/6302954/T6476073.java 2010-09-09 20:24:56.236744893 +0100 -@@ -25,7 +25,6 @@ - * @test - * @bug 6476073 - * @summary Capture using super wildcard of type variables doesn't work -- * @ignore awaiting for 6650759 (see bug report for a detailed evaluation) - * @compile T6476073.java - */ - -diff -Nru openjdk.orig/langtools/test/tools/javac/generics/inference/6650759/T6650759a.java openjdk/langtools/test/tools/javac/generics/inference/6650759/T6650759a.java ---- openjdk.orig/langtools/test/tools/javac/generics/inference/6650759/T6650759a.java 1970-01-01 01:00:00.000000000 +0100 -+++ openjdk/langtools/test/tools/javac/generics/inference/6650759/T6650759a.java 2010-09-09 20:24:56.248744934 +0100 -@@ -0,0 +1,45 @@ -+/* -+ * Copyright 2009 Sun Microsystems, 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. -+ * -+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, -+ * CA 95054 USA or visit www.sun.com if you need additional information or -+ * have any questions. -+ */ -+ -+/* -+ * @test -+ * @bug 6650759 -+ * @author mcimadamore -+ * @summary Inference of formal type parameter (unused in formal parameters) is not performed -+ * @compile T6650759a.java -+ */ -+ -+class T6650759a { -+ -+ public static interface Interface<T> { } -+ public static class IntegerInterface implements Interface<Integer> { } -+ -+ <I extends Interface<T>, T> T getGenericValue(I test) { return null; } -+ -+ void testSet(Integer test) { } -+ -+ void test() { -+ Integer test = getGenericValue(new IntegerInterface()); -+ testSet(getGenericValue(new IntegerInterface())); -+ } -+} -\ No newline at end of file -diff -Nru openjdk.orig/langtools/test/tools/javac/generics/inference/6650759/T6650759b.java openjdk/langtools/test/tools/javac/generics/inference/6650759/T6650759b.java ---- openjdk.orig/langtools/test/tools/javac/generics/inference/6650759/T6650759b.java 1970-01-01 01:00:00.000000000 +0100 -+++ openjdk/langtools/test/tools/javac/generics/inference/6650759/T6650759b.java 2010-09-09 20:24:56.248744934 +0100 -@@ -0,0 +1,52 @@ -+/* -+ * Copyright 2009 Sun Microsystems, 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. -+ * -+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, -+ * CA 95054 USA or visit www.sun.com if you need additional information or -+ * have any questions. -+ */ -+ -+/* -+ * @test -+ * @bug 6650759 -+ * @author mcimadamore -+ * @summary Inference of formal type parameter (unused in formal parameters) is not performed -+ * @compile T6650759b.java -+ */ -+ -+public class T6650759b { -+ -+ interface A<X extends A<X, Y>, Y extends B<X>> {} -+ -+ static class B<X extends A<X, ?>> {} -+ -+ interface C<X extends A<X, Y>, Y extends B<X>> {} -+ -+ interface D<X extends A<X, Y>, Y extends B<X>> {} -+ -+ static class E<X extends A<X, Y>, Y extends B<X>, W extends C<X, Y>> implements D<X, Y> { -+ -+ static <X extends A<X, Y>, Y extends B<X>, W extends C<X, Y>> D<X, Y> of(W w) { -+ return null; -+ } -+ } -+ -+ <X extends A<X, Y>, Y extends B<X>, W extends C<X, Y>, Z extends D<X, Y>> Z test(W w) { -+ return (Z) E.of(w); -+ } -+} -diff -Nru openjdk.orig/langtools/test/tools/javac/generics/inference/6650759/T6650759c.java openjdk/langtools/test/tools/javac/generics/inference/6650759/T6650759c.java ---- openjdk.orig/langtools/test/tools/javac/generics/inference/6650759/T6650759c.java 1970-01-01 01:00:00.000000000 +0100 -+++ openjdk/langtools/test/tools/javac/generics/inference/6650759/T6650759c.java 2010-09-09 20:24:56.248744934 +0100 -@@ -0,0 +1,49 @@ -+/* -+ * Copyright 2009 Sun Microsystems, 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. -+ * -+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, -+ * CA 95054 USA or visit www.sun.com if you need additional information or -+ * have any questions. -+ */ -+ -+/* -+ * @test -+ * @bug 6650759 -+ * @summary Inference of formal type parameter (unused in formal parameters) is not performed -+ * @compile T6650759c.java -+ */ -+ -+import java.util.Collection; -+import java.util.Collections; -+ -+public class T6650759c { -+ -+ static interface A {} -+ -+ static interface B<X extends A> {} -+ -+ static interface C<X extends A, Y extends B<X>> {} -+ -+ public static <T extends A, U extends B<T>> Collection<C<T,U>> get(U u) { -+ return null; -+ } -+ -+ public <T extends A, U extends B<T>> Collection<C<T,U>> test(U u) { -+ return Collections.unmodifiableCollection(get(u)); -+ } -+} -diff -Nru openjdk.orig/langtools/test/tools/javac/generics/inference/6650759/T6650759d.java openjdk/langtools/test/tools/javac/generics/inference/6650759/T6650759d.java ---- openjdk.orig/langtools/test/tools/javac/generics/inference/6650759/T6650759d.java 1970-01-01 01:00:00.000000000 +0100 -+++ openjdk/langtools/test/tools/javac/generics/inference/6650759/T6650759d.java 2010-09-09 20:24:56.248744934 +0100 -@@ -0,0 +1,51 @@ -+/* -+ * Copyright 2009 Sun Microsystems, 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. -+ * -+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, -+ * CA 95054 USA or visit www.sun.com if you need additional information or -+ * have any questions. -+ */ -+ -+/* -+ * @test -+ * @bug 6650759 -+ * @summary Inference of formal type parameter (unused in formal parameters) is not performed -+ * @compile T6650759d.java -+ */ -+ -+public class T6650759d { -+ -+ static abstract class A<X> { -+ -+ static <T> A<T> m(Iterable<? extends T> elements) { -+ return null; -+ } -+ } -+ -+ static abstract class B {} -+ -+ static abstract class C<X extends B> {} -+ -+ <U extends C<V>, V extends B> Iterable<V> get(U u) { -+ return null; -+ } -+ -+ <U extends C<V>, V extends B> void m(U u) { -+ A<V> a = A.m(get(u)); -+ } -+} -diff -Nru openjdk.orig/langtools/test/tools/javac/generics/inference/6650759/T6650759e.java openjdk/langtools/test/tools/javac/generics/inference/6650759/T6650759e.java ---- openjdk.orig/langtools/test/tools/javac/generics/inference/6650759/T6650759e.java 1970-01-01 01:00:00.000000000 +0100 -+++ openjdk/langtools/test/tools/javac/generics/inference/6650759/T6650759e.java 2010-09-09 20:24:56.248744934 +0100 -@@ -0,0 +1,52 @@ -+/* -+ * Copyright 2009 Sun Microsystems, 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. -+ * -+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, -+ * CA 95054 USA or visit www.sun.com if you need additional information or -+ * have any questions. -+ */ -+ -+/* -+ * @test -+ * @bug 6650759 -+ * @summary Inference of formal type parameter (unused in formal parameters) is not performed -+ * @compile T6650759e.java -+ */ -+ -+import java.util.List; -+ -+public class T6650759e { -+ -+ static abstract class A<X extends B> {} -+ -+ interface B<X extends A> extends D {} -+ -+ static abstract class C<X extends D> {} -+ -+ interface D {} -+ -+ static abstract class E<X extends C<? extends B<?>>> {} -+ -+ <U extends C<V>, V extends B<W>, W extends A<V>> W m1(E<U> e) { -+ return m2(e); -+ } -+ -+ <U extends C<V>, V extends B<W>, W extends A<V>> W m2(E<U> e) { -+ return null; -+ } -+} -diff -Nru openjdk.orig/langtools/test/tools/javac/generics/inference/6650759/T6650759f.java openjdk/langtools/test/tools/javac/generics/inference/6650759/T6650759f.java ---- openjdk.orig/langtools/test/tools/javac/generics/inference/6650759/T6650759f.java 1970-01-01 01:00:00.000000000 +0100 -+++ openjdk/langtools/test/tools/javac/generics/inference/6650759/T6650759f.java 2010-09-09 20:24:56.248744934 +0100 -@@ -0,0 +1,50 @@ -+/* -+ * Copyright 2009 Sun Microsystems, 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. -+ * -+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, -+ * CA 95054 USA or visit www.sun.com if you need additional information or -+ * have any questions. -+ */ -+ -+/* -+ * @test -+ * @bug 6650759 -+ * @summary Inference of formal type parameter (unused in formal parameters) is not performed -+ * @compile T6650759f.java -+ */ -+ -+import java.util.Collections; -+ -+public class T6650759f { -+ -+ interface A<X extends A> {} -+ -+ static abstract class B<X extends B> implements A<X> {} -+ -+ static abstract class C<X extends D> extends B<X> {} -+ -+ static class D extends C<D> {} -+ -+ <X extends B, Y extends B<X>> Iterable<X> m(Y node) { -+ return null; -+ } -+ -+ public void test(D d) { -+ Iterable<D> ops = (true) ? Collections.singletonList(d) : m(d); -+ } -+} -diff -Nru openjdk.orig/langtools/test/tools/javac/generics/inference/6650759/T6650759g.java openjdk/langtools/test/tools/javac/generics/inference/6650759/T6650759g.java ---- openjdk.orig/langtools/test/tools/javac/generics/inference/6650759/T6650759g.java 1970-01-01 01:00:00.000000000 +0100 -+++ openjdk/langtools/test/tools/javac/generics/inference/6650759/T6650759g.java 2010-09-09 20:24:56.248744934 +0100 -@@ -0,0 +1,59 @@ -+/* -+ * Copyright 2009 Sun Microsystems, 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. -+ * -+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, -+ * CA 95054 USA or visit www.sun.com if you need additional information or -+ * have any questions. -+ */ -+ -+/* -+ * @test -+ * @bug 6650759 -+ * @summary Inference of formal type parameter (unused in formal parameters) is not performed -+ * @compile T6650759g.java -+ */ -+ -+public class T6650759g { -+ -+ static abstract class A<X extends A<X>> {} -+ -+ static abstract class B<X extends A<X>> {} -+ -+ interface C<X, Y> {} -+ -+ static abstract class D<X extends A<X>, Y extends B<X>> implements C<X, Y> {} -+ -+ static class E extends A<E> {} -+ -+ static class F extends B<E> {} -+ -+ static void test(Iterable<E> data) { -+ m3(m2(data, m1(F.class))); -+ } -+ -+ static <X extends A<X>, Y extends B<X>> D<X, Y> m1(Class<Y> c) { -+ return null; -+ } -+ -+ static <U, V> Iterable<V> m2(Iterable<U> x1, C<? super U, ? extends V> x2) { -+ return null; -+ } -+ -+ static void m3(Iterable<F> data) { -+ } -+} -diff -Nru openjdk.orig/langtools/test/tools/javac/generics/inference/6650759/T6650759h.java openjdk/langtools/test/tools/javac/generics/inference/6650759/T6650759h.java ---- openjdk.orig/langtools/test/tools/javac/generics/inference/6650759/T6650759h.java 1970-01-01 01:00:00.000000000 +0100 -+++ openjdk/langtools/test/tools/javac/generics/inference/6650759/T6650759h.java 2010-09-09 20:24:56.248744934 +0100 -@@ -0,0 +1,39 @@ -+/* -+ * Copyright 2009 Sun Microsystems, 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. -+ * -+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, -+ * CA 95054 USA or visit www.sun.com if you need additional information or -+ * have any questions. -+ */ -+ -+/* -+ * @test -+ * @bug 6650759 -+ * @summary Inference of formal type parameter (unused in formal parameters) is not performed -+ * @compile T6650759h.java -+ */ -+class T6650759h<X, Y> { -+ -+ <A> Object m(A a, T6650759h<?, ? super A> t) { -+ return null; -+ } -+ -+ void test(T6650759h<?, Void> t) { -+ m(null, t); -+ } -+} -diff -Nru openjdk.orig/langtools/test/tools/javac/generics/inference/6650759/T6650759i.java openjdk/langtools/test/tools/javac/generics/inference/6650759/T6650759i.java ---- openjdk.orig/langtools/test/tools/javac/generics/inference/6650759/T6650759i.java 1970-01-01 01:00:00.000000000 +0100 -+++ openjdk/langtools/test/tools/javac/generics/inference/6650759/T6650759i.java 2010-09-09 20:24:56.248744934 +0100 -@@ -0,0 +1,54 @@ -+/* -+ * Copyright 2009 Sun Microsystems, 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. -+ * -+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, -+ * CA 95054 USA or visit www.sun.com if you need additional information or -+ * have any questions. -+ */ -+ -+/* -+ * @test -+ * @bug 6650759 -+ * @summary Inference of formal type parameter (unused in formal parameters) is not performed -+ * @compile T6650759i.java -+ */ -+public class T6650759i { -+ -+ static class A<X extends A, Y extends B> {} -+ -+ static class B<X extends B> {} -+ -+ static class C<X extends A<X, Y>, Y extends B<Y>> {} -+ -+ static <U extends A<U, V>, V extends B<V>> Class<U> m1(U x) { -+ return null; -+ } -+ -+ static <U extends A<U, V>, V extends B<V>> U m2(Class<U> c) { -+ return null; -+ } -+ -+ static <W, U extends A<U, V>, V extends B<V>> W m3(Class<W> c1, C<U, V> c2) { -+ return null; -+ } -+ -+ static <U extends A<U, V>, V extends B<V>> void test(U u, C<U, V> c) { -+ m2(m1(u)); -+ U res = m3(m1(u), c); -+ } -+} -diff -Nru openjdk.orig/langtools/test/tools/javac/generics/inference/6650759/T6650759j.java openjdk/langtools/test/tools/javac/generics/inference/6650759/T6650759j.java ---- openjdk.orig/langtools/test/tools/javac/generics/inference/6650759/T6650759j.java 1970-01-01 01:00:00.000000000 +0100 -+++ openjdk/langtools/test/tools/javac/generics/inference/6650759/T6650759j.java 2010-09-09 20:24:56.248744934 +0100 -@@ -0,0 +1,54 @@ -+/* -+ * Copyright 2009 Sun Microsystems, 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. -+ * -+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, -+ * CA 95054 USA or visit www.sun.com if you need additional information or -+ * have any questions. -+ */ -+ -+/* -+ * @test -+ * @bug 6650759 -+ * @summary Inference of formal type parameter (unused in formal parameters) is not performed -+ * @compile T6650759j.java -+ */ -+ -+public class T6650759j { -+ -+ static abstract class A<X extends A<X>> {} -+ -+ static abstract class B<X extends B<X, Y>, Y> extends A<X> {} -+ -+ static abstract class C<X extends C<X, Y>, Y> extends B<X, Y> {} -+ -+ interface D {} -+ -+ static class E extends C<E, D> {} -+ -+ static abstract class F<X extends F<X, Y>, Y extends A<Y>> extends A<X> {} -+ -+ static class G extends F<G, E> {} -+ -+ static <X extends F<X, Y>, Y extends A<Y>> X m(Iterable<X> it) { -+ return null; -+ } -+ -+ static G test(Iterable<G> c) { -+ return m(c); -+ } -+} -diff -Nru openjdk.orig/langtools/test/tools/javac/generics/inference/6650759/T6650759k.java openjdk/langtools/test/tools/javac/generics/inference/6650759/T6650759k.java ---- openjdk.orig/langtools/test/tools/javac/generics/inference/6650759/T6650759k.java 1970-01-01 01:00:00.000000000 +0100 -+++ openjdk/langtools/test/tools/javac/generics/inference/6650759/T6650759k.java 2010-09-09 20:24:56.248744935 +0100 -@@ -0,0 +1,44 @@ -+/* -+ * Copyright 2009 Sun Microsystems, 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. -+ * -+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, -+ * CA 95054 USA or visit www.sun.com if you need additional information or -+ * have any questions. -+ */ -+ -+/* -+ * @test -+ * @bug 6650759 -+ * @summary Inference of formal type parameter (unused in formal parameters) is not performed -+ * @compile T6650759k.java -+ */ -+ -+public class T6650759k { -+ -+ static class A<X extends A> {} -+ -+ static class B<X extends B, Y extends A> {} -+ -+ <U extends A<U>, V extends B<V, U>> Object m(Class<V> c) { -+ return null; -+ } -+ -+ <U extends A<U>, V extends B<V, U>> void test(Class<V> c) { -+ m(c); -+ } -+} -diff -Nru openjdk.orig/langtools/test/tools/javac/generics/inference/6650759/T6650759l.java openjdk/langtools/test/tools/javac/generics/inference/6650759/T6650759l.java ---- openjdk.orig/langtools/test/tools/javac/generics/inference/6650759/T6650759l.java 1970-01-01 01:00:00.000000000 +0100 -+++ openjdk/langtools/test/tools/javac/generics/inference/6650759/T6650759l.java 2010-09-09 20:24:56.248744935 +0100 -@@ -0,0 +1,46 @@ -+/* -+ * Copyright 2009 Sun Microsystems, 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. -+ * -+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, -+ * CA 95054 USA or visit www.sun.com if you need additional information or -+ * have any questions. -+ */ -+ -+/* -+ * @test -+ * @bug 6650759 -+ * @summary Inference of formal type parameter (unused in formal parameters) is not performed -+ * @compile T6650759l.java -+ */ -+ -+public class T6650759l { -+ -+ public static interface A<X> {} -+ -+ public static class B implements A<Integer> {} -+ -+ public static <X extends A<Y>, Y> Y m1(X x) { -+ return null; -+ } -+ -+ public static void m2(Integer i) {} -+ -+ public static void test(B b) { -+ m2(m1(b)); -+ } -+} -diff -Nru openjdk.orig/langtools/test/tools/javac/generics/inference/6650759/T6650759m.java openjdk/langtools/test/tools/javac/generics/inference/6650759/T6650759m.java ---- openjdk.orig/langtools/test/tools/javac/generics/inference/6650759/T6650759m.java 1970-01-01 01:00:00.000000000 +0100 -+++ openjdk/langtools/test/tools/javac/generics/inference/6650759/T6650759m.java 2010-09-09 20:24:56.248744935 +0100 -@@ -0,0 +1,47 @@ -+/* -+ * Copyright 2009 Sun Microsystems, 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. -+ * -+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, -+ * CA 95054 USA or visit www.sun.com if you need additional information or -+ * have any questions. -+ */ -+ -+/* -+ * @test -+ * @bug 6650759 -+ * @summary Inference of formal type parameter (unused in formal parameters) is not performed -+ * @compile/fail/ref=T6650759m.out T6650759m.java -XDrawDiagnostics -+ */ -+ -+import java.util.*; -+ -+class T6650759m { -+ <Z> List<? super Z> m(List<? extends List<? super Z>> ls) { -+ return ls.get(0); -+ } -+ -+ void test() { -+ ArrayList<ArrayList<Integer>> lli = new ArrayList<ArrayList<Integer>>(); -+ ArrayList<Integer> li = new ArrayList<Integer>(); -+ li.add(2); -+ lli.add(li); -+ List<? super String> ls = m(lli); //here -+ ls.add("crash"); -+ Integer i = li.get(1); -+ } -+} -diff -Nru openjdk.orig/langtools/test/tools/javac/generics/inference/6650759/T6650759m.out openjdk/langtools/test/tools/javac/generics/inference/6650759/T6650759m.out ---- openjdk.orig/langtools/test/tools/javac/generics/inference/6650759/T6650759m.out 1970-01-01 01:00:00.000000000 +0100 -+++ openjdk/langtools/test/tools/javac/generics/inference/6650759/T6650759m.out 2010-09-09 20:24:56.248744935 +0100 -@@ -0,0 +1,2 @@ -+T6650759m.java:43:36: compiler.err.prob.found.req: (compiler.misc.incompatible.types), java.util.List<? super java.lang.Integer>, java.util.List<? super java.lang.String> -+1 error
--- a/patches/openjdk/6729772-opt_cleanup.patch Tue Jul 29 01:20:12 2014 +0100 +++ b/patches/openjdk/6729772-opt_cleanup.patch Wed Jul 30 14:41:18 2014 +0100 @@ -1,15 +1,21 @@ -# HG changeset patch -# User ohair -# Date 1217472057 25200 -# Wed Jul 30 19:40:57 2008 -0700 -# Node ID b374f6174534071d4305a91fbc2b913e7bc64396 -# Parent b7474b739d13bacd9972f88ac91f6350b7b0be12 -6729772: 64-bit build with SS12 compiler: SIGSEGV (0xb) at pc=0x0000000000000048, pid=14826, tid=2 -Reviewed-by: tbell - -diff --git a/make/common/Defs-linux.gmk b/make/common/Defs-linux.gmk ---- openjdk/jdk/make/common/Defs-linux.gmk -+++ openjdk/jdk/make/common/Defs-linux.gmk +diff -Nru openjdk.orig/jdk/make/common/Defs.gmk openjdk/jdk/make/common/Defs.gmk +--- openjdk.orig/jdk/make/common/Defs.gmk 2014-07-30 05:48:00.352403475 +0100 ++++ openjdk/jdk/make/common/Defs.gmk 2014-07-30 13:35:00.245289302 +0100 +@@ -416,11 +416,6 @@ + include $(JDK_MAKE_SHARED_DIR)/Defs-java.gmk + + # +-# Set opt level to ALT_OPT if set otherwise _OPT +-# +-POPT = $(_OPT$(ALT_OPT))$(ALT_OPT) +- +-# + # Convenient macros + # + +diff -Nru openjdk.orig/jdk/make/common/Defs-linux.gmk openjdk/jdk/make/common/Defs-linux.gmk +--- openjdk.orig/jdk/make/common/Defs-linux.gmk 2014-07-30 05:48:00.800409767 +0100 ++++ openjdk/jdk/make/common/Defs-linux.gmk 2014-07-30 13:36:01.586167402 +0100 @@ -86,18 +86,22 @@ # # Default optimization @@ -42,9 +48,9 @@ # For all platforms, do not omit the frame pointer register usage. # We need this frame pointer to make it easy to walk the stacks. # This should be the default on X86, but ia64 and amd64 may not have this -@@ -112,18 +116,6 @@ - CFLAGS_REQUIRED = $(CFLAGS_REQUIRED_$(ARCH)) - LDFLAGS_COMMON += $(LDFLAGS_COMMON_$(ARCH)) +@@ -131,18 +135,6 @@ + LDFLAGS_COMMON += $(LDFLAGS_COMMON_$(ARCH)) + endif -# Add in platform specific optimizations for all opt levels -CC_HIGHEST_OPT += $(_OPT_$(ARCH)) @@ -61,8 +67,8 @@ # # Selection of warning messages # -@@ -163,19 +155,19 @@ - endif +@@ -188,19 +180,19 @@ + CFLAGS_REQUIRED += $(DEBUG_FLAG) endif -CFLAGS_OPT = $(POPT) @@ -84,8 +90,8 @@ + CXXFLAGS_DBG += $(CC_OPT/LOWER) endif - CPPFLAGS_COMMON = -D$(ARCH) -DARCH='"$(ARCH)"' -DLINUX $(VERSION_DEFINES) \ -@@ -187,6 +179,9 @@ + CPP_ARCH_FLAGS = -DARCH='"$(ARCH)"' +@@ -221,6 +213,9 @@ CPPFLAGS_OPT = CPPFLAGS_DBG = -DDEBUG @@ -95,9 +101,9 @@ ifdef LIBRARY # Libraries need to locate other libraries at runtime, and you can tell -diff --git a/make/common/Defs-solaris.gmk b/make/common/Defs-solaris.gmk ---- openjdk/jdk/make/common/Defs-solaris.gmk -+++ openjdk/jdk/make/common/Defs-solaris.gmk +diff -Nru openjdk.orig/jdk/make/common/Defs-solaris.gmk openjdk/jdk/make/common/Defs-solaris.gmk +--- openjdk.orig/jdk/make/common/Defs-solaris.gmk 2014-07-30 05:48:01.208415498 +0100 ++++ openjdk/jdk/make/common/Defs-solaris.gmk 2014-07-30 13:35:00.245289302 +0100 @@ -83,15 +83,16 @@ # # Java default optimization (-x04/-O2) etc. Applies to the VM. @@ -357,6 +363,15 @@ # Automatic precompiled header option to use (if COMPILE_APPROACH=batch) # (See Rules.gmk) The SS11 -xpch=auto* options appear to be broken. AUTOMATIC_PCH_OPTION = +-endif +-CC_NO_OPT = +- +-# If NO_OPTIMIZATIONS is defined in the environment, turn all optimzations off +-ifdef NO_OPTIMIZATIONS +- CC_HIGHEST_OPT = $(CC_NO_OPT) +- CC_HIGHER_OPT = $(CC_NO_OPT) +- CC_LOWER_OPT = $(CC_NO_OPT) +-endif + + # Add in keep frame options + CC_OPT/LOWER += $(CC_XKEEPFRAME_OPTIONS) @@ -370,15 +385,8 @@ + CC_OPT/HIGHEST += $(CC_HIGHEST_EXTRAS) + CXX_OPT/HIGHEST += $(CC_HIGHEST_EXTRAS) + - endif --CC_NO_OPT = - --# If NO_OPTIMIZATIONS is defined in the environment, turn all optimzations off --ifdef NO_OPTIMIZATIONS -- CC_HIGHEST_OPT = $(CC_NO_OPT) -- CC_HIGHER_OPT = $(CC_NO_OPT) -- CC_LOWER_OPT = $(CC_NO_OPT) --endif ++endif ++ +# Default optimization settings based on level. +CC_OPT = $(CC_OPT/$(OPTIMIZATION_LEVEL)) +CXX_OPT = $(CXX_OPT/$(OPTIMIZATION_LEVEL)) @@ -447,165 +455,29 @@ # # Path and option to link against the VM, if you have to. Note that # there are libraries that link against only -ljava, but they do get -diff --git a/make/common/Defs-windows.gmk b/make/common/Defs-windows.gmk ---- openjdk/jdk/make/common/Defs-windows.gmk -+++ openjdk/jdk/make/common/Defs-windows.gmk -@@ -84,6 +84,15 @@ - # - # Default optimization - # -+ -+ifndef OPTIMIZATION_LEVEL -+ ifeq ($(PRODUCT), java) -+ OPTIMIZATION_LEVEL = HIGHER -+ else -+ OPTIMIZATION_LEVEL = LOWER -+ endif -+endif -+ - ifeq ($(CC_VERSION),msvc) - # Visual Studio .NET 2003 or VS2003 compiler option definitions: - # -O1 Favors reduced size over speed (-Og -Os -Oy -Ob2 -Gs -GF -Gy) -@@ -113,21 +122,28 @@ - # NOTE: With VC6, -Ox, -O1, and -O2 used -Ob1, not -Ob2. - # NOTE: With VC6, -O1 and -O2 used -Gf, not -GF. - # -+ -+ CC_OPT/NONE = -Od -+ CC_OPT/LOWER = -O2 -+ CC_OPT/HIGHER = -O3 -+ CC_OPT/HIGHEST = -O3 -+ - ifeq ($(COMPILER_VERSION), VC6) - # VC6 (6.2) msvc compiler (the way Tiger and early Mustang were built) - # Automatic precompiled header option to use (if COMPILE_APPROACH=batch) - AUTOMATIC_PCH_OPTION = - GX_OPTION = -GX - ifeq ($(ARCH_DATA_MODEL), 32) -- CC_HIGHEST_OPT = -Ox -Gy -Os -GB -- CC_HIGHER_OPT = -Ox -Gy -Os -GB -- CC_LOWER_OPT = -Ox -Gy -Os -GB -+ CC_OPT/HIGHEST = -Ox -Gy -Os -GB -+ CC_OPT/HIGHER = -Ox -Gy -Os -GB -+ CC_OPT/LOWER = -Ox -Gy -Os -GB - else -- CC_HIGHEST_OPT = -Ox -Gy -Op -- CC_HIGHER_OPT = -Ox -Gy -Op -- CC_LOWER_OPT = -Ox -Gy -Op -+ CC_OPT/HIGHEST = -Ox -Gy -Op -+ CC_OPT/HIGHER = -Ox -Gy -Op -+ CC_OPT/LOWER = -Ox -Gy -Op - endif - endif -+ - ifeq ($(COMPILER_VERSION), VS2003) - # Automatic precompiled header option to use (if COMPILE_APPROACH=batch) - AUTOMATIC_PCH_OPTION = -YX -@@ -135,53 +151,45 @@ - GX_OPTION = -GX - ifeq ($(ARCH_DATA_MODEL), 32) - # Lowered opt level to try and reduce footprint, dll size especially. -- # Was: CC_HIGHEST_OPT = -O2 -G6 -- # Was: CC_HIGHER_OPT = -O2 -- CC_HIGHEST_OPT = -O2 -- CC_HIGHER_OPT = -O1 -- CC_LOWER_OPT = -O1 -+ # Was: CC_OPT/HIGHEST = -O2 -G6 -+ # Was: CC_OPT/HIGHER = -O2 -+ CC_OPT/HIGHEST = -O2 -+ CC_OPT/HIGHER = -O1 -+ CC_OPT/LOWER = -O1 - else -- CC_HIGHEST_OPT = -O2 -Op -- CC_HIGHER_OPT = -O2 -Op -- CC_LOWER_OPT = -O1 -Op -+ CC_OPT/HIGHEST = -O2 -Op -+ CC_OPT/HIGHER = -O2 -Op -+ CC_OPT/LOWER = -O1 -Op - endif +diff -Nru openjdk.orig/jdk/make/common/Defs-windows.gmk openjdk/jdk/make/common/Defs-windows.gmk +--- openjdk.orig/jdk/make/common/Defs-windows.gmk 2014-07-14 04:24:43.000000000 +0100 ++++ openjdk/jdk/make/common/Defs-windows.gmk 2014-07-30 13:41:14.578647575 +0100 +@@ -96,6 +96,7 @@ + OPTIMIZATION_LEVEL = LOWER endif -+ - ifeq ($(COMPILER_VERSION), VS2005) - # Automatic precompiled header option to use (if COMPILE_APPROACH=batch) - AUTOMATIC_PCH_OPTION = - # VS2005 compiler, only with Platform SDK right now? - GX_OPTION = -EHsc - ifeq ($(ARCH_DATA_MODEL), 32) -- CC_HIGHEST_OPT = -O2 -- CC_HIGHER_OPT = -O1 -- CC_LOWER_OPT = -O1 -+ CC_OPT/HIGHEST = -O2 -+ CC_OPT/HIGHER = -O1 -+ CC_OPT/LOWER = -O1 - else -- CC_HIGHEST_OPT = -O2 -- CC_HIGHER_OPT = -O1 -- CC_LOWER_OPT = -O1 -+ CC_OPT/HIGHEST = -O2 -+ CC_OPT/HIGHER = -O1 -+ CC_OPT/LOWER = -O1 - endif + endif ++ + ifndef FASTDEBUG_OPTIMIZATION_LEVEL + FASTDEBUG_OPTIMIZATION_LEVEL = LOWER + endif +@@ -143,6 +144,7 @@ endif -- CC_NO_OPT = -Od -+ - else # CC_VERSION -+ - # GCC not supported, but left for historical reference... -- CC_HIGHEST_OPT = -O3 -- CC_HIGHER_OPT = -O2 -- CC_LOWER_OPT = -O2 -- CC_NO_OPT = -+ CC_OPT/NONE = -+ CC_OPT/LOWER = -O2 -+ CC_OPT/HIGHER = -O2 -+ CC_OPT/HIGHEST = -O3 -+ - endif --# If NO_OPTIMIZATIONS is defined in the environment, turn all optimzations off --ifdef NO_OPTIMIZATIONS -- CC_HIGHEST_OPT = $(CC_NO_OPT) -- CC_HIGHER_OPT = $(CC_NO_OPT) -- CC_LOWER_OPT = $(CC_NO_OPT) --endif -- --ifeq ($(PRODUCT), java) -- _OPT = $(CC_HIGHER_OPT) --else -- _OPT = $(CC_LOWER_OPT) --endif -+CC_OPT = $(CC_OPT/$(OPTIMIZATION_LEVEL)) - - # Select the runtime support library carefully, need to be consistent - # -@@ -233,7 +241,7 @@ - # Use static link for the C++ runtime (so msvcp71.dll not needed) - # - CFLAGS_COMMON += -Zi -nologo -- CFLAGS_OPT = $(POPT) -+ CFLAGS_OPT = $(CC_OPT) - CFLAGS_DBG = -Od $(MS_RUNTIME_DEBUG_OPTION) - - # Starting from VS2005 the wchar_t is handled as a built-in C/C++ data type -diff --git a/make/common/Defs.gmk b/make/common/Defs.gmk ---- openjdk/jdk/make/common/Defs.gmk -+++ openjdk/jdk/make/common/Defs.gmk -@@ -483,11 +483,6 @@ - include $(JDK_MAKE_SHARED_DIR)/Defs-java.gmk - - # --# Set opt level to ALT_OPT if set otherwise _OPT --# --POPT = $(_OPT$(ALT_OPT))$(ALT_OPT) -- --# - # Convenient macros - # - -diff --git a/make/common/Library.gmk b/make/common/Library.gmk ---- openjdk/jdk/make/common/Library.gmk -+++ openjdk/jdk/make/common/Library.gmk -@@ -238,7 +238,7 @@ + else # CC_VERSION ++ + # GCC not supported, but left for historical reference... + CC_OPT/NONE = + CC_OPT/LOWER = -O2 +diff -Nru openjdk.orig/jdk/make/common/Library.gmk openjdk/jdk/make/common/Library.gmk +--- openjdk.orig/jdk/make/common/Library.gmk 2014-07-14 04:24:43.000000000 +0100 ++++ openjdk/jdk/make/common/Library.gmk 2014-07-30 13:35:00.245289302 +0100 +@@ -218,7 +218,7 @@ # $(ACTUAL_LIBRARY):: $(COMPILE_FILES_o) $(FILES_m) $(FILES_reorder) @$(prep-target) @@ -614,10 +486,10 @@ @$(ECHO) "Rebuilding $@ because of $?" ifeq ($(LIBRARY), fdlibm) $(AR) -r $@ $(FILES_o) -diff --git a/make/common/shared/Defs.gmk b/make/common/shared/Defs.gmk ---- openjdk/jdk/make/common/shared/Defs.gmk -+++ openjdk/jdk/make/common/shared/Defs.gmk -@@ -277,9 +277,6 @@ +diff -Nru openjdk.orig/jdk/make/common/shared/Defs.gmk openjdk/jdk/make/common/shared/Defs.gmk +--- openjdk.orig/jdk/make/common/shared/Defs.gmk 2014-07-30 05:47:57.056357179 +0100 ++++ openjdk/jdk/make/common/shared/Defs.gmk 2014-07-30 13:35:00.245289302 +0100 +@@ -282,9 +282,6 @@ PROMOTED_BUILD_BASEDIR = $(PROMOTED_RE_AREA)/$(PROMOTED_BUILD_LATEST) PROMOTED_BUILD_BINARIES = $(PROMOTED_BUILD_BASEDIR)/binaries @@ -627,9 +499,9 @@ # PARALLEL_COMPILE_JOBS: is the number of compiles done in parallel. # If the user sets ALT_PARALLEL_COMPILE_JOBS, then COMPILE_APPROACH is set # to parallel. -diff --git a/make/java/fdlibm/Makefile b/make/java/fdlibm/Makefile ---- openjdk/jdk/make/java/fdlibm/Makefile -+++ openjdk/jdk/make/java/fdlibm/Makefile +diff -Nru openjdk.orig/jdk/make/java/fdlibm/Makefile openjdk/jdk/make/java/fdlibm/Makefile +--- openjdk.orig/jdk/make/java/fdlibm/Makefile 2014-07-14 04:24:43.000000000 +0100 ++++ openjdk/jdk/make/java/fdlibm/Makefile 2014-07-30 13:35:00.245289302 +0100 @@ -33,6 +33,7 @@ BUILDDIR = ../.. LIBRARY = fdlibm @@ -683,18 +555,18 @@ # Find fdlibm source files. # vpath %.c -diff --git a/make/java/java_hprof_demo/Makefile b/make/java/java_hprof_demo/Makefile ---- openjdk/jdk/make/java/java_hprof_demo/Makefile -+++ openjdk/jdk/make/java/java_hprof_demo/Makefile +diff -Nru openjdk.orig/jdk/make/java/java_hprof_demo/Makefile openjdk/jdk/make/java/java_hprof_demo/Makefile +--- openjdk.orig/jdk/make/java/java_hprof_demo/Makefile 2014-07-14 04:24:43.000000000 +0100 ++++ openjdk/jdk/make/java/java_hprof_demo/Makefile 2014-07-30 13:35:00.245289302 +0100 @@ -28,14 +28,14 @@ PRODUCT = sun LIBRARY_OUTPUT = hprof_jvmti +-# Configure the CFLAGS for this library. +# Use highest optimization +OPTIMIZATION_LEVEL = HIGHEST -+ - # Configure the CFLAGS for this library. -- + ++# Configure the CFLAGS for this library. FILES_m = mapfile-vers include $(BUILDDIR)/common/Defs.gmk @@ -704,10 +576,10 @@ SRCDIR=$(SHARE_SRC)/demo/jvmti/hprof PSRCDIR=$(PLATFORM_SRC)/demo/jvmti/hprof -diff --git a/make/sun/awt/Makefile b/make/sun/awt/Makefile ---- openjdk/jdk/make/sun/awt/Makefile -+++ openjdk/jdk/make/sun/awt/Makefile -@@ -28,18 +28,14 @@ +diff -Nru openjdk.orig/jdk/make/sun/awt/Makefile openjdk/jdk/make/sun/awt/Makefile +--- openjdk.orig/jdk/make/sun/awt/Makefile 2014-07-30 05:47:57.596364764 +0100 ++++ openjdk/jdk/make/sun/awt/Makefile 2014-07-30 13:35:00.245289302 +0100 +@@ -34,17 +34,13 @@ LIBRARY = awt PRODUCT = sun @@ -716,22 +588,21 @@ -# VIS_NEEDED=true -+# Use highest optimization level +-include $(BUILDDIR)/common/Defs.gmk +- +-# + # Use highest optimization level +-# +-_OPT = $(CC_HIGHEST_OPT) +OPTMIZATION_LEVEL = HIGHEST + - include $(BUILDDIR)/common/Defs.gmk ++include $(BUILDDIR)/common/Defs.gmk --# --# Use highest optimization level --# --_OPT = $(CC_HIGHEST_OPT) -- OTHER_CFLAGS += -D__MEDIALIB_OLD_NAMES -D__USE_J2D_NAMES - # -diff --git a/make/sun/font/Makefile b/make/sun/font/Makefile ---- openjdk/jdk/make/sun/font/Makefile -+++ openjdk/jdk/make/sun/font/Makefile +diff -Nru openjdk.orig/jdk/make/sun/font/Makefile openjdk/jdk/make/sun/font/Makefile +--- openjdk.orig/jdk/make/sun/font/Makefile 2014-07-30 05:47:59.920397407 +0100 ++++ openjdk/jdk/make/sun/font/Makefile 2014-07-30 13:35:00.245289302 +0100 @@ -35,6 +35,9 @@ # Indicate we want the C++ compiler to do the linking. CPLUSPLUSLIBRARY=true @@ -754,53 +625,48 @@ include FILES_c.gmk AUTO_FILES_JAVA_DIRS = sun/font -diff --git a/make/sun/font/t2k/Makefile b/make/sun/font/t2k/Makefile ---- openjdk/jdk/make/sun/font/t2k/Makefile -+++ openjdk/jdk/make/sun/font/t2k/Makefile -@@ -41,14 +41,12 @@ +diff -Nru openjdk.orig/jdk/make/sun/font/t2k/Makefile openjdk/jdk/make/sun/font/t2k/Makefile +--- openjdk.orig/jdk/make/sun/font/t2k/Makefile 2014-07-14 04:24:43.000000000 +0100 ++++ openjdk/jdk/make/sun/font/t2k/Makefile 2014-07-30 13:35:00.245289302 +0100 +@@ -39,12 +39,10 @@ # for a few ones with native methods) so shouldn't clobber them. DONT_CLOBBER_CLASSES=true -+# Use higher optimization level -+OPTIMIZATION_LEVEL = HIGHER -+ - include $(BUILDDIR)/common/Defs.gmk - - # --# Use higher optimization level +-include $(BUILDDIR)/common/Defs.gmk +- +-# + # Use higher optimization level -# -_OPT = $(CC_HIGHER_OPT) -- --# - # Files ++OPTIMIZATION_LEVEL = HIGHER ++ ++include $(BUILDDIR)/common/Defs.gmk + # - include FILES_c.gmk -diff --git a/make/sun/image/generic/Makefile b/make/sun/image/generic/Makefile ---- openjdk/jdk/make/sun/image/generic/Makefile -+++ openjdk/jdk/make/sun/image/generic/Makefile -@@ -31,14 +31,13 @@ + # Files +diff -Nru openjdk.orig/jdk/make/sun/image/generic/Makefile openjdk/jdk/make/sun/image/generic/Makefile +--- openjdk.orig/jdk/make/sun/image/generic/Makefile 2014-07-14 04:24:43.000000000 +0100 ++++ openjdk/jdk/make/sun/image/generic/Makefile 2014-07-30 13:35:00.245289302 +0100 +@@ -31,12 +31,11 @@ PACKAGE = sun.awt.medialib LIBRARY = mlib_image PRODUCT = sun -+ -+# Use highest level of optimization on this library -+OPTIMIZATION_LEVEL = HIGHEST -+ - include $(BUILDDIR)/common/Defs.gmk +-include $(BUILDDIR)/common/Defs.gmk - # --# Use highest level of optimization on this library +-# + # Use highest level of optimization on this library -# -_OPT = $(CC_HIGHEST_OPT) -- --# - # Use mapfile ++OPTIMIZATION_LEVEL = HIGHEST ++ ++include $(BUILDDIR)/common/Defs.gmk + # - FILES_m = mapfile-vers -diff --git a/make/sun/image/vis/Makefile b/make/sun/image/vis/Makefile ---- openjdk/jdk/make/sun/image/vis/Makefile -+++ openjdk/jdk/make/sun/image/vis/Makefile -@@ -31,19 +31,15 @@ + # Use mapfile +diff -Nru openjdk.orig/jdk/make/sun/image/vis/Makefile openjdk/jdk/make/sun/image/vis/Makefile +--- openjdk.orig/jdk/make/sun/image/vis/Makefile 2014-07-14 04:24:43.000000000 +0100 ++++ openjdk/jdk/make/sun/image/vis/Makefile 2014-07-30 13:35:00.245289302 +0100 +@@ -31,17 +31,13 @@ LIBRARY = mlib_image_v PRODUCT = sun @@ -809,39 +675,34 @@ -# VIS_NEEDED=true -+# Select highest level of optimization for this library -+OPTIMIZATION_LEVEL = HIGHEST -+ - include $(BUILDDIR)/common/Defs.gmk - - # --# Select highest level of optimization for this library +-include $(BUILDDIR)/common/Defs.gmk +- +-# + # Select highest level of optimization for this library -# -_OPT = $(CC_HIGHEST_OPT) -- --# - # Use generic mapfile ++OPTIMIZATION_LEVEL = HIGHEST ++ ++include $(BUILDDIR)/common/Defs.gmk + # - FILES_m = ../generic/mapfile-vers -diff --git a/make/sun/jpeg/Makefile b/make/sun/jpeg/Makefile ---- openjdk/jdk/make/sun/jpeg/Makefile -+++ openjdk/jdk/make/sun/jpeg/Makefile -@@ -27,14 +27,13 @@ + # Use generic mapfile +diff -Nru openjdk.orig/jdk/make/sun/jpeg/Makefile openjdk/jdk/make/sun/jpeg/Makefile +--- openjdk.orig/jdk/make/sun/jpeg/Makefile 2014-07-30 05:47:56.980356112 +0100 ++++ openjdk/jdk/make/sun/jpeg/Makefile 2014-07-30 13:35:00.245289302 +0100 +@@ -27,12 +27,11 @@ PACKAGE = sun.awt LIBRARY = jpeg PRODUCT = sun -+ -+# Use highest optimization level +-include $(BUILDDIR)/common/Defs.gmk + +-# + # Use highest optimization level +-# +-_OPT = $(CC_HIGHEST_OPT) +OPTIMIZATION_LEVEL = HIGHEST + - include $(BUILDDIR)/common/Defs.gmk ++include $(BUILDDIR)/common/Defs.gmk # --# Use highest optimization level --# --_OPT = $(CC_HIGHEST_OPT) -- --# # Files - # - include FILES_c.gmk
--- a/patches/openjdk/6799141-split_out_versions.patch Tue Jul 29 01:20:12 2014 +0100 +++ b/patches/openjdk/6799141-split_out_versions.patch Wed Jul 30 14:41:18 2014 +0100 @@ -1,6 +1,6 @@ diff -Nru openjdk.orig/jdk/make/common/Defs-linux.gmk openjdk/jdk/make/common/Defs-linux.gmk ---- openjdk.orig/jdk/make/common/Defs-linux.gmk 2013-09-02 16:47:38.412555143 +0100 -+++ openjdk/jdk/make/common/Defs-linux.gmk 2013-09-02 16:58:52.819048695 +0100 +--- openjdk.orig/jdk/make/common/Defs-linux.gmk 2014-07-30 13:42:56.308105637 +0100 ++++ openjdk/jdk/make/common/Defs-linux.gmk 2014-07-30 13:47:55.596394090 +0100 @@ -135,6 +135,14 @@ LDFLAGS_COMMON += $(LDFLAGS_COMMON_$(ARCH)) endif @@ -17,8 +17,8 @@ # Selection of warning messages # diff -Nru openjdk.orig/jdk/make/common/shared/Compiler-gcc.gmk openjdk/jdk/make/common/shared/Compiler-gcc.gmk ---- openjdk.orig/jdk/make/common/shared/Compiler-gcc.gmk 2013-09-02 16:47:38.068549790 +0100 -+++ openjdk/jdk/make/common/shared/Compiler-gcc.gmk 2013-09-02 16:58:52.819048695 +0100 +--- openjdk.orig/jdk/make/common/shared/Compiler-gcc.gmk 2014-07-30 13:42:56.132103116 +0100 ++++ openjdk/jdk/make/common/shared/Compiler-gcc.gmk 2014-07-30 13:47:55.600394147 +0100 @@ -143,18 +143,10 @@ CC = $(COMPILER_PATH)gcc CPP = $(COMPILER_PATH)gcc -E @@ -40,44 +40,20 @@ # Get gcc version diff -Nru openjdk.orig/jdk/make/common/shared/Compiler-msvc.gmk openjdk/jdk/make/common/shared/Compiler-msvc.gmk ---- openjdk.orig/jdk/make/common/shared/Compiler-msvc.gmk 2012-10-26 19:25:40.000000000 +0100 -+++ openjdk/jdk/make/common/shared/Compiler-msvc.gmk 2013-09-02 16:58:52.819048695 +0100 -@@ -41,8 +41,6 @@ +--- openjdk.orig/jdk/make/common/shared/Compiler-msvc.gmk 2014-07-14 04:24:43.000000000 +0100 ++++ openjdk/jdk/make/common/shared/Compiler-msvc.gmk 2014-07-30 13:49:10.217463061 +0100 +@@ -47,8 +47,6 @@ # Fill in unknown values COMPILER_NAME=Unknown MSVC Compiler COMPILER_VERSION= -- REQUIRED_CC_VER= -- REQUIRED_LINK_VER= +- REQUIRED_CC_VER=16.10.40219.01 +- REQUIRED_LINK_VER=10.00.40219.01 # unset any GNU Make settings of MFLAGS and MAKEFLAGS which may mess up nmake NMAKE = MFLAGS= MAKEFLAGS= $(COMPILER_PATH)nmake -nologo -@@ -54,8 +52,6 @@ - CC_TYPE := $(shell $(CC) 2>&1 | $(HEAD) -n 1 | $(NAWK) '{print $$5}') - CC_MAJORVER :=$(call MajorVersion,$(CC_VER)) - REQUIRED_CCTYPE = Optimizing -- REQUIRED_CC_VER = 13.10.3077 -- REQUIRED_LINK_VER = 7.10.3077 - ifeq ($(CC_MAJORVER), 12) - # This should be: CC_VER=12.00.8168 LINK_VER=6.00.8447 - COMPILER_NAME=Visual C++ 6.0 Professional + VC6-SP 3 -@@ -91,14 +87,6 @@ - CC_MAJORVER :=$(call MajorVersion,$(CC_VER)) - CC_MINORVER :=$(call MinorVersion,$(CC_VER)) - CC_MICROVER :=$(call MicroVersion,$(CC_VER)) -- ifeq ($(ARCH), ia64) -- REQUIRED_CC_VER = 13.00.9337.7 -- REQUIRED_LINK_VER = 7.00.9337.7 -- endif -- ifeq ($(ARCH), amd64) -- REQUIRED_CC_VER = 14.00.40310.41 -- REQUIRED_LINK_VER = 8.00.40310.39 -- endif - ifeq ($(CC_MAJORVER), 13) - ifeq ($(ARCH), ia64) - # This should be: CC_VER=13.00.9337.7 LINK_VER=7.00.9337.7 diff -Nru openjdk.orig/jdk/make/common/shared/Compiler-sun.gmk openjdk/jdk/make/common/shared/Compiler-sun.gmk ---- openjdk.orig/jdk/make/common/shared/Compiler-sun.gmk 2013-09-02 16:47:38.400554956 +0100 -+++ openjdk/jdk/make/common/shared/Compiler-sun.gmk 2013-09-02 16:58:52.819048695 +0100 +--- openjdk.orig/jdk/make/common/shared/Compiler-sun.gmk 2014-07-30 13:42:56.296105466 +0100 ++++ openjdk/jdk/make/common/shared/Compiler-sun.gmk 2014-07-30 13:47:55.600394147 +0100 @@ -33,29 +33,20 @@ ifeq ($(PLATFORM), solaris) # FIXUP: Change to SS12 when validated @@ -111,8 +87,8 @@ CPP = $(COMPILER_PATH)cc -E CXX = $(COMPILER_PATH)CC diff -Nru openjdk.orig/jdk/make/common/shared/Defs.gmk openjdk/jdk/make/common/shared/Defs.gmk ---- openjdk.orig/jdk/make/common/shared/Defs.gmk 2013-09-02 16:47:38.412555143 +0100 -+++ openjdk/jdk/make/common/shared/Defs.gmk 2013-09-02 16:58:52.819048695 +0100 +--- openjdk.orig/jdk/make/common/shared/Defs.gmk 2014-07-30 13:42:56.312105695 +0100 ++++ openjdk/jdk/make/common/shared/Defs.gmk 2014-07-30 13:47:55.600394147 +0100 @@ -113,9 +113,9 @@ fi) endef @@ -176,7 +152,7 @@ + diff -Nru openjdk.orig/jdk/make/common/shared/Defs-versions.gmk openjdk/jdk/make/common/shared/Defs-versions.gmk --- openjdk.orig/jdk/make/common/shared/Defs-versions.gmk 1970-01-01 01:00:00.000000000 +0100 -+++ openjdk/jdk/make/common/shared/Defs-versions.gmk 2013-09-02 16:58:52.819048695 +0100 ++++ openjdk/jdk/make/common/shared/Defs-versions.gmk 2014-07-30 13:47:55.600394147 +0100 @@ -0,0 +1,183 @@ +# +# Copyright 2009 Sun Microsystems, Inc. All Rights Reserved. @@ -362,9 +338,9 @@ +REQUIRED_ZIP_VER = 2.2 + diff -Nru openjdk.orig/jdk/make/common/shared/Defs-windows.gmk openjdk/jdk/make/common/shared/Defs-windows.gmk ---- openjdk.orig/jdk/make/common/shared/Defs-windows.gmk 2012-10-26 19:25:40.000000000 +0100 -+++ openjdk/jdk/make/common/shared/Defs-windows.gmk 2013-09-02 16:58:52.819048695 +0100 -@@ -136,10 +136,7 @@ +--- openjdk.orig/jdk/make/common/shared/Defs-windows.gmk 2014-07-14 04:24:43.000000000 +0100 ++++ openjdk/jdk/make/common/shared/Defs-windows.gmk 2014-07-30 13:47:55.600394147 +0100 +@@ -147,10 +147,7 @@ UNIXCOMMAND_PATH:=$(call AltCheckSpaces,UNIXCOMMAND_PATH) # Get version of MKS or CYGWIN @@ -377,8 +353,8 @@ MKS_VER :=$(call GetVersion,$(_MKS_VER)) # At this point, we can re-define FullPath to use DOSNAME_CMD diff -Nru openjdk.orig/jdk/make/common/shared/Platform.gmk openjdk/jdk/make/common/shared/Platform.gmk ---- openjdk.orig/jdk/make/common/shared/Platform.gmk 2013-09-02 16:47:38.068549790 +0100 -+++ openjdk/jdk/make/common/shared/Platform.gmk 2013-09-02 16:58:52.819048695 +0100 +--- openjdk.orig/jdk/make/common/shared/Platform.gmk 2014-07-30 13:42:56.132103116 +0100 ++++ openjdk/jdk/make/common/shared/Platform.gmk 2014-07-30 13:47:55.600394147 +0100 @@ -51,8 +51,6 @@ # USER login name of user (minus blanks) # PLATFORM windows, solaris, or linux @@ -537,9 +513,9 @@ ifneq ($(PLATFORM), windows) # Temporary disk area diff -Nru openjdk.orig/jdk/make/common/shared/Sanity.gmk openjdk/jdk/make/common/shared/Sanity.gmk ---- openjdk.orig/jdk/make/common/shared/Sanity.gmk 2013-09-02 16:47:34.864499931 +0100 -+++ openjdk/jdk/make/common/shared/Sanity.gmk 2013-09-02 17:00:48.380846574 +0100 -@@ -38,54 +38,100 @@ +--- openjdk.orig/jdk/make/common/shared/Sanity.gmk 2014-07-30 13:42:53.596066769 +0100 ++++ openjdk/jdk/make/common/shared/Sanity.gmk 2014-07-30 13:47:55.600394147 +0100 +@@ -44,54 +44,100 @@ SANITY_FILES = $(ERROR_FILE) $(WARNING_FILE) $(MESSAGE_FILE) # How to say "The Release Engineering people use this" @@ -668,7 +644,7 @@ DXSDK_VER := $(shell $(EGREP) DIRECT3D_VERSION $(DXSDK_INCLUDE_PATH)/d3d9.h 2>&1 | \ $(EGREP) "\#define" | $(NAWK) '{print $$3}') endif -@@ -100,7 +146,6 @@ +@@ -106,7 +152,6 @@ UNZIP_VER :=$(call GetVersion,"$(_UNZIP_VER)") BOOT_VER :=$(call GetVersion,"$(_BOOT_VER)") @@ -676,7 +652,7 @@ _ANT_VER :=$(shell $(ANT) -version 2>&1 ) ANT_VER :=$(call GetVersion,"$(_ANT_VER)") -@@ -161,7 +206,6 @@ +@@ -167,7 +212,6 @@ sane-compiler \ sane-link \ sane-cacerts \ @@ -684,7 +660,7 @@ sane-alsa-headers \ sane-ant_version \ sane-zip_version \ -@@ -233,35 +277,29 @@ +@@ -239,35 +283,29 @@ # generate a fatal sanity error, and a warning about the official # build platform just becomes clutter. ###################################################### @@ -741,7 +717,7 @@ endif # OPENJDK ifeq ($(PLATFORM), windows) -@@ -302,16 +340,12 @@ +@@ -308,16 +346,12 @@ CYGWIN_CHECK :=$(call CheckVersions,$(CYGWIN_VER),$(REQUIRED_CYGWIN_VER)) sane-cygwin: ifdef USING_CYGWIN @@ -764,7 +740,7 @@ endif endif -@@ -339,16 +373,12 @@ +@@ -345,16 +379,12 @@ MKS_CHECK :=$(call CheckVersions,$(MKS_VER),$(REQUIRED_MKS_VER)) sane-mks: ifndef USING_CYGWIN @@ -787,7 +763,7 @@ endif endif -@@ -1296,11 +1326,6 @@ +@@ -1270,11 +1300,6 @@ # Check the compiler version(s) ###################################################### CC_CHECK :=$(call CheckVersions,$(CC_VER),$(REQUIRED_CC_VER)) @@ -799,7 +775,7 @@ sane-compiler: sane-link @if [ "$(CC_CHECK)" = "missing" ]; then \ $(ECHO) "ERROR: The Compiler version is undefined. \n" \ -@@ -1315,16 +1340,6 @@ +@@ -1289,16 +1314,6 @@ " $(COMPILER_PATH) \n" \ "" >> $(WARNING_FILE) ; \ fi @@ -816,7 +792,7 @@ ifeq ($(PLATFORM), windows) ifeq ($(ARCH_DATA_MODEL), 64) ifneq ($(COMPILER_VERSION), VS2005) -@@ -1338,38 +1353,24 @@ +@@ -1312,38 +1327,24 @@ ###################################################### # Check that ALSA headers and libs are installed and # that the header has the right version. We only @@ -864,7 +840,7 @@ " Please install ALSA (drivers and lib). You can download the \n" \ " source distribution from http://www.alsa-project.org or go to \n" \ " http://www.freshrpms.net/docs/alsa/ for precompiled RPM packages. \n" \ -@@ -1384,7 +1385,7 @@ +@@ -1358,7 +1359,7 @@ ###################################################### # dump out the variable settings... ###################################################### @@ -873,7 +849,7 @@ @$(ECHO) >> $(MESSAGE_FILE) @$(ECHO) $(ALL_SETTINGS) >> $(MESSAGE_FILE) @$(ECHO) >> $(MESSAGE_FILE) -@@ -1396,8 +1397,8 @@ +@@ -1370,8 +1371,8 @@ ifeq ($(PLATFORM), solaris) ifndef OPENJDK @if [ -r $(GCC_COMPILER_PATH) ]; then \ @@ -885,9 +861,9 @@ " The compiler was obtained from the following location: \n" \ " $(GCC_COMPILER_PATH) \n" \ diff -Nru openjdk.orig/jdk/make/common/shared/Sanity-Settings.gmk openjdk/jdk/make/common/shared/Sanity-Settings.gmk ---- openjdk.orig/jdk/make/common/shared/Sanity-Settings.gmk 2012-10-26 19:25:40.000000000 +0100 -+++ openjdk/jdk/make/common/shared/Sanity-Settings.gmk 2013-09-02 16:58:52.819048695 +0100 -@@ -170,8 +170,6 @@ +--- openjdk.orig/jdk/make/common/shared/Sanity-Settings.gmk 2014-07-14 04:24:43.000000000 +0100 ++++ openjdk/jdk/make/common/shared/Sanity-Settings.gmk 2014-07-30 13:47:55.600394147 +0100 +@@ -177,8 +177,6 @@ ifeq ($(PLATFORM),windows) ALL_SETTINGS+=$(call addRequiredSetting,PROCESSOR_ARCHITECTURE) ALL_SETTINGS+=$(call addRequiredSetting,PROCESSOR_IDENTIFIER) @@ -896,7 +872,7 @@ ifdef USING_CYGWIN ALL_SETTINGS+=$(call addRequiredSetting,USING_CYGWIN) ALL_SETTINGS+=$(call addRequiredVersionSetting,CYGWIN_VER) -@@ -182,13 +180,11 @@ +@@ -189,13 +187,11 @@ endif endif ifeq ($(PLATFORM),linux)
--- a/patches/openjdk/6816311-compiler_name.patch Tue Jul 29 01:20:12 2014 +0100 +++ b/patches/openjdk/6816311-compiler_name.patch Wed Jul 30 14:41:18 2014 +0100 @@ -1,10 +1,10 @@ diff -Nru openjdk.orig/jdk/make/common/Defs-windows.gmk openjdk/jdk/make/common/Defs-windows.gmk ---- openjdk.orig/jdk/make/common/Defs-windows.gmk 2013-09-02 16:35:07.688884584 +0100 -+++ openjdk/jdk/make/common/Defs-windows.gmk 2013-09-02 16:40:22.565779052 +0100 -@@ -78,6 +78,13 @@ - MS_RUNTIME_LIBRARIES += unicows.dll - endif - +--- openjdk.orig/jdk/make/common/Defs-windows.gmk 2014-07-30 13:50:26.338553416 +0100 ++++ openjdk/jdk/make/common/Defs-windows.gmk 2014-07-30 13:52:49.696606593 +0100 +@@ -75,6 +75,14 @@ + # The following DLL's are considered MS runtime libraries and should + # not to be REBASEd, see deploy/make/common/Release.gmk. + # msvcr*.dll: Microsoft runtimes +ifeq ($(ARCH_DATA_MODEL), 64) + ifeq ($(COMPILER_VERSION), VS2008) + MSVCRNN_DLL = msvcr90.dll @@ -12,33 +12,22 @@ + MS_RUNTIME_LIBRARIES += $(MSVCRNN_DLL) + endif +endif - - EXTRA_LFLAGS += /LIBPATH:$(DXSDK_LIB_PATH) - -@@ -302,17 +309,13 @@ - # - CFLAGS_COMMON += -Fd$(OBJDIR)/$(basename $(@F)).pdb -Fm$(OBJDIR)/$(basename $(@F)).map - --# --# Add warnings and extra on 64bit issues --# --ifeq ($(ARCH_DATA_MODEL), 64) -- CFLAGS_COMMON += -Wp64 --endif --CFLAGS_COMMON += -W$(COMPILER_WARNING_LEVEL) - - # ++ + ifeq ($(COMPILER_VERSION), VS2010) + MSVCRNN_DLL = msvcr100.dll + MSVCPNN_DLL = msvcp100.dll +@@ -271,6 +279,8 @@ # Treat compiler warnings as errors, if requested # -+CFLAGS_COMMON += -W$(COMPILER_WARNING_LEVEL) + CFLAGS_COMMON += -W$(COMPILER_WARNING_LEVEL) +# Turn off security warnings about using the standard C library function strcpy +CFLAGS_COMMON += -D _CRT_SECURE_NO_DEPRECATE ifeq ($(COMPILER_WARNINGS_FATAL),true) CFLAGS_COMMON += -WX endif diff -Nru openjdk.orig/jdk/make/common/shared/Compiler-gcc.gmk openjdk/jdk/make/common/shared/Compiler-gcc.gmk ---- openjdk.orig/jdk/make/common/shared/Compiler-gcc.gmk 2013-09-02 16:35:07.712884957 +0100 -+++ openjdk/jdk/make/common/shared/Compiler-gcc.gmk 2013-09-02 16:40:22.565779052 +0100 +--- openjdk.orig/jdk/make/common/shared/Compiler-gcc.gmk 2014-07-30 13:50:26.350553589 +0100 ++++ openjdk/jdk/make/common/shared/Compiler-gcc.gmk 2014-07-30 13:50:56.354983342 +0100 @@ -27,8 +27,6 @@ # GCC Compiler settings # @@ -57,24 +46,24 @@ +COMPILER_VERSION = $(COMPILER_NAME) + diff -Nru openjdk.orig/jdk/make/common/shared/Compiler-msvc.gmk openjdk/jdk/make/common/shared/Compiler-msvc.gmk ---- openjdk.orig/jdk/make/common/shared/Compiler-msvc.gmk 2013-09-02 16:35:07.712884957 +0100 -+++ openjdk/jdk/make/common/shared/Compiler-msvc.gmk 2013-09-02 16:40:22.565779052 +0100 -@@ -110,6 +110,12 @@ - endif - endif - endif -+ ifeq ($(CC_MAJORVER), 15) -+ COMPILER_NAME=Microsoft Windows SDK with Visual Studio 9 (6001.18000.367) -+ COMPILER_VERSION=VS2008 -+ RC = $(MSSDK61)/Bin/X64/rc.exe -+ MT = $(MSSDK61)/Bin/X64/mt.exe -+ endif - # This will cause problems if ALT_COMPILER_PATH is defined to "" - # which is a directive to use the PATH. - REBASE = $(COMPILER_PATH)../REBASE +--- openjdk.orig/jdk/make/common/shared/Compiler-msvc.gmk 2014-07-30 13:50:26.354553646 +0100 ++++ openjdk/jdk/make/common/shared/Compiler-msvc.gmk 2014-07-30 13:57:20.412482841 +0100 +@@ -78,6 +78,12 @@ + MT = $(_OTHER_TOOLS_BIN)/mt.exe + MTL = $(_OTHER_TOOLS_BIN)/midl.exe + endif ++ ifeq ($(CC_MAJORVER), 15) ++ COMPILER_NAME=Microsoft Windows SDK with Visual Studio 9 (6001.18000.367) ++ COMPILER_VERSION=VS2008 ++ RC = $(MSSDK61)/Bin/X64/rc.exe ++ MT = $(MSSDK61)/Bin/X64/mt.exe ++ endif + + # These variables can never be empty + ifndef COMPILER_PATH diff -Nru openjdk.orig/jdk/make/common/shared/Compiler-sun.gmk openjdk/jdk/make/common/shared/Compiler-sun.gmk ---- openjdk.orig/jdk/make/common/shared/Compiler-sun.gmk 2013-09-02 16:35:07.712884957 +0100 -+++ openjdk/jdk/make/common/shared/Compiler-sun.gmk 2013-09-02 16:41:13.914577209 +0100 +--- openjdk.orig/jdk/make/common/shared/Compiler-sun.gmk 2014-07-30 13:50:26.354553646 +0100 ++++ openjdk/jdk/make/common/shared/Compiler-sun.gmk 2014-07-30 13:50:56.354983342 +0100 @@ -27,13 +27,8 @@ # Sun Studio Compiler settings # @@ -117,8 +106,8 @@ # Starting in SS12 (5.9), the arch options changed. # The assembler /usr/ccs/bin/as wants older SS11 (5.8) style options. diff -Nru openjdk.orig/jdk/make/common/shared/Defs-versions.gmk openjdk/jdk/make/common/shared/Defs-versions.gmk ---- openjdk.orig/jdk/make/common/shared/Defs-versions.gmk 2013-09-02 16:35:07.720885081 +0100 -+++ openjdk/jdk/make/common/shared/Defs-versions.gmk 2013-09-02 16:40:22.565779052 +0100 +--- openjdk.orig/jdk/make/common/shared/Defs-versions.gmk 2014-07-30 13:50:26.386554104 +0100 ++++ openjdk/jdk/make/common/shared/Defs-versions.gmk 2014-07-30 13:50:56.354983342 +0100 @@ -45,6 +45,12 @@ # REQUIRED_CC_VER # The primary C compiler version expected. @@ -173,180 +162,10 @@ REQUIRED_CC_VER = 14.00.40310.41 REQUIRED_LINK_VER = 8.00.40310.39 endif -diff -Nru openjdk.orig/jdk/make/common/shared/Defs-windows.gmk openjdk/jdk/make/common/shared/Defs-windows.gmk ---- openjdk.orig/jdk/make/common/shared/Defs-windows.gmk 2013-09-02 16:35:07.712884957 +0100 -+++ openjdk/jdk/make/common/shared/Defs-windows.gmk 2013-09-02 16:40:22.565779052 +0100 -@@ -199,6 +199,7 @@ - endif - ifeq ($(ARCH_DATA_MODEL), 32) - _program_files :=$(call FullPath,$(xPROGRAMFILES)) -+ _program_files32 :=$(_program_files) - else - ifdef PROGRAMW6432 - xPROGRAMW6432 :="$(subst \,/,$(PROGRAMW6432))" -@@ -260,17 +261,30 @@ - ifneq ($(_msvc_dir),) - _compiler_bin :=$(_msvc_dir)/Bin - _redist_sdk :=$(_msvc_dir)/../SDK/v1.1/Bin -- _ms_sdk :=$(_msvc_dir)/PlatformSDK -+ # Assume PlatformSDK is in VS71 (will be empty if VS90) -+ _ms_sdk :=$(call FullPath,$(_msvc_dir)/PlatformSDK) -+ # Assume VS90, then VS80, then VS71 -+ _redist_sdk :=$(call FullPath,$(_msvc_dir)/../SDK/v3.5/Bin) -+ ifeq ($(_redist_sdk),) -+ _redist_sdk :=$(call FullPath,$(_msvc_dir)/../SDK/v2.0/Bin) -+ ifeq ($(_redist_sdk),) -+ _redist_sdk :=$(call FullPath,$(_msvc_dir)/../SDK/v1.1/Bin) -+ endif -+ endif - endif - endif - - # The Microsoft Platform SDK installed by itself - ifneq ($(_program_files),) -- xPSDK :="$(_program_files)/Microsoft Platform SDK" -- _psdk :=$(call FullPath,$(xPSDK)) -+ _PSDK :="$(_program_files)/Microsoft SDKs/Windows/v6.1/" -+ _psdk :=$(call FullPath,$(xMSSDK61)) - ifeq ($(_psdk),) -- xPSDK :="$(_program_files)/Microsoft SDK" -- _psdk :=$(call FullPath,$(xMSSDK)) -+ xPSDK :="$(_program_files)/Microsoft Platform SDK" -+ _psdk :=$(call FullPath,$(xPSDK)) -+ ifeq ($(_psdk),) -+ xPSDK :="$(_program_files)/Microsoft SDK" -+ _psdk :=$(call FullPath,$(xMSSDK)) -+ endif - endif - endif - -@@ -291,13 +305,22 @@ - - # Compilers for 64bit are from SDK - ifeq ($(ARCH_DATA_MODEL), 64) -- ifneq ($(_ms_sdk),) -- ifeq ($(ARCH), ia64) -- _compiler_bin :=$(_ms_sdk)/Bin/Win64 -- endif -- ifeq ($(ARCH), amd64) -- _compiler_bin :=$(_ms_sdk)/Bin/Win64/x86/$(ARCH) -- _redist_sdk :=$(_ms_sdk)/redist/win64/AMD64 -+ xVS2008 :="$(_program_files32)/Microsoft Visual Studio 9.0/" -+ VS2008 :=$(call FullPath,$(xVS2008)) -+ ifneq ($(VS2008),) -+ _compiler_bin :=$(VS2008)/VC/Bin/$(ARCH) -+ xMSSDK61 :="$(_program_files)/Microsoft SDKs/Windows/v6.1/" -+ MSSDK61 :=$(call FullPath,$(xMSSDK61)) -+ _redist_sdk :=$(VS2008)/VC/redist/x86/Microsoft.VC90.CRT -+ else -+ ifneq ($(_ms_sdk),) -+ ifeq ($(ARCH), ia64) -+ _compiler_bin :=$(_ms_sdk)/Bin/Win64 -+ endif -+ ifeq ($(ARCH), amd64) -+ _compiler_bin :=$(_ms_sdk)/Bin/Win64/x86/$(ARCH) -+ _redist_sdk :=$(_ms_sdk)/redist/win64/AMD64 -+ endif - endif - endif - endif -@@ -400,38 +423,30 @@ - _BOOTDIR2 =$(USRJDKINSTANCES_PATH)/jdk$(PREVIOUS_JDK_VERSION) - endif - --# See if SDK area has a msvcrt.dll file, directory may exist w/o msvcr* files --_REDIST_SDK_EXISTS := $(shell \ -- if [ -f "$(_redist_sdk)/msvcrt.dll" ]; then \ -- echo "true"; \ -- else \ -- echo "false"; \ -- fi) --_REDIST71_SDK_EXISTS := $(shell \ -- if [ -f "$(_redist_sdk)/msvcr71.dll" ]; then \ -- echo "true"; \ -- else \ -- echo "false"; \ -- fi) -+# 32 bit always needs 2 runtimes, 64 bit usually does too - --# 32 bit needs 2 runtimes --ifeq ($(ARCH_DATA_MODEL), 32) -+# MSVCRT_DLL_PATH: location of msvcrt.dll that will be re-distributed -+ifdef ALT_MSVCRT_DLL_PATH -+ xALT_MSVCRT_DLL_PATH :="$(subst \,/,$(ALT_MSVCRT_DLL_PATH))" -+ MSVCRT_DLL_PATH :=$(call FullPath,$(xALT_MSVCRT_DLL_PATH)) -+else -+ MSVCRT_DLL_PATH :=$(call FullPath,$(_system_root)/system32/) -+endif -+MSVCRT_DLL_PATH:=$(call AltCheckSpaces,MSVCRT_DLL_PATH) -+MSVCRT_DLL_PATH:=$(call AltCheckValue,MSVCRT_DLL_PATH) - -- # MSVCRT_DLL_PATH: location of msvcrt.dll that will be re-distributed -- ifdef ALT_MSVCRT_DLL_PATH -- xALT_MSVCRT_DLL_PATH :="$(subst \,/,$(ALT_MSVCRT_DLL_PATH))" -- MSVCRT_DLL_PATH :=$(call FullPath,$(xALT_MSVCRT_DLL_PATH)) -+# 32bit always needs the MSVCRNN runtime, 64bit does when using VS2008 -+ifeq ($(ARCH_DATA_MODEL), 32) -+ _NEEDS_MSVCRNN = true -+else -+ ifeq ($(VS2008),) -+ _NEEDS_MSVCRNN = false - else -- ifeq ($(_REDIST_SDK_EXISTS), true) -- xREDIST_DIR :=$(_redist_sdk) -- else -- xREDIST_DIR :=$(_system_root)/system32 -- endif -- MSVCRT_DLL_PATH :=$(call FullPath,$(xREDIST_DIR)) -+ _NEEDS_MSVCRNN = true - endif -- MSVCRT_DLL_PATH:=$(call AltCheckSpaces,MSVCRT_DLL_PATH) -- MSVCRT_DLL_PATH:=$(call AltCheckValue,MSVCRT_DLL_PATH) -- -+endif -+ -+ifeq ($(ARCH_DATA_MODEL), 32) - # MSVCR71_DLL_PATH: location of msvcr71.dll that will be re-distributed - ifdef ALT_MSVCR71_DLL_PATH - xALT_MSVCR71_DLL_PATH :="$(subst \,/,$(ALT_MSVCR71_DLL_PATH))" -@@ -448,22 +463,17 @@ - MSVCR71_DLL_PATH:=$(call AltCheckValue,MSVCR71_DLL_PATH) - - else -- -- # MSVCRT_DLL_PATH: location of msvcrt.dll that will be re-distributed -- ifdef ALT_MSVCRT_DLL_PATH -- xALT_MSVCRT_DLL_PATH :="$(subst \,/,$(ALT_MSVCRT_DLL_PATH))" -- MSVCRT_DLL_PATH :=$(call FullPath,$(xALT_MSVCRT_DLL_PATH)) -- else -- ifeq ($(_REDIST_SDK_EXISTS), true) -- xREDIST_DIR :=$(_redist_sdk) -- else -- xREDIST_DIR :=$(_system_root)/SysWOW64 -- endif -- MSVCRT_DLL_PATH :=$(call FullPath,$(xREDIST_DIR)) -- endif -- MSVCRT_DLL_PATH:=$(call AltCheckSpaces,MSVCRT_DLL_PATH) -- MSVCRT_DLL_PATH:=$(call AltCheckValue,MSVCRT_DLL_PATH) -- -+ifeq ($(_NEEDS_MSVCRNN), true) -+ # MSVCRNN_DLL_PATH: location of msvcrnn.dll that will be re-distributed -+ ifdef ALT_MSVCRNN_DLL_PATH -+ xALT_MSVCRNN_DLL_PATH :="$(subst \,/,$(ALT_MSVCRNN_DLL_PATH))" -+ MSVCRNN_DLL_PATH :=$(call FullPath,$(xALT_MSVCRNN_DLL_PATH)) -+ else -+ MSVCRNN_DLL_PATH :=$(_redist_sdk) -+ endif -+ MSVCRNN_DLL_PATH :=$(call AltCheckSpaces,MSVCRNN_DLL_PATH) -+ MSVCRNN_DLL_PATH:=$(call AltCheckValue,MSVCRNN_DLL_PATH) -+endif - endif - - # DXSDK_PATH: path to Microsoft DirectX SDK Include and Lib diff -Nru openjdk.orig/jdk/make/common/shared/Sanity.gmk openjdk/jdk/make/common/shared/Sanity.gmk ---- openjdk.orig/jdk/make/common/shared/Sanity.gmk 2013-09-02 16:35:07.712884957 +0100 -+++ openjdk/jdk/make/common/shared/Sanity.gmk 2013-09-02 16:40:22.565779052 +0100 -@@ -123,7 +123,7 @@ +--- openjdk.orig/jdk/make/common/shared/Sanity.gmk 2014-07-30 13:50:26.354553646 +0100 ++++ openjdk/jdk/make/common/shared/Sanity.gmk 2014-07-30 13:50:56.354983342 +0100 +@@ -129,7 +129,7 @@ ifeq ($(_OS_VERSION),) OS_VERSION = 5.0 else @@ -355,7 +174,7 @@ endif OS_VARIANT_NAME := $(WINDOWS_MAPPING-$(OS_VERSION)) OS_VARIANT_VERSION := $(OS_VERSION) -@@ -1320,8 +1320,8 @@ +@@ -1289,8 +1289,8 @@ fi @if [ "$(LINK_CHECK)" != "same" ]; then \ $(ECHO) "WARNING: To build Java 2 SDK $(JDK_VERSION) you need : \n" \ @@ -366,7 +185,7 @@ " $(YOU_ARE_USING) Linker version \"$(LINK_VER)\" \n" \ "" >> $(WARNING_FILE) ; \ fi -@@ -1338,21 +1338,13 @@ +@@ -1307,21 +1307,13 @@ fi ifndef OPENJDK @if [ "$(CC_CHECK)" != "same" ]; then \ @@ -392,8 +211,8 @@ ###################################################### diff -Nru openjdk.orig/jdk/src/windows/native/sun/windows/awt.rc openjdk/jdk/src/windows/native/sun/windows/awt.rc ---- openjdk.orig/jdk/src/windows/native/sun/windows/awt.rc 2013-09-02 16:35:02.892810032 +0100 -+++ openjdk/jdk/src/windows/native/sun/windows/awt.rc 2013-09-02 16:40:22.565779052 +0100 +--- openjdk.orig/jdk/src/windows/native/sun/windows/awt.rc 2014-07-14 04:24:44.000000000 +0100 ++++ openjdk/jdk/src/windows/native/sun/windows/awt.rc 2014-07-30 13:50:56.358983399 +0100 @@ -23,7 +23,7 @@ // questions. // @@ -404,8 +223,8 @@ // Need 2 defines so macro argument to XSTR will get expanded before quoting. #define XSTR(x) STR(x) diff -Nru openjdk.orig/jdk/src/windows/resource/version.rc openjdk/jdk/src/windows/resource/version.rc ---- openjdk.orig/jdk/src/windows/resource/version.rc 2012-10-26 19:26:19.000000000 +0100 -+++ openjdk/jdk/src/windows/resource/version.rc 2013-09-02 16:40:22.565779052 +0100 +--- openjdk.orig/jdk/src/windows/resource/version.rc 2014-07-14 04:24:44.000000000 +0100 ++++ openjdk/jdk/src/windows/resource/version.rc 2014-07-30 13:50:56.358983399 +0100 @@ -23,7 +23,7 @@ // questions. //
--- a/patches/openjdk/8013057-detect_mmap_commit_failures.patch Tue Jul 29 01:20:12 2014 +0100 +++ b/patches/openjdk/8013057-detect_mmap_commit_failures.patch Wed Jul 30 14:41:18 2014 +0100 @@ -1,17 +1,7 @@ -# HG changeset patch -# User dcubed -# Date 1394474985 0 -# Mon Mar 10 18:09:45 2014 +0000 -# Node ID cbdd11a54b82eb7731d16abbc6df3c9b4d42c78b -# Parent 3f0dff7a9cf590ef3e5d7f2dcf6c8247b65c9d10 -8013057: assert(_needs_gc || SafepointSynchronize::is_at_safepoint()) failed: only read at safepoint -Summary: Detect mmap() commit failures in Linux and Solaris os::commit_memory() impls and call vm_exit_out_of_memory(). Add os::commit_memory_or_exit(). Also tidy up some NMT accounting and some mmap() return value checking. -Reviewed-by: zgu, stefank, dholmes, dsamersoff - -diff -r 3f0dff7a9cf5 -r cbdd11a54b82 src/os/bsd/vm/os_bsd.cpp ---- openjdk/hotspot/src/os/bsd/vm/os_bsd.cpp Mon Mar 12 13:12:07 2012 -0700 -+++ openjdk/hotspot/src/os/bsd/vm/os_bsd.cpp Mon Mar 10 18:09:45 2014 +0000 -@@ -2762,6 +2762,13 @@ +diff -Nru openjdk.orig/hotspot/src/os/bsd/vm/os_bsd.cpp openjdk/hotspot/src/os/bsd/vm/os_bsd.cpp +--- openjdk.orig/hotspot/src/os/bsd/vm/os_bsd.cpp 2014-07-14 04:12:32.000000000 +0100 ++++ openjdk/hotspot/src/os/bsd/vm/os_bsd.cpp 2014-07-30 14:05:55.079844066 +0100 +@@ -2760,6 +2760,13 @@ } } @@ -25,7 +15,7 @@ // NOTE: Bsd kernel does not really reserve the pages for us. // All it does is to check if there are enough free pages // left at the time of mmap(). This could be a potential -@@ -2770,12 +2777,22 @@ +@@ -2768,12 +2775,22 @@ int prot = exec ? PROT_READ|PROT_WRITE|PROT_EXEC : PROT_READ|PROT_WRITE; #ifdef __OpenBSD__ // XXX: Work-around mmap/MAP_FIXED bug temporarily on OpenBSD @@ -50,7 +40,7 @@ } #ifndef _ALLBSD_SOURCE -@@ -2803,9 +2820,27 @@ +@@ -2801,9 +2818,27 @@ } #endif @@ -78,7 +68,7 @@ void os::realign_memory(char *addr, size_t bytes, size_t alignment_hint) { #ifndef _ALLBSD_SOURCE if (UseHugeTLBFS && alignment_hint > (size_t)vm_page_size()) { -@@ -2970,7 +3005,7 @@ +@@ -2968,7 +3003,7 @@ } bool os::create_stack_guard_pages(char* addr, size_t size) { @@ -87,7 +77,7 @@ } // If this is a growable mapping, remove the guard pages entirely by -@@ -4467,7 +4502,7 @@ +@@ -4465,7 +4500,7 @@ if (!UseMembar) { address mem_serialize_page = (address) ::mmap(NULL, Bsd::page_size(), PROT_READ | PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0); @@ -96,9 +86,9 @@ os::set_memory_serialize_page( mem_serialize_page ); #ifndef PRODUCT -diff -r 3f0dff7a9cf5 -r cbdd11a54b82 src/os/bsd/vm/perfMemory_bsd.cpp ---- openjdk/hotspot/src/os/bsd/vm/perfMemory_bsd.cpp Mon Mar 12 13:12:07 2012 -0700 -+++ openjdk/hotspot/src/os/bsd/vm/perfMemory_bsd.cpp Mon Mar 10 18:09:45 2014 +0000 +diff -Nru openjdk.orig/hotspot/src/os/bsd/vm/perfMemory_bsd.cpp openjdk/hotspot/src/os/bsd/vm/perfMemory_bsd.cpp +--- openjdk.orig/hotspot/src/os/bsd/vm/perfMemory_bsd.cpp 2014-07-14 04:12:32.000000000 +0100 ++++ openjdk/hotspot/src/os/bsd/vm/perfMemory_bsd.cpp 2014-07-30 14:05:55.079844066 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved. @@ -115,10 +105,10 @@ if (PrintMiscellaneous && Verbose) { warning("Could not commit PerfData memory\n"); } -diff -r 3f0dff7a9cf5 -r cbdd11a54b82 src/os/linux/vm/os_linux.cpp ---- openjdk/hotspot/src/os/linux/vm/os_linux.cpp Mon Mar 12 13:12:07 2012 -0700 -+++ openjdk/hotspot/src/os/linux/vm/os_linux.cpp Mon Mar 10 18:09:45 2014 +0000 -@@ -2508,11 +2508,49 @@ +diff -Nru openjdk.orig/hotspot/src/os/linux/vm/os_linux.cpp openjdk/hotspot/src/os/linux/vm/os_linux.cpp +--- openjdk.orig/hotspot/src/os/linux/vm/os_linux.cpp 2014-07-30 14:04:57.339018466 +0100 ++++ openjdk/hotspot/src/os/linux/vm/os_linux.cpp 2014-07-30 14:05:55.079844066 +0100 +@@ -2506,11 +2506,49 @@ } } @@ -169,13 +159,11 @@ int prot = exec ? PROT_READ|PROT_WRITE|PROT_EXEC : PROT_READ|PROT_WRITE; uintptr_t res = (uintptr_t) ::mmap(addr, size, prot, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0); -@@ -2520,9 +2558,32 @@ +@@ -2518,9 +2556,32 @@ if (UseNUMAInterleaving) { numa_make_global(addr, size); } - return true; -- } -- return false; + return 0; + } + @@ -201,11 +189,12 @@ + // the caller wants all commit errors to exit with the specified mesg: + warn_fail_commit_memory(addr, size, exec, err); + vm_exit_out_of_memory(size, mesg); -+ } + } +- return false; } // Define MAP_HUGETLB here so we can build HotSpot on old systems. -@@ -2535,8 +2596,9 @@ +@@ -2533,8 +2594,9 @@ #define MADV_HUGEPAGE 14 #endif @@ -217,7 +206,7 @@ if (UseHugeTLBFS && alignment_hint > (size_t)vm_page_size()) { int prot = exec ? PROT_READ|PROT_WRITE|PROT_EXEC : PROT_READ|PROT_WRITE; uintptr_t res = -@@ -2547,16 +2609,45 @@ +@@ -2545,16 +2607,45 @@ if (UseNUMAInterleaving) { numa_make_global(addr, size); } @@ -244,9 +233,8 @@ + if (err == 0) { realign_memory(addr, size, alignment_hint); - return true; -- } + } - return false; -+ } + return err; +} + @@ -268,7 +256,7 @@ } void os::realign_memory(char *addr, size_t bytes, size_t alignment_hint) { -@@ -2574,7 +2665,7 @@ +@@ -2572,7 +2663,7 @@ // small pages on top of the SHM segment. This method always works for small pages, so we // allow that in any case. if (alignment_hint <= (size_t)os::vm_page_size() || !UseSHM) { @@ -277,7 +265,7 @@ } } -@@ -2827,7 +2918,7 @@ +@@ -2835,7 +2926,7 @@ ::munmap((void*)stack_extent, (uintptr_t)addr - stack_extent); } @@ -286,7 +274,7 @@ } // If this is a growable mapping, remove the guard pages entirely by -@@ -2948,7 +3039,7 @@ +@@ -2956,7 +3047,7 @@ MAP_ANONYMOUS|MAP_PRIVATE|MAP_HUGETLB, -1, 0); @@ -295,7 +283,7 @@ // We don't know if this really is a huge page or not. FILE *fp = fopen("/proc/self/maps", "r"); if (fp) { -@@ -4225,7 +4316,7 @@ +@@ -4233,7 +4324,7 @@ if (!UseMembar) { address mem_serialize_page = (address) ::mmap(NULL, Linux::page_size(), PROT_READ | PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0); @@ -304,9 +292,9 @@ os::set_memory_serialize_page( mem_serialize_page ); #ifndef PRODUCT -diff -r 3f0dff7a9cf5 -r cbdd11a54b82 src/os/linux/vm/os_linux.hpp ---- openjdk/hotspot/src/os/linux/vm/os_linux.hpp Mon Mar 12 13:12:07 2012 -0700 -+++ openjdk/hotspot/src/os/linux/vm/os_linux.hpp Mon Mar 10 18:09:45 2014 +0000 +diff -Nru openjdk.orig/hotspot/src/os/linux/vm/os_linux.hpp openjdk/hotspot/src/os/linux/vm/os_linux.hpp +--- openjdk.orig/hotspot/src/os/linux/vm/os_linux.hpp 2014-07-14 04:12:31.000000000 +0100 ++++ openjdk/hotspot/src/os/linux/vm/os_linux.hpp 2014-07-30 14:05:55.079844066 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved. @@ -325,9 +313,9 @@ static void set_glibc_version(const char *s) { _glibc_version = s; } static void set_libpthread_version(const char *s) { _libpthread_version = s; } -diff -r 3f0dff7a9cf5 -r cbdd11a54b82 src/os/linux/vm/perfMemory_linux.cpp ---- openjdk/hotspot/src/os/linux/vm/perfMemory_linux.cpp Mon Mar 12 13:12:07 2012 -0700 -+++ openjdk/hotspot/src/os/linux/vm/perfMemory_linux.cpp Mon Mar 10 18:09:45 2014 +0000 +diff -Nru openjdk.orig/hotspot/src/os/linux/vm/perfMemory_linux.cpp openjdk/hotspot/src/os/linux/vm/perfMemory_linux.cpp +--- openjdk.orig/hotspot/src/os/linux/vm/perfMemory_linux.cpp 2014-07-14 04:12:31.000000000 +0100 ++++ openjdk/hotspot/src/os/linux/vm/perfMemory_linux.cpp 2014-07-30 14:05:55.079844066 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved. @@ -344,10 +332,10 @@ if (PrintMiscellaneous && Verbose) { warning("Could not commit PerfData memory\n"); } -diff -r 3f0dff7a9cf5 -r cbdd11a54b82 src/os/solaris/vm/os_solaris.cpp ---- openjdk/hotspot/src/os/solaris/vm/os_solaris.cpp Mon Mar 12 13:12:07 2012 -0700 -+++ openjdk/hotspot/src/os/solaris/vm/os_solaris.cpp Mon Mar 10 18:09:45 2014 +0000 -@@ -2769,7 +2769,42 @@ +diff -Nru openjdk.orig/hotspot/src/os/solaris/vm/os_solaris.cpp openjdk/hotspot/src/os/solaris/vm/os_solaris.cpp +--- openjdk.orig/hotspot/src/os/solaris/vm/os_solaris.cpp 2014-07-14 04:12:31.000000000 +0100 ++++ openjdk/hotspot/src/os/solaris/vm/os_solaris.cpp 2014-07-30 14:05:55.079844066 +0100 +@@ -2767,7 +2767,42 @@ return page_size; } @@ -391,20 +379,14 @@ int prot = exec ? PROT_READ|PROT_WRITE|PROT_EXEC : PROT_READ|PROT_WRITE; size_t size = bytes; char *res = Solaris::mmap_chunk(addr, size, MAP_PRIVATE|MAP_FIXED, prot); -@@ -2777,14 +2812,38 @@ +@@ -2775,14 +2810,38 @@ if (UseNUMAInterleaving) { numa_make_global(addr, bytes); } - return true; -- } ++ return 0; + } - return false; --} -- --bool os::commit_memory(char* addr, size_t bytes, size_t alignment_hint, -- bool exec) { -- if (commit_memory(addr, bytes, exec)) { -+ return 0; -+ } + + int err = errno; // save errno from mmap() call in mmap_chunk() + @@ -414,8 +396,11 @@ + } + + return err; -+} -+ + } + +-bool os::commit_memory(char* addr, size_t bytes, size_t alignment_hint, +- bool exec) { +- if (commit_memory(addr, bytes, exec)) { +bool os::commit_memory(char* addr, size_t bytes, bool exec) { + return Solaris::commit_memory_impl(addr, bytes, exec) == 0; +} @@ -438,14 +423,13 @@ if (UseMPSS && alignment_hint > (size_t)vm_page_size()) { // If the large page size has been set and the VM // is using large pages, use the large page size -@@ -2806,9 +2865,25 @@ +@@ -2804,9 +2863,25 @@ // Since this is a hint, ignore any failures. (void)Solaris::set_mpss_range(addr, bytes, page_size); } - return true; -- } + } - return false; -+ } + return err; +} + @@ -467,7 +451,7 @@ } // Uncommit the pages in a specified region. -@@ -2820,7 +2895,7 @@ +@@ -2818,7 +2893,7 @@ } bool os::create_stack_guard_pages(char* addr, size_t size) { @@ -476,9 +460,9 @@ } bool os::remove_stack_guard_pages(char* addr, size_t size) { -diff -r 3f0dff7a9cf5 -r cbdd11a54b82 src/os/solaris/vm/os_solaris.hpp ---- openjdk/hotspot/src/os/solaris/vm/os_solaris.hpp Mon Mar 12 13:12:07 2012 -0700 -+++ openjdk/hotspot/src/os/solaris/vm/os_solaris.hpp Mon Mar 10 18:09:45 2014 +0000 +diff -Nru openjdk.orig/hotspot/src/os/solaris/vm/os_solaris.hpp openjdk/hotspot/src/os/solaris/vm/os_solaris.hpp +--- openjdk.orig/hotspot/src/os/solaris/vm/os_solaris.hpp 2014-07-14 04:12:31.000000000 +0100 ++++ openjdk/hotspot/src/os/solaris/vm/os_solaris.hpp 2014-07-30 14:05:55.079844066 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. @@ -496,9 +480,9 @@ static char* mmap_chunk(char *addr, size_t size, int flags, int prot); static char* anon_mmap(char* requested_addr, size_t bytes, size_t alignment_hint, bool fixed); static bool mpss_sanity_check(bool warn, size_t * page_size); -diff -r 3f0dff7a9cf5 -r cbdd11a54b82 src/os/solaris/vm/perfMemory_solaris.cpp ---- openjdk/hotspot/src/os/solaris/vm/perfMemory_solaris.cpp Mon Mar 12 13:12:07 2012 -0700 -+++ openjdk/hotspot/src/os/solaris/vm/perfMemory_solaris.cpp Mon Mar 10 18:09:45 2014 +0000 +diff -Nru openjdk.orig/hotspot/src/os/solaris/vm/perfMemory_solaris.cpp openjdk/hotspot/src/os/solaris/vm/perfMemory_solaris.cpp +--- openjdk.orig/hotspot/src/os/solaris/vm/perfMemory_solaris.cpp 2014-07-14 04:12:31.000000000 +0100 ++++ openjdk/hotspot/src/os/solaris/vm/perfMemory_solaris.cpp 2014-07-30 14:05:55.079844066 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved. @@ -515,10 +499,10 @@ if (PrintMiscellaneous && Verbose) { warning("Could not commit PerfData memory\n"); } -diff -r 3f0dff7a9cf5 -r cbdd11a54b82 src/os/windows/vm/os_windows.cpp ---- openjdk/hotspot/src/os/windows/vm/os_windows.cpp Mon Mar 12 13:12:07 2012 -0700 -+++ openjdk/hotspot/src/os/windows/vm/os_windows.cpp Mon Mar 10 18:09:45 2014 +0000 -@@ -2410,7 +2410,7 @@ +diff -Nru openjdk.orig/hotspot/src/os/windows/vm/os_windows.cpp openjdk/hotspot/src/os/windows/vm/os_windows.cpp +--- openjdk.orig/hotspot/src/os/windows/vm/os_windows.cpp 2014-07-14 04:12:31.000000000 +0100 ++++ openjdk/hotspot/src/os/windows/vm/os_windows.cpp 2014-07-30 14:05:55.083844123 +0100 +@@ -2400,7 +2400,7 @@ addr = (address)((uintptr_t)addr & (~((uintptr_t)os::vm_page_size() - (uintptr_t)1))); os::commit_memory((char *)addr, thread->stack_base() - addr, @@ -527,7 +511,7 @@ return EXCEPTION_CONTINUE_EXECUTION; } else -@@ -3067,6 +3067,15 @@ +@@ -3057,6 +3057,15 @@ void os::print_statistics() { } @@ -543,7 +527,7 @@ bool os::commit_memory(char* addr, size_t bytes, bool exec) { if (bytes == 0) { // Don't bother the OS with noops. -@@ -3081,11 +3090,17 @@ +@@ -3071,11 +3080,17 @@ // is always within a reserve covered by a single VirtualAlloc // in that case we can just do a single commit for the requested size if (!UseNUMAInterleaving) { @@ -563,7 +547,7 @@ } return true; } else { -@@ -3100,12 +3115,20 @@ +@@ -3090,12 +3105,20 @@ MEMORY_BASIC_INFORMATION alloc_info; VirtualQuery(next_alloc_addr, &alloc_info, sizeof(alloc_info)); size_t bytes_to_rq = MIN2(bytes_remaining, (size_t)alloc_info.RegionSize); @@ -586,7 +570,7 @@ } bytes_remaining -= bytes_to_rq; next_alloc_addr += bytes_to_rq; -@@ -3117,9 +3140,26 @@ +@@ -3107,9 +3130,26 @@ bool os::commit_memory(char* addr, size_t size, size_t alignment_hint, bool exec) { @@ -613,7 +597,7 @@ bool os::uncommit_memory(char* addr, size_t bytes) { if (bytes == 0) { // Don't bother the OS with noops. -@@ -3135,7 +3175,7 @@ +@@ -3125,7 +3165,7 @@ } bool os::create_stack_guard_pages(char* addr, size_t size) { @@ -622,7 +606,7 @@ } bool os::remove_stack_guard_pages(char* addr, size_t size) { -@@ -3159,8 +3199,9 @@ +@@ -3149,8 +3189,9 @@ // Strange enough, but on Win32 one can change protection only for committed // memory, not a big deal anyway, as bytes less or equal than 64K @@ -634,9 +618,9 @@ } // One cannot use os::guard_memory() here, as on Win32 guard page // have different (one-shot) semantics, from MSDN on PAGE_GUARD: -diff -r 3f0dff7a9cf5 -r cbdd11a54b82 src/os/windows/vm/perfMemory_windows.cpp ---- openjdk/hotspot/src/os/windows/vm/perfMemory_windows.cpp Mon Mar 12 13:12:07 2012 -0700 -+++ openjdk/hotspot/src/os/windows/vm/perfMemory_windows.cpp Mon Mar 10 18:09:45 2014 +0000 +diff -Nru openjdk.orig/hotspot/src/os/windows/vm/perfMemory_windows.cpp openjdk/hotspot/src/os/windows/vm/perfMemory_windows.cpp +--- openjdk.orig/hotspot/src/os/windows/vm/perfMemory_windows.cpp 2014-07-14 04:12:31.000000000 +0100 ++++ openjdk/hotspot/src/os/windows/vm/perfMemory_windows.cpp 2014-07-30 14:05:55.083844123 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved. @@ -653,9 +637,9 @@ if (PrintMiscellaneous && Verbose) { warning("Could not commit PerfData memory\n"); } -diff -r 3f0dff7a9cf5 -r cbdd11a54b82 src/share/vm/gc_implementation/parallelScavenge/cardTableExtension.cpp ---- openjdk/hotspot/src/share/vm/gc_implementation/parallelScavenge/cardTableExtension.cpp Mon Mar 12 13:12:07 2012 -0700 -+++ openjdk/hotspot/src/share/vm/gc_implementation/parallelScavenge/cardTableExtension.cpp Mon Mar 10 18:09:45 2014 +0000 +diff -Nru openjdk.orig/hotspot/src/share/vm/gc_implementation/parallelScavenge/cardTableExtension.cpp openjdk/hotspot/src/share/vm/gc_implementation/parallelScavenge/cardTableExtension.cpp +--- openjdk.orig/hotspot/src/share/vm/gc_implementation/parallelScavenge/cardTableExtension.cpp 2014-07-14 04:12:31.000000000 +0100 ++++ openjdk/hotspot/src/share/vm/gc_implementation/parallelScavenge/cardTableExtension.cpp 2014-07-30 14:05:55.083844123 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved. @@ -678,9 +662,9 @@ } result = true; } else if (new_start_aligned > cur_committed.start()) { -diff -r 3f0dff7a9cf5 -r cbdd11a54b82 src/share/vm/gc_implementation/parallelScavenge/psVirtualspace.cpp ---- openjdk/hotspot/src/share/vm/gc_implementation/parallelScavenge/psVirtualspace.cpp Mon Mar 12 13:12:07 2012 -0700 -+++ openjdk/hotspot/src/share/vm/gc_implementation/parallelScavenge/psVirtualspace.cpp Mon Mar 10 18:09:45 2014 +0000 +diff -Nru openjdk.orig/hotspot/src/share/vm/gc_implementation/parallelScavenge/psVirtualspace.cpp openjdk/hotspot/src/share/vm/gc_implementation/parallelScavenge/psVirtualspace.cpp +--- openjdk.orig/hotspot/src/share/vm/gc_implementation/parallelScavenge/psVirtualspace.cpp 2014-07-14 04:12:31.000000000 +0100 ++++ openjdk/hotspot/src/share/vm/gc_implementation/parallelScavenge/psVirtualspace.cpp 2014-07-30 14:05:55.083844123 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. @@ -726,9 +710,9 @@ // Reduce the reserved region in the other space. other_space->set_reserved(other_space->reserved_low_addr(), other_space->reserved_high_addr() - tmp_bytes, -diff -r 3f0dff7a9cf5 -r cbdd11a54b82 src/share/vm/memory/cardTableModRefBS.cpp ---- openjdk/hotspot/src/share/vm/memory/cardTableModRefBS.cpp Mon Mar 12 13:12:07 2012 -0700 -+++ openjdk/hotspot/src/share/vm/memory/cardTableModRefBS.cpp Mon Mar 10 18:09:45 2014 +0000 +diff -Nru openjdk.orig/hotspot/src/share/vm/memory/cardTableModRefBS.cpp openjdk/hotspot/src/share/vm/memory/cardTableModRefBS.cpp +--- openjdk.orig/hotspot/src/share/vm/memory/cardTableModRefBS.cpp 2014-07-14 04:12:31.000000000 +0100 ++++ openjdk/hotspot/src/share/vm/memory/cardTableModRefBS.cpp 2014-07-30 14:05:55.083844123 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved. @@ -765,9 +749,9 @@ // Use new_end_aligned (as opposed to new_end_for_commit) because // the cur_committed region may include the guard region. } else if (new_end_aligned < cur_committed.end()) { -diff -r 3f0dff7a9cf5 -r cbdd11a54b82 src/share/vm/runtime/os.cpp ---- openjdk/hotspot/src/share/vm/runtime/os.cpp Mon Mar 12 13:12:07 2012 -0700 -+++ openjdk/hotspot/src/share/vm/runtime/os.cpp Mon Mar 10 18:09:45 2014 +0000 +diff -Nru openjdk.orig/hotspot/src/share/vm/runtime/os.cpp openjdk/hotspot/src/share/vm/runtime/os.cpp +--- openjdk.orig/hotspot/src/share/vm/runtime/os.cpp 2014-07-30 14:04:56.267003136 +0100 ++++ openjdk/hotspot/src/share/vm/runtime/os.cpp 2014-07-30 14:05:55.083844123 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. @@ -775,16 +759,9 @@ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it -diff -r 3f0dff7a9cf5 -r cbdd11a54b82 src/share/vm/runtime/os.hpp ---- openjdk/hotspot/src/share/vm/runtime/os.hpp Mon Mar 12 13:12:07 2012 -0700 -+++ openjdk/hotspot/src/share/vm/runtime/os.hpp Mon Mar 10 18:09:45 2014 +0000 -@@ -1,5 +1,5 @@ - /* -- * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. -+ * Copyright (c) 1997, 2013, 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 +diff -Nru openjdk.orig/hotspot/src/share/vm/runtime/os.hpp openjdk/hotspot/src/share/vm/runtime/os.hpp +--- openjdk.orig/hotspot/src/share/vm/runtime/os.hpp 2014-07-14 04:12:32.000000000 +0100 ++++ openjdk/hotspot/src/share/vm/runtime/os.hpp 2014-07-30 14:05:55.083844123 +0100 @@ -78,6 +78,10 @@ CriticalPriority = 11 // Critical thread priority }; @@ -816,9 +793,9 @@ static bool uncommit_memory(char* addr, size_t bytes); static bool release_memory(char* addr, size_t bytes); -diff -r 3f0dff7a9cf5 -r cbdd11a54b82 src/share/vm/runtime/virtualspace.cpp ---- openjdk/hotspot/src/share/vm/runtime/virtualspace.cpp Mon Mar 12 13:12:07 2012 -0700 -+++ openjdk/hotspot/src/share/vm/runtime/virtualspace.cpp Mon Mar 10 18:09:45 2014 +0000 +diff -Nru openjdk.orig/hotspot/src/share/vm/runtime/virtualspace.cpp openjdk/hotspot/src/share/vm/runtime/virtualspace.cpp +--- openjdk.orig/hotspot/src/share/vm/runtime/virtualspace.cpp 2014-07-14 04:12:32.000000000 +0100 ++++ openjdk/hotspot/src/share/vm/runtime/virtualspace.cpp 2014-07-30 14:05:55.083844123 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
--- a/patches/windows-awt.patch Tue Jul 29 01:20:12 2014 +0100 +++ b/patches/windows-awt.patch Wed Jul 30 14:41:18 2014 +0100 @@ -1,8 +1,7 @@ -diff --git a/jdk/src/windows/native/sun/windows/awt_Component.cpp b/jdk/src/windows/native/sun/windows/awt_Component.cpp -index 7490b4e..660efe7 100644 ---- openjdk.orig/jdk/src/windows/native/sun/windows/awt_Component.cpp -+++ openjdk/jdk/src/windows/native/sun/windows/awt_Component.cpp -@@ -218,6 +218,10 @@ static UINT lastShiftKeyPressed = 0; // init to safe value +diff -Nru openjdk.orig/jdk/src/windows/native/sun/windows/awt_Component.cpp openjdk/jdk/src/windows/native/sun/windows/awt_Component.cpp +--- openjdk.orig/jdk/src/windows/native/sun/windows/awt_Component.cpp 2014-07-30 13:59:59.346757023 +0100 ++++ openjdk/jdk/src/windows/native/sun/windows/awt_Component.cpp 2014-07-30 14:00:30.835207374 +0100 +@@ -224,6 +224,10 @@ // Added by waleed to initialize the RTL Flags BOOL AwtComponent::sm_rtl = PRIMARYLANGID(GetInputLanguage()) == LANG_ARABIC || PRIMARYLANGID(GetInputLanguage()) == LANG_HEBREW; @@ -13,11 +12,10 @@ BOOL AwtComponent::sm_rtlReadingOrder = PRIMARYLANGID(GetInputLanguage()) == LANG_ARABIC; -diff --git a/jdk/src/windows/native/sun/windows/awt_Component.h b/jdk/src/windows/native/sun/windows/awt_Component.h -index ac60aec..3d02235 100644 ---- openjdk.orig/jdk/src/windows/native/sun/windows/awt_Component.h -+++ openjdk/jdk/src/windows/native/sun/windows/awt_Component.h -@@ -423,6 +423,10 @@ public: +diff -Nru openjdk.orig/jdk/src/windows/native/sun/windows/awt_Component.h openjdk/jdk/src/windows/native/sun/windows/awt_Component.h +--- openjdk.orig/jdk/src/windows/native/sun/windows/awt_Component.h 2014-07-14 04:24:44.000000000 +0100 ++++ openjdk/jdk/src/windows/native/sun/windows/awt_Component.h 2014-07-30 14:00:30.835207374 +0100 +@@ -423,6 +423,10 @@ /* Functions for MouseWheel support on Windows95 * These should only be called if running on 95 */ @@ -28,7 +26,7 @@ /* Determines whether the component is obscured by another window */ // Called on Toolkit thread -@@ -718,6 +722,10 @@ protected: +@@ -718,6 +722,10 @@ virtual void SetDragCapture(UINT flags); virtual void ReleaseDragCapture(UINT flags); @@ -39,11 +37,10 @@ //These functions are overridden in AwtWindow to handle non-opaque windows. virtual void FillBackground(HDC hMemoryDC, SIZE &size); virtual void FillAlpha(void *bitmapBits, SIZE &size, BYTE alpha); -diff --git a/jdk/src/windows/native/sun/windows/awt_MMStub.h b/jdk/src/windows/native/sun/windows/awt_MMStub.h -index 802899b..18afeeb 100644 ---- openjdk.orig/jdk/src/windows/native/sun/windows/awt_MMStub.h -+++ openjdk/jdk/src/windows/native/sun/windows/awt_MMStub.h -@@ -74,6 +74,12 @@ extern "C" { +diff -Nru openjdk.orig/jdk/src/windows/native/sun/windows/awt_MMStub.h openjdk/jdk/src/windows/native/sun/windows/awt_MMStub.h +--- openjdk.orig/jdk/src/windows/native/sun/windows/awt_MMStub.h 2014-07-14 04:24:44.000000000 +0100 ++++ openjdk/jdk/src/windows/native/sun/windows/awt_MMStub.h 2014-07-30 14:02:35.312987552 +0100 +@@ -84,6 +84,12 @@ #define DEV_STR_LEN 128 @@ -54,9 +51,9 @@ + + // Datatypes - typedef HANDLE MHND; typedef BOOL (CALLBACK* MON_ENUM_CALLBACK_PROC)(MHND,HDC,LPRECT,LPARAM); -@@ -105,6 +111,15 @@ typedef struct tagDISPLAY_DEVICE + +@@ -114,6 +120,15 @@ WCHAR deviceKey[128]; } _DISPLAY_DEVICE, *P_DISPLAY_DEVICE; @@ -72,7 +69,7 @@ /* Basic API's */ BOOL WINAPI _enumDisplayMonitors(HDC,LPCRECT,MON_ENUM_CALLBACK_PROC,LPARAM); BOOL WINAPI _enumDisplayDevices (LPVOID,int,P_DISPLAY_DEVICE,DWORD); -@@ -122,6 +137,10 @@ HDC WINAPI _makeDCFromMonitor (MHND); +@@ -131,6 +146,10 @@ HWND WINAPI _createWindowOM (MHND,LPCTSTR,LPCTSTR,DWORD,int,int,int, int,HWND,HMENU,HANDLE,LPVOID); @@ -83,47 +80,14 @@ #ifdef __cplusplus } #endif /* __cplusplus */ -diff --git a/jdk/src/windows/native/sun/windows/awt_Toolkit.cpp b/jdk/src/windows/native/sun/windows/awt_Toolkit.cpp -index d407c92..940db1f 100644 ---- openjdk.orig/jdk/src/windows/native/sun/windows/awt_Toolkit.cpp -+++ openjdk/jdk/src/windows/native/sun/windows/awt_Toolkit.cpp -@@ -1602,13 +1602,13 @@ BOOL AwtToolkit::GetScreenInsets(int screenNum, RECT * rect) - } - /* if additional display */ - else { -- MONITORINFO *miInfo; -+ MONITOR_INFO *miInfo; - miInfo = AwtWin32GraphicsDevice::GetMonitorInfo(screenNum); - if (miInfo) { -- rect->top = miInfo->rcWork.top - miInfo->rcMonitor.top; -- rect->left = miInfo->rcWork.left - miInfo->rcMonitor.left; -- rect->bottom = miInfo->rcMonitor.bottom - miInfo->rcWork.bottom; -- rect->right = miInfo->rcMonitor.right - miInfo->rcWork.right; -+ rect->top = miInfo->rWork.top - miInfo->rMonitor.top; -+ rect->left = miInfo->rWork.left - miInfo->rMonitor.left; -+ rect->bottom = miInfo->rMonitor.bottom - miInfo->rWork.bottom; -+ rect->right = miInfo->rMonitor.right - miInfo->rWork.right; - return TRUE; - } - } -diff --git a/jdk/src/windows/native/sun/windows/awt_Window.cpp b/jdk/src/windows/native/sun/windows/awt_Window.cpp -index c7ead09..863967f 100644 ---- openjdk.orig/jdk/src/windows/native/sun/windows/awt_Window.cpp -+++ openjdk/jdk/src/windows/native/sun/windows/awt_Window.cpp -@@ -417,7 +417,7 @@ bool AwtWindow::IsWarningWindow(HWND hWnd) - return 0 == _tcsncmp(windowClassName, - AwtWindow::GetWarningWindowClassName(), len); - } --+ -+ - LRESULT CALLBACK AwtWindow::CBTFilter(int nCode, WPARAM wParam, LPARAM lParam) - { - if (nCode == HCBT_ACTIVATE || nCode == HCBT_SETFOCUS) { -@@ -703,7 +703,7 @@ void AwtWindow::CalculateWarningWindowBounds(JNIEnv *env, LPRECT rect) +diff -Nru openjdk.orig/jdk/src/windows/native/sun/windows/awt_Window.cpp openjdk/jdk/src/windows/native/sun/windows/awt_Window.cpp +--- openjdk.orig/jdk/src/windows/native/sun/windows/awt_Window.cpp 2014-07-14 04:24:44.000000000 +0100 ++++ openjdk/jdk/src/windows/native/sun/windows/awt_Window.cpp 2014-07-30 14:01:27.976024579 +0100 +@@ -709,7 +709,7 @@ y = min(y, windowBounds.bottom + (int)warningWindowHeight + 2); // Now make sure the warning window is visible on the screen -- HMONITOR hmon = MonitorFromWindow(GetHWnd(), MONITOR_DEFAULTTOPRIMARY); +- HMONITOR hmon = (HMONITOR)MonitorFromWindow(GetHWnd(), MONITOR_DEFAULTTOPRIMARY); + MHND hmon = MonitorFromWindow(GetHWnd(), MONITOR_DEFAULTTOPRIMARY); DASSERT(hmon != NULL);