From e049ef2f669615e7173aca58af81f1ab7532555e Mon Sep 17 00:00:00 2001 From: dz333 Date: Thu, 11 Oct 2018 16:43:01 -0400 Subject: [PATCH 1/3] fixing makefile bug and missing patch --- jdk/Makefile | 2 +- .../java/nio/charset/StandardCharsets.patch | 31 +++++++++++++++++-- 2 files changed, 29 insertions(+), 4 deletions(-) diff --git a/jdk/Makefile b/jdk/Makefile index d6e0c60f..47c7aab8 100644 --- a/jdk/Makefile +++ b/jdk/Makefile @@ -41,7 +41,7 @@ $(SRC)/patchstamp: | $(SRC) @rm -f tmp.txt; @date > $@ -$(CLASSES)/cstamp: | $(SRC) +$(CLASSES)/cstamp: $(SRC)/patchstamp $(SRC) @echo "Creating JDK class files" @mkdir -p $(CLASSES) @find $(SRC) -name "*.java" > all.txt diff --git a/jdk/patches/java/nio/charset/StandardCharsets.patch b/jdk/patches/java/nio/charset/StandardCharsets.patch index f6f7ffd4..a4978e8c 100644 --- a/jdk/patches/java/nio/charset/StandardCharsets.patch +++ b/jdk/patches/java/nio/charset/StandardCharsets.patch @@ -1,6 +1,12 @@ ---- src.orig/java/nio/charset/StandardCharsets.java 2018-07-23 14:01:15.000000000 -0400 -+++ src/java/nio/charset/StandardCharsets.java 2018-07-23 14:18:12.000000000 -0400 -@@ -41,26 +41,30 @@ +--- src.orig/java/nio/charset/StandardCharsets.java 2018-10-11 16:26:48.859620877 -0400 ++++ src/java/nio/charset/StandardCharsets.java 2018-10-11 16:32:21.167615891 -0400 +@@ -1,3 +1,5 @@ ++// This file's original contents have been modified ++// by a JLang patch on 2018-10-11 (the date this source code was compiled) + /* + * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. + * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. +@@ -41,26 +43,49 @@ * Seven-bit ASCII, a.k.a. ISO646-US, a.k.a. the Basic Latin block of the * Unicode character set */ @@ -20,6 +26,25 @@ + "UTF8", + "unicode-1-1-utf-8", + }; ++ ++ static final String[] aliases_ISO_8859_1 = new String[] { ++ "iso-ir-100", ++ "ISO_8859-1", ++ "latin1", ++ "l1", ++ "IBM819", ++ "cp819", ++ "csISOLatin1", ++ "819", ++ "IBM-819", ++ "ISO8859_1", ++ "ISO_8859-1:1987", ++ "ISO_8859_1", ++ "8859_1", ++ "ISO8859-1", ++ }; ++ ++ /** * Sixteen-bit UCS Transformation Format, big-endian byte order */ From c062afa16d18707c360b9cbc1235fb19dc125e41 Mon Sep 17 00:00:00 2001 From: dz333 Date: Tue, 30 Oct 2018 10:41:00 -0400 Subject: [PATCH 2/3] updating reflection tests to have stable ordering --- tests/isolated/FieldReflection.java | 10 ++++++++++ tests/isolated/MethodReflection.java | 14 +++++++++++++- 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/tests/isolated/FieldReflection.java b/tests/isolated/FieldReflection.java index b4efb042..64cd1923 100644 --- a/tests/isolated/FieldReflection.java +++ b/tests/isolated/FieldReflection.java @@ -1,5 +1,7 @@ import java.lang.reflect.Method; import java.lang.reflect.Field; +import java.util.Arrays; +import java.util.Comparator; public class FieldReflection { public int a; @@ -24,6 +26,7 @@ public static void main(String[] args) throws Exception { FieldReflection aaa = new FieldReflection(1534,2); Class cls = aaa.getClass(); Field[] f = cls.getDeclaredFields(); + Arrays.sort(f, new FieldComparator()); System.out.println(f.length); for (Field fld : f) { System.out.println(fld.getName()); @@ -39,4 +42,11 @@ public static void main(String[] args) throws Exception { s = "A string"; b = j; } + + public static class FieldComparator implements Comparator { + public int compare(Field f1, Field f2) { + return f1.getName().compareTo(f2.getName()); + } + + } } diff --git a/tests/isolated/MethodReflection.java b/tests/isolated/MethodReflection.java index 66975a30..ce916a32 100644 --- a/tests/isolated/MethodReflection.java +++ b/tests/isolated/MethodReflection.java @@ -1,11 +1,15 @@ import java.lang.reflect.Method; +import java.util.Arrays; +import java.util.Comparator; class MethodReflection { public static void main(String[] args) throws Exception { MethodReflection mr = new MethodReflection(); Class cls = mr.getClass(); + MethodComparator mc = new MethodComparator(); Method[] m = cls.getDeclaredMethods(); + Arrays.sort(m, mc); for (Method mtd : m) { if (mtd.getName().equals("")) continue; System.out.println(mtd.getName()); @@ -21,4 +25,12 @@ public String ll(String s) { return "Called LL with "+s; } -} \ No newline at end of file + public static class MethodComparator implements Comparator { + + public int compare(Method m1, Method m2) { + return m1.getName().compareTo(m2.getName()); + } + + } + +} From 68a87d32d0f965bdc99ec388532d3f746a50232a Mon Sep 17 00:00:00 2001 From: dz333 Date: Tue, 30 Oct 2018 18:29:20 -0400 Subject: [PATCH 3/3] polyglot updated to include modifiers code --- lib/polyglot | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/polyglot b/lib/polyglot index 2cf3bb81..2ff56c1a 160000 --- a/lib/polyglot +++ b/lib/polyglot @@ -1 +1 @@ -Subproject commit 2cf3bb81c4e35685a79429f7f1e7867e14947f80 +Subproject commit 2ff56c1aaa040a0ff5e751c63db6fc74d1ecc411