changeset 55605:ae761a408a0c intrinsics-project

removing additional code, non-intrinsifiable methods
author vromero
date Thu, 04 Apr 2019 13:59:25 -0400
parents b5db24d1f8b5
children 22234bf7809e
files src/java.base/share/classes/java/lang/invoke/FormatterBootstraps.java src/java.base/share/classes/java/lang/invoke/IntrinsicFactory.java src/jdk.compiler/share/classes/com/sun/tools/javac/intrinsics/FormatterProcessor.java test/jdk/java/util/Formatter/Basic-X.java.template test/jdk/java/util/Formatter/BasicBigDecimal.java test/jdk/java/util/Formatter/BasicBigInteger.java test/jdk/java/util/Formatter/BasicBoolean.java test/jdk/java/util/Formatter/BasicBooleanObject.java test/jdk/java/util/Formatter/BasicByte.java test/jdk/java/util/Formatter/BasicByteObject.java test/jdk/java/util/Formatter/BasicChar.java test/jdk/java/util/Formatter/BasicCharObject.java test/jdk/java/util/Formatter/BasicDateTime.java test/jdk/java/util/Formatter/BasicDouble.java test/jdk/java/util/Formatter/BasicDoubleObject.java test/jdk/java/util/Formatter/BasicFloat.java test/jdk/java/util/Formatter/BasicFloatObject.java test/jdk/java/util/Formatter/BasicInt.java test/jdk/java/util/Formatter/BasicIntObject.java test/jdk/java/util/Formatter/BasicLong.java test/jdk/java/util/Formatter/BasicLongObject.java test/jdk/java/util/Formatter/BasicShort.java test/jdk/java/util/Formatter/BasicShortObject.java test/jdk/java/util/Formatter/JavacIntrinsicsSupport.java
diffstat 24 files changed, 0 insertions(+), 924 deletions(-) [+]
line wrap: on
line diff
--- a/src/java.base/share/classes/java/lang/invoke/FormatterBootstraps.java	Wed Apr 03 22:29:40 2019 -0400
+++ b/src/java.base/share/classes/java/lang/invoke/FormatterBootstraps.java	Thu Apr 04 13:59:25 2019 -0400
@@ -59,14 +59,6 @@
  * <ul>
  *     <li>{@link Formatter#format(String, Object...)}</li>
  *     <li>{@link Formatter#format(Locale, String, Object...)}</li>
- *     <li>{@link java.io.PrintStream#format(String, Object...)}</li>
- *     <li>{@link java.io.PrintStream#format(Locale, String, Object...)}</li>
- *     <li>{@link java.io.PrintStream#printf(String, Object...)}</li>
- *     <li>{@link java.io.PrintStream#printf(Locale, String, Object...)}</li>
- *     <li>{@link java.io.PrintWriter#format(String, Object...)}</li>
- *     <li>{@link java.io.PrintWriter#format(Locale, String, Object...)}</li>
- *     <li>{@link java.io.PrintWriter#printf(String, Object...)}</li>
- *     <li>{@link java.io.PrintWriter#printf(Locale, String, Object...)}</li>
  *     <li>{@link String#format(String, Object...)}</li>
  *     <li>{@link String#format(Locale, String, Object...)}</li>
  * </ul>
--- a/src/java.base/share/classes/java/lang/invoke/IntrinsicFactory.java	Wed Apr 03 22:29:40 2019 -0400
+++ b/src/java.base/share/classes/java/lang/invoke/IntrinsicFactory.java	Thu Apr 04 13:59:25 2019 -0400
@@ -77,158 +77,6 @@
     }
 
     /**
-     * printStreamFormatBootstrap bootstrap.
-     * @param lookup      MethodHandles lookup
-     * @param name        Name of method
-     * @param methodType  Method signature
-     * @param format      Formatter format string
-     * @throws NoSuchMethodException no such method
-     * @throws IllegalAccessException illegal access
-     * @throws StringConcatException string concat error
-     * @return Callsite for intrinsic method
-     */
-    public static CallSite printStreamFormatBootstrap(MethodHandles.Lookup lookup,
-                                                      String name,
-                                                      MethodType methodType,
-                                                      String format)
-            throws NoSuchMethodException, IllegalAccessException, StringConcatException {
-        return FormatterBootstraps.formatterBootstrap(lookup, name, methodType, format, false, false);
-    }
-
-    /**
-     * printStreamLocaleFormatBootstrap bootstrap.
-     * @param lookup      MethodHandles lookup
-     * @param name        Name of method
-     * @param methodType  Method signature
-     * @param format      Formatter format string
-     * @throws NoSuchMethodException no such method
-     * @throws IllegalAccessException illegal access
-     * @throws StringConcatException string concat error
-     * @return Callsite for intrinsic method
-     */
-    public static CallSite printStreamLocaleFormatBootstrap(MethodHandles.Lookup lookup,
-                                                            String name,
-                                                            MethodType methodType,
-                                                            String format)
-            throws NoSuchMethodException, IllegalAccessException, StringConcatException {
-        return FormatterBootstraps.formatterBootstrap(lookup, name, methodType, format, false, true);
-    }
-
-    /**
-     * printStreamPrintfBootstrap bootstrap.
-     * @param lookup      MethodHandles lookup
-     * @param name        Name of method
-     * @param methodType  Method signature
-     * @param format      Formatter format string
-     * @throws NoSuchMethodException no such method
-     * @throws IllegalAccessException illegal access
-     * @throws StringConcatException string concat error
-     * @return Callsite for intrinsic method
-     */
-    public static CallSite printStreamPrintfBootstrap(MethodHandles.Lookup lookup,
-                                                      String name,
-                                                      MethodType methodType,
-                                                      String format)
-            throws NoSuchMethodException, IllegalAccessException, StringConcatException {
-        return FormatterBootstraps.formatterBootstrap(lookup, name, methodType, format, false, false);
-    }
-
-    /**
-     * printStreamLocalePrintfBootstrap bootstrap.
-     * @param lookup      MethodHandles lookup
-     * @param name        Name of method
-     * @param methodType  Method signature
-     * @param format      Formatter format string
-     * @throws NoSuchMethodException no such method
-     * @throws IllegalAccessException illegal access
-     * @throws StringConcatException string concat error
-     * @return Callsite for intrinsic method
-     */
-    public static CallSite printStreamLocalePrintfBootstrap(MethodHandles.Lookup lookup,
-                                                            String name,
-                                                            MethodType methodType,
-                                                            String format)
-            throws NoSuchMethodException, IllegalAccessException, StringConcatException {
-        return FormatterBootstraps.formatterBootstrap(lookup, name, methodType, format, false, true);
-    }
-
-    /**
-     * printWriterFormatBootstrap bootstrap.
-     * @param lookup      MethodHandles lookup
-     * @param name        Name of method
-     * @param methodType  Method signature
-     * @param format      Formatter format string
-     * @throws NoSuchMethodException no such method
-     * @throws IllegalAccessException illegal access
-     * @throws StringConcatException string concat error
-     * @return Callsite for intrinsic method
-     */
-    public static CallSite printWriterFormatBootstrap(MethodHandles.Lookup lookup,
-                                                      String name,
-                                                      MethodType methodType,
-                                                      String format)
-            throws NoSuchMethodException, IllegalAccessException, StringConcatException {
-        return FormatterBootstraps.formatterBootstrap(lookup, name, methodType, format, false, false);
-    }
-
-    /**
-     * printWriterLocaleFormatBootstrap bootstrap.
-     * @param lookup      MethodHandles lookup
-     * @param name        Name of method
-     * @param methodType  Method signature
-     * @param format      Formatter format string
-     * @throws NoSuchMethodException no such method
-     * @throws IllegalAccessException illegal access
-     * @throws StringConcatException string concat error
-     * @return Callsite for intrinsic method
-     */
-    public static CallSite printWriterLocaleFormatBootstrap(MethodHandles.Lookup lookup,
-                                                            String name,
-                                                            MethodType methodType,
-                                                            String format)
-            throws NoSuchMethodException, IllegalAccessException, StringConcatException {
-        return FormatterBootstraps.formatterBootstrap(lookup, name, methodType, format, false, true);
-    }
-
-    /**
-     * printWriterPrintfBootstrap bootstrap.
-     * @param lookup      MethodHandles lookup
-     * @param name        Name of method
-     * @param methodType  Method signature
-     * @param format      Formatter format string
-     * @throws NoSuchMethodException no such method
-     * @throws IllegalAccessException illegal access
-     * @throws StringConcatException string concat error
-     * @return Callsite for intrinsic method
-     */
-    public static CallSite printWriterPrintfBootstrap(MethodHandles.Lookup lookup,
-                                                      String name,
-                                                      MethodType methodType,
-                                                      String format)
-            throws NoSuchMethodException, IllegalAccessException, StringConcatException {
-        return FormatterBootstraps.formatterBootstrap(lookup, name, methodType, format, false, false);
-    }
-
-    /**
-     * printWriterLocalePrintfBootstrap bootstrap.
-     * @param lookup      MethodHandles lookup
-     * @param name        Name of method
-     * @param methodType  Method signature
-     * @param format      Formatter format string
-     * @throws NoSuchMethodException no such method
-     * @throws IllegalAccessException illegal access
-     * @throws StringConcatException string concat error
-     * @return Callsite for intrinsic method
-     */
-    public static CallSite printWriterLocalePrintfBootstrap(MethodHandles.Lookup lookup,
-                                                            String name,
-                                                            MethodType methodType,
-                                                            String format)
-            throws NoSuchMethodException, IllegalAccessException, StringConcatException {
-        return FormatterBootstraps.formatterBootstrap(lookup, name, methodType, format, false, true);
-    }
-
-    /**
      * staticStringFormatBootstrap bootstrap.
      * @param lookup      MethodHandles lookup
      * @param name        Name of method
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/intrinsics/FormatterProcessor.java	Wed Apr 03 22:29:40 2019 -0400
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/intrinsics/FormatterProcessor.java	Thu Apr 04 13:59:25 2019 -0400
@@ -25,8 +25,6 @@
 
 package com.sun.tools.javac.intrinsics;
 
-import java.io.PrintStream;
-import java.io.PrintWriter;
 import java.lang.constant.ClassDesc;
 import java.lang.constant.ConstantDesc;
 import java.lang.constant.ConstantDescs;
@@ -49,22 +47,6 @@
     public void register(Intrinsics intrinsics) {
         this.intrinsics = intrinsics;
         intrinsics.register(this,
-                PrintStream.class, "printf", PrintStream.class, String.class, Object[].class);
-        intrinsics.register(this,
-                PrintStream.class, "printf", PrintStream.class, Locale.class, String.class, Object[].class);
-        intrinsics.register(this,
-                PrintStream.class, "format", PrintStream.class, String.class, Object[].class);
-        intrinsics.register(this,
-                PrintStream.class, "format", PrintStream.class, Locale.class, String.class, Object[].class);
-        intrinsics.register(this,
-                PrintWriter.class, "printf", PrintWriter.class, String.class, Object[].class);
-        intrinsics.register(this,
-                PrintWriter.class, "printf", PrintWriter.class, Locale.class, String.class, Object[].class);
-        intrinsics.register(this,
-                PrintWriter.class, "format", PrintWriter.class, String.class, Object[].class);
-        intrinsics.register(this,
-                PrintWriter.class, "format", PrintWriter.class, Locale.class, String.class, Object[].class);
-        intrinsics.register(this,
                 String.class, "format", String.class, String.class, Object[].class);
         intrinsics.register(this,
                 String.class, "format", String.class, Locale.class, String.class, Object[].class);
--- a/test/jdk/java/util/Formatter/Basic-X.java.template	Wed Apr 03 22:29:40 2019 -0400
+++ b/test/jdk/java/util/Formatter/Basic-X.java.template	Thu Apr 04 13:59:25 2019 -0400
@@ -116,42 +116,6 @@
                 fail(fs, ex.getClass());
             }
         }
-        testSysOutIntrinsic(fs, exp, args);
-    }
-
-    private static void testSysOutIntrinsic(String fs, String exp, Object ... args) {
-        FileOutputStream fos = null;
-        FileInputStream fis = null;
-        try {
-            PrintStream saveOut = System.out;
-            fos = new FileOutputStream("testSysOut");
-            System.setOut(new PrintStream(fos));
-            JavacIntrinsicsSupport.printStreamFormat(System.out, Locale.US, fs, args);
-            fos.close();
-
-            fis = new FileInputStream("testSysOut");
-            byte [] ba = new byte[exp.length()];
-            int len = fis.read(ba);
-            String got = new String(ba);
-            if (len != ba.length)
-                fail(fs, exp, got);
-            ck(fs, exp, got);
-
-            System.setOut(saveOut);
-        } catch (FileNotFoundException ex) {
-            fail(fs, ex.getClass());
-        } catch (IOException ex) {
-            fail(fs, ex.getClass());
-        } finally {
-            try {
-                if (fos != null)
-                    fos.close();
-                if (fis != null)
-                    fis.close();
-            } catch (IOException ex) {
-                fail(fs, ex.getClass());
-            }
-        }
     }
 
     private static void tryCatch(String fs, Class<?> ex) {
--- a/test/jdk/java/util/Formatter/BasicBigDecimal.java	Wed Apr 03 22:29:40 2019 -0400
+++ b/test/jdk/java/util/Formatter/BasicBigDecimal.java	Thu Apr 04 13:59:25 2019 -0400
@@ -116,42 +116,6 @@
                 fail(fs, ex.getClass());
             }
         }
-        testSysOutIntrinsic(fs, exp, args);
-    }
-
-    private static void testSysOutIntrinsic(String fs, String exp, Object ... args) {
-        FileOutputStream fos = null;
-        FileInputStream fis = null;
-        try {
-            PrintStream saveOut = System.out;
-            fos = new FileOutputStream("testSysOut");
-            System.setOut(new PrintStream(fos));
-            JavacIntrinsicsSupport.printStreamFormat(System.out, Locale.US, fs, args);
-            fos.close();
-
-            fis = new FileInputStream("testSysOut");
-            byte [] ba = new byte[exp.length()];
-            int len = fis.read(ba);
-            String got = new String(ba);
-            if (len != ba.length)
-                fail(fs, exp, got);
-            ck(fs, exp, got);
-
-            System.setOut(saveOut);
-        } catch (FileNotFoundException ex) {
-            fail(fs, ex.getClass());
-        } catch (IOException ex) {
-            fail(fs, ex.getClass());
-        } finally {
-            try {
-                if (fos != null)
-                    fos.close();
-                if (fis != null)
-                    fis.close();
-            } catch (IOException ex) {
-                fail(fs, ex.getClass());
-            }
-        }
     }
 
     private static void tryCatch(String fs, Class<?> ex) {
--- a/test/jdk/java/util/Formatter/BasicBigInteger.java	Wed Apr 03 22:29:40 2019 -0400
+++ b/test/jdk/java/util/Formatter/BasicBigInteger.java	Thu Apr 04 13:59:25 2019 -0400
@@ -116,42 +116,6 @@
                 fail(fs, ex.getClass());
             }
         }
-        testSysOutIntrinsic(fs, exp, args);
-    }
-
-    private static void testSysOutIntrinsic(String fs, String exp, Object ... args) {
-        FileOutputStream fos = null;
-        FileInputStream fis = null;
-        try {
-            PrintStream saveOut = System.out;
-            fos = new FileOutputStream("testSysOut");
-            System.setOut(new PrintStream(fos));
-            JavacIntrinsicsSupport.printStreamFormat(System.out, Locale.US, fs, args);
-            fos.close();
-
-            fis = new FileInputStream("testSysOut");
-            byte [] ba = new byte[exp.length()];
-            int len = fis.read(ba);
-            String got = new String(ba);
-            if (len != ba.length)
-                fail(fs, exp, got);
-            ck(fs, exp, got);
-
-            System.setOut(saveOut);
-        } catch (FileNotFoundException ex) {
-            fail(fs, ex.getClass());
-        } catch (IOException ex) {
-            fail(fs, ex.getClass());
-        } finally {
-            try {
-                if (fos != null)
-                    fos.close();
-                if (fis != null)
-                    fis.close();
-            } catch (IOException ex) {
-                fail(fs, ex.getClass());
-            }
-        }
     }
 
     private static void tryCatch(String fs, Class<?> ex) {
--- a/test/jdk/java/util/Formatter/BasicBoolean.java	Wed Apr 03 22:29:40 2019 -0400
+++ b/test/jdk/java/util/Formatter/BasicBoolean.java	Thu Apr 04 13:59:25 2019 -0400
@@ -116,42 +116,6 @@
                 fail(fs, ex.getClass());
             }
         }
-        testSysOutIntrinsic(fs, exp, args);
-    }
-
-    private static void testSysOutIntrinsic(String fs, String exp, Object ... args) {
-        FileOutputStream fos = null;
-        FileInputStream fis = null;
-        try {
-            PrintStream saveOut = System.out;
-            fos = new FileOutputStream("testSysOut");
-            System.setOut(new PrintStream(fos));
-            JavacIntrinsicsSupport.printStreamFormat(System.out, Locale.US, fs, args);
-            fos.close();
-
-            fis = new FileInputStream("testSysOut");
-            byte [] ba = new byte[exp.length()];
-            int len = fis.read(ba);
-            String got = new String(ba);
-            if (len != ba.length)
-                fail(fs, exp, got);
-            ck(fs, exp, got);
-
-            System.setOut(saveOut);
-        } catch (FileNotFoundException ex) {
-            fail(fs, ex.getClass());
-        } catch (IOException ex) {
-            fail(fs, ex.getClass());
-        } finally {
-            try {
-                if (fos != null)
-                    fos.close();
-                if (fis != null)
-                    fis.close();
-            } catch (IOException ex) {
-                fail(fs, ex.getClass());
-            }
-        }
     }
 
     private static void tryCatch(String fs, Class<?> ex) {
--- a/test/jdk/java/util/Formatter/BasicBooleanObject.java	Wed Apr 03 22:29:40 2019 -0400
+++ b/test/jdk/java/util/Formatter/BasicBooleanObject.java	Thu Apr 04 13:59:25 2019 -0400
@@ -116,42 +116,6 @@
                 fail(fs, ex.getClass());
             }
         }
-        testSysOutIntrinsic(fs, exp, args);
-    }
-
-    private static void testSysOutIntrinsic(String fs, String exp, Object ... args) {
-        FileOutputStream fos = null;
-        FileInputStream fis = null;
-        try {
-            PrintStream saveOut = System.out;
-            fos = new FileOutputStream("testSysOut");
-            System.setOut(new PrintStream(fos));
-            JavacIntrinsicsSupport.printStreamFormat(System.out, Locale.US, fs, args);
-            fos.close();
-
-            fis = new FileInputStream("testSysOut");
-            byte [] ba = new byte[exp.length()];
-            int len = fis.read(ba);
-            String got = new String(ba);
-            if (len != ba.length)
-                fail(fs, exp, got);
-            ck(fs, exp, got);
-
-            System.setOut(saveOut);
-        } catch (FileNotFoundException ex) {
-            fail(fs, ex.getClass());
-        } catch (IOException ex) {
-            fail(fs, ex.getClass());
-        } finally {
-            try {
-                if (fos != null)
-                    fos.close();
-                if (fis != null)
-                    fis.close();
-            } catch (IOException ex) {
-                fail(fs, ex.getClass());
-            }
-        }
     }
 
     private static void tryCatch(String fs, Class<?> ex) {
--- a/test/jdk/java/util/Formatter/BasicByte.java	Wed Apr 03 22:29:40 2019 -0400
+++ b/test/jdk/java/util/Formatter/BasicByte.java	Thu Apr 04 13:59:25 2019 -0400
@@ -116,42 +116,6 @@
                 fail(fs, ex.getClass());
             }
         }
-        testSysOutIntrinsic(fs, exp, args);
-    }
-
-    private static void testSysOutIntrinsic(String fs, String exp, Object ... args) {
-        FileOutputStream fos = null;
-        FileInputStream fis = null;
-        try {
-            PrintStream saveOut = System.out;
-            fos = new FileOutputStream("testSysOut");
-            System.setOut(new PrintStream(fos));
-            JavacIntrinsicsSupport.printStreamFormat(System.out, Locale.US, fs, args);
-            fos.close();
-
-            fis = new FileInputStream("testSysOut");
-            byte [] ba = new byte[exp.length()];
-            int len = fis.read(ba);
-            String got = new String(ba);
-            if (len != ba.length)
-                fail(fs, exp, got);
-            ck(fs, exp, got);
-
-            System.setOut(saveOut);
-        } catch (FileNotFoundException ex) {
-            fail(fs, ex.getClass());
-        } catch (IOException ex) {
-            fail(fs, ex.getClass());
-        } finally {
-            try {
-                if (fos != null)
-                    fos.close();
-                if (fis != null)
-                    fis.close();
-            } catch (IOException ex) {
-                fail(fs, ex.getClass());
-            }
-        }
     }
 
     private static void tryCatch(String fs, Class<?> ex) {
--- a/test/jdk/java/util/Formatter/BasicByteObject.java	Wed Apr 03 22:29:40 2019 -0400
+++ b/test/jdk/java/util/Formatter/BasicByteObject.java	Thu Apr 04 13:59:25 2019 -0400
@@ -116,42 +116,6 @@
                 fail(fs, ex.getClass());
             }
         }
-        testSysOutIntrinsic(fs, exp, args);
-    }
-
-    private static void testSysOutIntrinsic(String fs, String exp, Object ... args) {
-        FileOutputStream fos = null;
-        FileInputStream fis = null;
-        try {
-            PrintStream saveOut = System.out;
-            fos = new FileOutputStream("testSysOut");
-            System.setOut(new PrintStream(fos));
-            JavacIntrinsicsSupport.printStreamFormat(System.out, Locale.US, fs, args);
-            fos.close();
-
-            fis = new FileInputStream("testSysOut");
-            byte [] ba = new byte[exp.length()];
-            int len = fis.read(ba);
-            String got = new String(ba);
-            if (len != ba.length)
-                fail(fs, exp, got);
-            ck(fs, exp, got);
-
-            System.setOut(saveOut);
-        } catch (FileNotFoundException ex) {
-            fail(fs, ex.getClass());
-        } catch (IOException ex) {
-            fail(fs, ex.getClass());
-        } finally {
-            try {
-                if (fos != null)
-                    fos.close();
-                if (fis != null)
-                    fis.close();
-            } catch (IOException ex) {
-                fail(fs, ex.getClass());
-            }
-        }
     }
 
     private static void tryCatch(String fs, Class<?> ex) {
--- a/test/jdk/java/util/Formatter/BasicChar.java	Wed Apr 03 22:29:40 2019 -0400
+++ b/test/jdk/java/util/Formatter/BasicChar.java	Thu Apr 04 13:59:25 2019 -0400
@@ -116,42 +116,6 @@
                 fail(fs, ex.getClass());
             }
         }
-        testSysOutIntrinsic(fs, exp, args);
-    }
-
-    private static void testSysOutIntrinsic(String fs, String exp, Object ... args) {
-        FileOutputStream fos = null;
-        FileInputStream fis = null;
-        try {
-            PrintStream saveOut = System.out;
-            fos = new FileOutputStream("testSysOut");
-            System.setOut(new PrintStream(fos));
-            JavacIntrinsicsSupport.printStreamFormat(System.out, Locale.US, fs, args);
-            fos.close();
-
-            fis = new FileInputStream("testSysOut");
-            byte [] ba = new byte[exp.length()];
-            int len = fis.read(ba);
-            String got = new String(ba);
-            if (len != ba.length)
-                fail(fs, exp, got);
-            ck(fs, exp, got);
-
-            System.setOut(saveOut);
-        } catch (FileNotFoundException ex) {
-            fail(fs, ex.getClass());
-        } catch (IOException ex) {
-            fail(fs, ex.getClass());
-        } finally {
-            try {
-                if (fos != null)
-                    fos.close();
-                if (fis != null)
-                    fis.close();
-            } catch (IOException ex) {
-                fail(fs, ex.getClass());
-            }
-        }
     }
 
     private static void tryCatch(String fs, Class<?> ex) {
--- a/test/jdk/java/util/Formatter/BasicCharObject.java	Wed Apr 03 22:29:40 2019 -0400
+++ b/test/jdk/java/util/Formatter/BasicCharObject.java	Thu Apr 04 13:59:25 2019 -0400
@@ -116,42 +116,6 @@
                 fail(fs, ex.getClass());
             }
         }
-        testSysOutIntrinsic(fs, exp, args);
-    }
-
-    private static void testSysOutIntrinsic(String fs, String exp, Object ... args) {
-        FileOutputStream fos = null;
-        FileInputStream fis = null;
-        try {
-            PrintStream saveOut = System.out;
-            fos = new FileOutputStream("testSysOut");
-            System.setOut(new PrintStream(fos));
-            JavacIntrinsicsSupport.printStreamFormat(System.out, Locale.US, fs, args);
-            fos.close();
-
-            fis = new FileInputStream("testSysOut");
-            byte [] ba = new byte[exp.length()];
-            int len = fis.read(ba);
-            String got = new String(ba);
-            if (len != ba.length)
-                fail(fs, exp, got);
-            ck(fs, exp, got);
-
-            System.setOut(saveOut);
-        } catch (FileNotFoundException ex) {
-            fail(fs, ex.getClass());
-        } catch (IOException ex) {
-            fail(fs, ex.getClass());
-        } finally {
-            try {
-                if (fos != null)
-                    fos.close();
-                if (fis != null)
-                    fis.close();
-            } catch (IOException ex) {
-                fail(fs, ex.getClass());
-            }
-        }
     }
 
     private static void tryCatch(String fs, Class<?> ex) {
--- a/test/jdk/java/util/Formatter/BasicDateTime.java	Wed Apr 03 22:29:40 2019 -0400
+++ b/test/jdk/java/util/Formatter/BasicDateTime.java	Thu Apr 04 13:59:25 2019 -0400
@@ -116,42 +116,6 @@
                 fail(fs, ex.getClass());
             }
         }
-        testSysOutIntrinsic(fs, exp, args);
-    }
-
-    private static void testSysOutIntrinsic(String fs, String exp, Object ... args) {
-        FileOutputStream fos = null;
-        FileInputStream fis = null;
-        try {
-            PrintStream saveOut = System.out;
-            fos = new FileOutputStream("testSysOut");
-            System.setOut(new PrintStream(fos));
-            JavacIntrinsicsSupport.printStreamFormat(System.out, Locale.US, fs, args);
-            fos.close();
-
-            fis = new FileInputStream("testSysOut");
-            byte [] ba = new byte[exp.length()];
-            int len = fis.read(ba);
-            String got = new String(ba);
-            if (len != ba.length)
-                fail(fs, exp, got);
-            ck(fs, exp, got);
-
-            System.setOut(saveOut);
-        } catch (FileNotFoundException ex) {
-            fail(fs, ex.getClass());
-        } catch (IOException ex) {
-            fail(fs, ex.getClass());
-        } finally {
-            try {
-                if (fos != null)
-                    fos.close();
-                if (fis != null)
-                    fis.close();
-            } catch (IOException ex) {
-                fail(fs, ex.getClass());
-            }
-        }
     }
 
     private static void tryCatch(String fs, Class<?> ex) {
--- a/test/jdk/java/util/Formatter/BasicDouble.java	Wed Apr 03 22:29:40 2019 -0400
+++ b/test/jdk/java/util/Formatter/BasicDouble.java	Thu Apr 04 13:59:25 2019 -0400
@@ -116,42 +116,6 @@
                 fail(fs, ex.getClass());
             }
         }
-        testSysOutIntrinsic(fs, exp, args);
-    }
-
-    private static void testSysOutIntrinsic(String fs, String exp, Object ... args) {
-        FileOutputStream fos = null;
-        FileInputStream fis = null;
-        try {
-            PrintStream saveOut = System.out;
-            fos = new FileOutputStream("testSysOut");
-            System.setOut(new PrintStream(fos));
-            JavacIntrinsicsSupport.printStreamFormat(System.out, Locale.US, fs, args);
-            fos.close();
-
-            fis = new FileInputStream("testSysOut");
-            byte [] ba = new byte[exp.length()];
-            int len = fis.read(ba);
-            String got = new String(ba);
-            if (len != ba.length)
-                fail(fs, exp, got);
-            ck(fs, exp, got);
-
-            System.setOut(saveOut);
-        } catch (FileNotFoundException ex) {
-            fail(fs, ex.getClass());
-        } catch (IOException ex) {
-            fail(fs, ex.getClass());
-        } finally {
-            try {
-                if (fos != null)
-                    fos.close();
-                if (fis != null)
-                    fis.close();
-            } catch (IOException ex) {
-                fail(fs, ex.getClass());
-            }
-        }
     }
 
     private static void tryCatch(String fs, Class<?> ex) {
--- a/test/jdk/java/util/Formatter/BasicDoubleObject.java	Wed Apr 03 22:29:40 2019 -0400
+++ b/test/jdk/java/util/Formatter/BasicDoubleObject.java	Thu Apr 04 13:59:25 2019 -0400
@@ -116,42 +116,6 @@
                 fail(fs, ex.getClass());
             }
         }
-        testSysOutIntrinsic(fs, exp, args);
-    }
-
-    private static void testSysOutIntrinsic(String fs, String exp, Object ... args) {
-        FileOutputStream fos = null;
-        FileInputStream fis = null;
-        try {
-            PrintStream saveOut = System.out;
-            fos = new FileOutputStream("testSysOut");
-            System.setOut(new PrintStream(fos));
-            JavacIntrinsicsSupport.printStreamFormat(System.out, Locale.US, fs, args);
-            fos.close();
-
-            fis = new FileInputStream("testSysOut");
-            byte [] ba = new byte[exp.length()];
-            int len = fis.read(ba);
-            String got = new String(ba);
-            if (len != ba.length)
-                fail(fs, exp, got);
-            ck(fs, exp, got);
-
-            System.setOut(saveOut);
-        } catch (FileNotFoundException ex) {
-            fail(fs, ex.getClass());
-        } catch (IOException ex) {
-            fail(fs, ex.getClass());
-        } finally {
-            try {
-                if (fos != null)
-                    fos.close();
-                if (fis != null)
-                    fis.close();
-            } catch (IOException ex) {
-                fail(fs, ex.getClass());
-            }
-        }
     }
 
     private static void tryCatch(String fs, Class<?> ex) {
--- a/test/jdk/java/util/Formatter/BasicFloat.java	Wed Apr 03 22:29:40 2019 -0400
+++ b/test/jdk/java/util/Formatter/BasicFloat.java	Thu Apr 04 13:59:25 2019 -0400
@@ -116,42 +116,6 @@
                 fail(fs, ex.getClass());
             }
         }
-        testSysOutIntrinsic(fs, exp, args);
-    }
-
-    private static void testSysOutIntrinsic(String fs, String exp, Object ... args) {
-        FileOutputStream fos = null;
-        FileInputStream fis = null;
-        try {
-            PrintStream saveOut = System.out;
-            fos = new FileOutputStream("testSysOut");
-            System.setOut(new PrintStream(fos));
-            JavacIntrinsicsSupport.printStreamFormat(System.out, Locale.US, fs, args);
-            fos.close();
-
-            fis = new FileInputStream("testSysOut");
-            byte [] ba = new byte[exp.length()];
-            int len = fis.read(ba);
-            String got = new String(ba);
-            if (len != ba.length)
-                fail(fs, exp, got);
-            ck(fs, exp, got);
-
-            System.setOut(saveOut);
-        } catch (FileNotFoundException ex) {
-            fail(fs, ex.getClass());
-        } catch (IOException ex) {
-            fail(fs, ex.getClass());
-        } finally {
-            try {
-                if (fos != null)
-                    fos.close();
-                if (fis != null)
-                    fis.close();
-            } catch (IOException ex) {
-                fail(fs, ex.getClass());
-            }
-        }
     }
 
     private static void tryCatch(String fs, Class<?> ex) {
--- a/test/jdk/java/util/Formatter/BasicFloatObject.java	Wed Apr 03 22:29:40 2019 -0400
+++ b/test/jdk/java/util/Formatter/BasicFloatObject.java	Thu Apr 04 13:59:25 2019 -0400
@@ -116,42 +116,6 @@
                 fail(fs, ex.getClass());
             }
         }
-        testSysOutIntrinsic(fs, exp, args);
-    }
-
-    private static void testSysOutIntrinsic(String fs, String exp, Object ... args) {
-        FileOutputStream fos = null;
-        FileInputStream fis = null;
-        try {
-            PrintStream saveOut = System.out;
-            fos = new FileOutputStream("testSysOut");
-            System.setOut(new PrintStream(fos));
-            JavacIntrinsicsSupport.printStreamFormat(System.out, Locale.US, fs, args);
-            fos.close();
-
-            fis = new FileInputStream("testSysOut");
-            byte [] ba = new byte[exp.length()];
-            int len = fis.read(ba);
-            String got = new String(ba);
-            if (len != ba.length)
-                fail(fs, exp, got);
-            ck(fs, exp, got);
-
-            System.setOut(saveOut);
-        } catch (FileNotFoundException ex) {
-            fail(fs, ex.getClass());
-        } catch (IOException ex) {
-            fail(fs, ex.getClass());
-        } finally {
-            try {
-                if (fos != null)
-                    fos.close();
-                if (fis != null)
-                    fis.close();
-            } catch (IOException ex) {
-                fail(fs, ex.getClass());
-            }
-        }
     }
 
     private static void tryCatch(String fs, Class<?> ex) {
--- a/test/jdk/java/util/Formatter/BasicInt.java	Wed Apr 03 22:29:40 2019 -0400
+++ b/test/jdk/java/util/Formatter/BasicInt.java	Thu Apr 04 13:59:25 2019 -0400
@@ -116,42 +116,6 @@
                 fail(fs, ex.getClass());
             }
         }
-        testSysOutIntrinsic(fs, exp, args);
-    }
-
-    private static void testSysOutIntrinsic(String fs, String exp, Object ... args) {
-        FileOutputStream fos = null;
-        FileInputStream fis = null;
-        try {
-            PrintStream saveOut = System.out;
-            fos = new FileOutputStream("testSysOut");
-            System.setOut(new PrintStream(fos));
-            JavacIntrinsicsSupport.printStreamFormat(System.out, Locale.US, fs, args);
-            fos.close();
-
-            fis = new FileInputStream("testSysOut");
-            byte [] ba = new byte[exp.length()];
-            int len = fis.read(ba);
-            String got = new String(ba);
-            if (len != ba.length)
-                fail(fs, exp, got);
-            ck(fs, exp, got);
-
-            System.setOut(saveOut);
-        } catch (FileNotFoundException ex) {
-            fail(fs, ex.getClass());
-        } catch (IOException ex) {
-            fail(fs, ex.getClass());
-        } finally {
-            try {
-                if (fos != null)
-                    fos.close();
-                if (fis != null)
-                    fis.close();
-            } catch (IOException ex) {
-                fail(fs, ex.getClass());
-            }
-        }
     }
 
     private static void tryCatch(String fs, Class<?> ex) {
--- a/test/jdk/java/util/Formatter/BasicIntObject.java	Wed Apr 03 22:29:40 2019 -0400
+++ b/test/jdk/java/util/Formatter/BasicIntObject.java	Thu Apr 04 13:59:25 2019 -0400
@@ -116,42 +116,6 @@
                 fail(fs, ex.getClass());
             }
         }
-        testSysOutIntrinsic(fs, exp, args);
-    }
-
-    private static void testSysOutIntrinsic(String fs, String exp, Object ... args) {
-        FileOutputStream fos = null;
-        FileInputStream fis = null;
-        try {
-            PrintStream saveOut = System.out;
-            fos = new FileOutputStream("testSysOut");
-            System.setOut(new PrintStream(fos));
-            JavacIntrinsicsSupport.printStreamFormat(System.out, Locale.US, fs, args);
-            fos.close();
-
-            fis = new FileInputStream("testSysOut");
-            byte [] ba = new byte[exp.length()];
-            int len = fis.read(ba);
-            String got = new String(ba);
-            if (len != ba.length)
-                fail(fs, exp, got);
-            ck(fs, exp, got);
-
-            System.setOut(saveOut);
-        } catch (FileNotFoundException ex) {
-            fail(fs, ex.getClass());
-        } catch (IOException ex) {
-            fail(fs, ex.getClass());
-        } finally {
-            try {
-                if (fos != null)
-                    fos.close();
-                if (fis != null)
-                    fis.close();
-            } catch (IOException ex) {
-                fail(fs, ex.getClass());
-            }
-        }
     }
 
     private static void tryCatch(String fs, Class<?> ex) {
--- a/test/jdk/java/util/Formatter/BasicLong.java	Wed Apr 03 22:29:40 2019 -0400
+++ b/test/jdk/java/util/Formatter/BasicLong.java	Thu Apr 04 13:59:25 2019 -0400
@@ -116,42 +116,6 @@
                 fail(fs, ex.getClass());
             }
         }
-        testSysOutIntrinsic(fs, exp, args);
-    }
-
-    private static void testSysOutIntrinsic(String fs, String exp, Object ... args) {
-        FileOutputStream fos = null;
-        FileInputStream fis = null;
-        try {
-            PrintStream saveOut = System.out;
-            fos = new FileOutputStream("testSysOut");
-            System.setOut(new PrintStream(fos));
-            JavacIntrinsicsSupport.printStreamFormat(System.out, Locale.US, fs, args);
-            fos.close();
-
-            fis = new FileInputStream("testSysOut");
-            byte [] ba = new byte[exp.length()];
-            int len = fis.read(ba);
-            String got = new String(ba);
-            if (len != ba.length)
-                fail(fs, exp, got);
-            ck(fs, exp, got);
-
-            System.setOut(saveOut);
-        } catch (FileNotFoundException ex) {
-            fail(fs, ex.getClass());
-        } catch (IOException ex) {
-            fail(fs, ex.getClass());
-        } finally {
-            try {
-                if (fos != null)
-                    fos.close();
-                if (fis != null)
-                    fis.close();
-            } catch (IOException ex) {
-                fail(fs, ex.getClass());
-            }
-        }
     }
 
     private static void tryCatch(String fs, Class<?> ex) {
--- a/test/jdk/java/util/Formatter/BasicLongObject.java	Wed Apr 03 22:29:40 2019 -0400
+++ b/test/jdk/java/util/Formatter/BasicLongObject.java	Thu Apr 04 13:59:25 2019 -0400
@@ -116,42 +116,6 @@
                 fail(fs, ex.getClass());
             }
         }
-        testSysOutIntrinsic(fs, exp, args);
-    }
-
-    private static void testSysOutIntrinsic(String fs, String exp, Object ... args) {
-        FileOutputStream fos = null;
-        FileInputStream fis = null;
-        try {
-            PrintStream saveOut = System.out;
-            fos = new FileOutputStream("testSysOut");
-            System.setOut(new PrintStream(fos));
-            JavacIntrinsicsSupport.printStreamFormat(System.out, Locale.US, fs, args);
-            fos.close();
-
-            fis = new FileInputStream("testSysOut");
-            byte [] ba = new byte[exp.length()];
-            int len = fis.read(ba);
-            String got = new String(ba);
-            if (len != ba.length)
-                fail(fs, exp, got);
-            ck(fs, exp, got);
-
-            System.setOut(saveOut);
-        } catch (FileNotFoundException ex) {
-            fail(fs, ex.getClass());
-        } catch (IOException ex) {
-            fail(fs, ex.getClass());
-        } finally {
-            try {
-                if (fos != null)
-                    fos.close();
-                if (fis != null)
-                    fis.close();
-            } catch (IOException ex) {
-                fail(fs, ex.getClass());
-            }
-        }
     }
 
     private static void tryCatch(String fs, Class<?> ex) {
--- a/test/jdk/java/util/Formatter/BasicShort.java	Wed Apr 03 22:29:40 2019 -0400
+++ b/test/jdk/java/util/Formatter/BasicShort.java	Thu Apr 04 13:59:25 2019 -0400
@@ -116,42 +116,6 @@
                 fail(fs, ex.getClass());
             }
         }
-        testSysOutIntrinsic(fs, exp, args);
-    }
-
-    private static void testSysOutIntrinsic(String fs, String exp, Object ... args) {
-        FileOutputStream fos = null;
-        FileInputStream fis = null;
-        try {
-            PrintStream saveOut = System.out;
-            fos = new FileOutputStream("testSysOut");
-            System.setOut(new PrintStream(fos));
-            JavacIntrinsicsSupport.printStreamFormat(System.out, Locale.US, fs, args);
-            fos.close();
-
-            fis = new FileInputStream("testSysOut");
-            byte [] ba = new byte[exp.length()];
-            int len = fis.read(ba);
-            String got = new String(ba);
-            if (len != ba.length)
-                fail(fs, exp, got);
-            ck(fs, exp, got);
-
-            System.setOut(saveOut);
-        } catch (FileNotFoundException ex) {
-            fail(fs, ex.getClass());
-        } catch (IOException ex) {
-            fail(fs, ex.getClass());
-        } finally {
-            try {
-                if (fos != null)
-                    fos.close();
-                if (fis != null)
-                    fis.close();
-            } catch (IOException ex) {
-                fail(fs, ex.getClass());
-            }
-        }
     }
 
     private static void tryCatch(String fs, Class<?> ex) {
--- a/test/jdk/java/util/Formatter/BasicShortObject.java	Wed Apr 03 22:29:40 2019 -0400
+++ b/test/jdk/java/util/Formatter/BasicShortObject.java	Thu Apr 04 13:59:25 2019 -0400
@@ -116,42 +116,6 @@
                 fail(fs, ex.getClass());
             }
         }
-        testSysOutIntrinsic(fs, exp, args);
-    }
-
-    private static void testSysOutIntrinsic(String fs, String exp, Object ... args) {
-        FileOutputStream fos = null;
-        FileInputStream fis = null;
-        try {
-            PrintStream saveOut = System.out;
-            fos = new FileOutputStream("testSysOut");
-            System.setOut(new PrintStream(fos));
-            JavacIntrinsicsSupport.printStreamFormat(System.out, Locale.US, fs, args);
-            fos.close();
-
-            fis = new FileInputStream("testSysOut");
-            byte [] ba = new byte[exp.length()];
-            int len = fis.read(ba);
-            String got = new String(ba);
-            if (len != ba.length)
-                fail(fs, exp, got);
-            ck(fs, exp, got);
-
-            System.setOut(saveOut);
-        } catch (FileNotFoundException ex) {
-            fail(fs, ex.getClass());
-        } catch (IOException ex) {
-            fail(fs, ex.getClass());
-        } finally {
-            try {
-                if (fos != null)
-                    fos.close();
-                if (fis != null)
-                    fis.close();
-            } catch (IOException ex) {
-                fail(fs, ex.getClass());
-            }
-        }
     }
 
     private static void tryCatch(String fs, Class<?> ex) {
--- a/test/jdk/java/util/Formatter/JavacIntrinsicsSupport.java	Wed Apr 03 22:29:40 2019 -0400
+++ b/test/jdk/java/util/Formatter/JavacIntrinsicsSupport.java	Thu Apr 04 13:59:25 2019 -0400
@@ -149,32 +149,6 @@
         }
     }
 
-    static PrintStream printStreamFormat(PrintStream ps, Locale l, String fs, Object... args) {
-        CallSite cs;
-        List<Object> invokeArgs;
-        try {
-            cs = IntrinsicFactory.printStreamLocaleFormatBootstrap(MethodHandles.lookup(), "format",
-                    getPrintStreamFormatMethodType(args), fs);
-            invokeArgs = new ArrayList<>();
-            invokeArgs.add(ps);
-            invokeArgs.add(l);
-            if (args != null) {
-                Collections.addAll(invokeArgs, args);
-            } else {
-                invokeArgs.add(null);
-            }
-        } catch (Throwable t) {
-            throw new BootstrapMethodError(t);
-        }
-        try {
-            return (PrintStream) cs.dynamicInvoker().invokeWithArguments(invokeArgs);
-        } catch (RuntimeException r) {
-            throw r;
-        } catch (Throwable t) {
-            throw new RuntimeException(t);
-        }
-    }
-
     private static MethodType getFormatterFormatMethodType(boolean hasLocale, Object... args) {
         MethodType mt = MethodType.methodType(Formatter.class, Formatter.class);
         if (hasLocale) {