changeset 60098:50425523a350 patterns-stage-2

Cleanup - undoing unnecessary changes
author jlahoda
date Wed, 04 Mar 2020 16:48:46 +0100
parents f9a8545546ae
children 647643a62daf 80f6919b6aff
files make/CompileInterimLangtools.gmk src/jdk.compiler/share/classes/com/sun/source/tree/AnyPatternTree.java src/jdk.compiler/share/classes/com/sun/source/tree/Tree.java src/jdk.compiler/share/classes/com/sun/source/tree/TreeVisitor.java src/jdk.compiler/share/classes/com/sun/source/util/SimpleTreeVisitor.java src/jdk.compiler/share/classes/com/sun/source/util/TreeScanner.java src/jdk.compiler/share/classes/com/sun/tools/javac/code/Symtab.java src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Attr.java src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Flow.java src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Lower.java src/jdk.compiler/share/classes/com/sun/tools/javac/comp/TransPatterns.java src/jdk.compiler/share/classes/com/sun/tools/javac/comp/TypeEnter.java src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/ClassReader.java src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/ClassWriter.java src/jdk.compiler/share/classes/com/sun/tools/javac/parser/JavacParser.java src/jdk.compiler/share/classes/com/sun/tools/javac/tree/JCTree.java src/jdk.compiler/share/classes/com/sun/tools/javac/tree/TreeCopier.java src/jdk.compiler/share/classes/com/sun/tools/javac/tree/TreeMaker.java src/jdk.compiler/share/classes/com/sun/tools/javac/tree/TreeScanner.java src/jdk.compiler/share/classes/com/sun/tools/javac/tree/TreeTranslator.java src/jdk.compiler/share/classes/com/sun/tools/javac/util/Names.java
diffstat 21 files changed, 3 insertions(+), 280 deletions(-) [+]
line wrap: on
line diff
--- a/make/CompileInterimLangtools.gmk	Thu Feb 13 22:05:11 2020 +0000
+++ b/make/CompileInterimLangtools.gmk	Wed Mar 04 16:48:46 2020 +0100
@@ -82,7 +82,6 @@
           --patch-module java.base=$(BUILDTOOLS_OUTPUTDIR)/gensrc/java.base.interim \
           --add-exports java.base/jdk.internal=java.compiler.interim \
           --add-exports java.base/jdk.internal=jdk.compiler.interim \
-          --add-exports java.base/sun.invoke.util=jdk.compiler.interim \
           -Xlint:-module, \
   ))
 
--- a/src/jdk.compiler/share/classes/com/sun/source/tree/AnyPatternTree.java	Thu Feb 13 22:05:11 2020 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,32 +0,0 @@
-/*
- * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.  Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package com.sun.source.tree;
-
-/**
- * Any pattern tree
- */
-public interface AnyPatternTree extends PatternTree {
-}
--- a/src/jdk.compiler/share/classes/com/sun/source/tree/Tree.java	Thu Feb 13 22:05:11 2020 +0000
+++ b/src/jdk.compiler/share/classes/com/sun/source/tree/Tree.java	Wed Mar 04 16:48:46 2020 +0100
@@ -219,11 +219,6 @@
          */
         PARENTHESIZED(ParenthesizedTree.class),
 
-         /**
-         * Used for instances of {@link AnyPatternTree}.
-         */
-        ANY_PATTERN(AnyPatternTree.class),
-
         /**
          * {@preview Associated with pattern matching for instanceof, a preview feature of
          *           the Java language.
--- a/src/jdk.compiler/share/classes/com/sun/source/tree/TreeVisitor.java	Thu Feb 13 22:05:11 2020 +0000
+++ b/src/jdk.compiler/share/classes/com/sun/source/tree/TreeVisitor.java	Wed Mar 04 16:48:46 2020 +0100
@@ -258,14 +258,6 @@
     R visitLiteral(LiteralTree node, P p);
 
     /**
-     * Visits an AnyPattern node.
-     * @param node the node being visited
-     * @param p a parameter value
-     * @return a result value
-     */
-    R visitAnyPattern(AnyPatternTree node, P p);
-
-    /**
      * {@preview Associated with pattern matching for instanceof, a preview feature of
      *           the Java language.
      *
--- a/src/jdk.compiler/share/classes/com/sun/source/util/SimpleTreeVisitor.java	Thu Feb 13 22:05:11 2020 +0000
+++ b/src/jdk.compiler/share/classes/com/sun/source/util/SimpleTreeVisitor.java	Wed Mar 04 16:48:46 2020 +0100
@@ -557,19 +557,6 @@
      * @param node {@inheritDoc}
      * @param p {@inheritDoc}
      * @return  the result of {@code defaultAction}
-     * @since 14
-     */
-    @Override
-    public R visitAnyPattern(AnyPatternTree node, P p) {
-        return defaultAction(node, p);
-    }
-
-    /**
-     * {@inheritDoc} This implementation calls {@code defaultAction}.
-     *
-     * @param node {@inheritDoc}
-     * @param p {@inheritDoc}
-     * @return  the result of {@code defaultAction}
      */
     @Override
     public R visitBindingPattern(BindingPatternTree node, P p) {
--- a/src/jdk.compiler/share/classes/com/sun/source/util/TreeScanner.java	Thu Feb 13 22:05:11 2020 +0000
+++ b/src/jdk.compiler/share/classes/com/sun/source/util/TreeScanner.java	Wed Mar 04 16:48:46 2020 +0100
@@ -681,19 +681,6 @@
      * @param node  {@inheritDoc}
      * @param p  {@inheritDoc}
      * @return the result of scanning
-     * @since 14
-     */
-    @Override
-    public R visitAnyPattern(AnyPatternTree node, P p) {
-        return null;
-    }
-
-    /**
-     * {@inheritDoc} This implementation scans the children in left to right order.
-     *
-     * @param node  {@inheritDoc}
-     * @param p  {@inheritDoc}
-     * @return the result of scanning
      */
     @Override
     public R visitBindingPattern(BindingPatternTree node, P p) {
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Symtab.java	Thu Feb 13 22:05:11 2020 +0000
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Symtab.java	Wed Mar 04 16:48:46 2020 +0100
@@ -215,8 +215,6 @@
     public final Type documentedType;
     public final Type elementTypeType;
     public final Type functionalInterfaceType;
-    public final Type patternHandlesType;
-    public final Type patternHandleType;
     public final Type previewFeatureType;
     public final Type typeDescriptorType;
     public final Type recordType;
@@ -577,8 +575,6 @@
         lambdaMetafactory = enterClass("java.lang.invoke.LambdaMetafactory");
         stringConcatFactory = enterClass("java.lang.invoke.StringConcatFactory");
         functionalInterfaceType = enterClass("java.lang.FunctionalInterface");
-        patternHandlesType = enterClass("java.lang.runtime.PatternHandles");
-        patternHandleType = enterClass("java.lang.runtime.PatternHandle");
         previewFeatureType = enterClass("jdk.internal.PreviewFeature");
         typeDescriptorType = enterClass("java.lang.invoke.TypeDescriptor");
         recordType = enterClass("java.lang.Record");
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Attr.java	Thu Feb 13 22:05:11 2020 +0000
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Attr.java	Wed Mar 04 16:48:46 2020 +0100
@@ -25,11 +25,8 @@
 
 package com.sun.tools.javac.comp;
 
-import sun.invoke.util.BytecodeName;
-
 import java.util.*;
 import java.util.function.BiConsumer;
-import java.util.stream.Collectors;
 
 import javax.lang.model.element.ElementKind;
 import javax.tools.JavaFileObject;
@@ -80,7 +77,6 @@
 import static com.sun.tools.javac.tree.JCTree.Tag.*;
 import com.sun.tools.javac.util.JCDiagnostic.DiagnosticFlag;
 import java.util.stream.Stream;
-import java.util.stream.StreamSupport;
 
 /** This is the main context-dependent analysis phase in GJC. It
  *  encompasses name resolution, type checking and constant folding as
@@ -123,7 +119,6 @@
     final Dependencies dependencies;
     final Annotate annotate;
     final ArgumentAttr argumentAttr;
-    final ClassReader reader;
     final MatchBindingsComputer matchBindingsComputer;
 
     public static Attr instance(Context context) {
@@ -161,7 +156,6 @@
         typeEnvs = TypeEnvs.instance(context);
         dependencies = Dependencies.instance(context);
         argumentAttr = ArgumentAttr.instance(context);
-        reader = ClassReader.instance(context);
         matchBindingsComputer = MatchBindingsComputer.instance(context);
 
         Options options = Options.instance(context);
@@ -3923,12 +3917,6 @@
         result = check(tree, syms.booleanType, KindSelector.VAL, resultInfo);
     }
 
-    @Override
-    public void visitAnyPattern(JCAnyPattern tree) {
-        tree.type = resultInfo.pt;
-        result = tree.type;
-    }
-
     public void visitBindingPattern(JCBindingPattern tree) {
         if (tree.vartype != null) {
             ResultInfo varInfo = new ResultInfo(KindSelector.TYP, resultInfo.pt, resultInfo.checkContext);
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Flow.java	Thu Feb 13 22:05:11 2020 +0000
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Flow.java	Wed Mar 04 16:48:46 2020 +0100
@@ -50,12 +50,9 @@
 import static com.sun.tools.javac.code.Flags.*;
 import static com.sun.tools.javac.code.Flags.BLOCK;
 import static com.sun.tools.javac.code.Kinds.Kind.*;
-import com.sun.tools.javac.code.Type.ClassType;
 import static com.sun.tools.javac.code.TypeTag.BOOLEAN;
-import static com.sun.tools.javac.code.TypeTag.CLASS;
 import static com.sun.tools.javac.code.TypeTag.VOID;
 import static com.sun.tools.javac.tree.JCTree.Tag.*;
-import java.util.Iterator;
 
 /** This pass implements dataflow analysis for Java programs though
  *  different AST visitor steps. Liveness analysis (see AliveAnalyzer) checks that
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Lower.java	Thu Feb 13 22:05:11 2020 +0000
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Lower.java	Wed Mar 04 16:48:46 2020 +0100
@@ -51,7 +51,6 @@
 
 import static com.sun.tools.javac.code.Flags.*;
 import static com.sun.tools.javac.code.Flags.BLOCK;
-import com.sun.tools.javac.code.Kinds.Kind;
 import static com.sun.tools.javac.code.Scope.LookupKind.NON_RECURSIVE;
 import static com.sun.tools.javac.code.TypeTag.*;
 import static com.sun.tools.javac.code.Kinds.Kind.*;
@@ -2458,8 +2457,7 @@
         tree.defs = tree.defs.appendList(List.of(
                 generateRecordMethod(tree, names.toString, vars, getterMethHandles),
                 generateRecordMethod(tree, names.hashCode, vars, getterMethHandles),
-                generateRecordMethod(tree, names.equals, vars, getterMethHandles),
-                recordExtractor(tree, getterMethHandles)
+                generateRecordMethod(tree, names.equals, vars, getterMethHandles)
         ));
     }
 
@@ -2517,43 +2515,6 @@
         }
     }
 
-    JCTree recordExtractor(JCClassDecl tree, MethodHandleSymbol[] getterMethHandles) {
-        make_at(tree.pos());
-
-        MethodSymbol extractorSym =
-                (MethodSymbol) tree.sym.members().getSymbols(sym -> sym.kind == Kind.MTH && (sym.flags() & Flags.RECORD) != 0).iterator().next();
-
-        // let's create the condy now
-        Name bsmName = names.ofLazyProjection;
-        List<Type> staticArgTypes = List.of(syms.classType,
-                new ArrayType(syms.methodHandleType, syms.arrayClass));
-        List<Type> bsm_staticArgs = List.of(syms.methodHandleLookupType,
-                syms.stringType,
-                syms.classType).appendList(staticArgTypes);
-
-        Symbol bsm = rs.resolveInternalMethod(tree, attrEnv, syms.patternHandlesType,
-                bsmName, bsm_staticArgs, List.nil());
-
-        LoadableConstant[] staticArgs = new LoadableConstant[1 + getterMethHandles.length];
-        staticArgs[0] = (ClassType)tree.sym.type;
-        int index = 1;
-        for (MethodHandleSymbol mho : getterMethHandles) {
-            staticArgs[index] = mho;
-            index++;
-        }
-
-        Symbol.DynamicVarSymbol dynSym = new Symbol.DynamicVarSymbol(extractorSym.name,
-                syms.noSymbol,
-                ((MethodSymbol)bsm).asHandle(),
-                syms.patternHandleType,
-                staticArgs);
-        JCIdent ident = make.Ident(dynSym);
-        ident.type = syms.patternHandleType;
-
-        // public PatternHandle extractorName () { return ???; }
-        return make.MethodDef(extractorSym, make.Block(0, List.of(make.Return(ident))));
-    }
-
     /**
      * Creates an indy qualifier, helpful to be part of an indy invocation
      * @param site                the site
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/TransPatterns.java	Thu Feb 13 22:05:11 2020 +0000
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/TransPatterns.java	Wed Mar 04 16:48:46 2020 +0100
@@ -95,10 +95,8 @@
     private final Log log;
     private final ConstFold constFold;
     private final Names names;
-    private final Resolve rs;
     private final Target target;
     private TreeMaker make;
-    private Env<AttrContext> env;
 
     BindingContext bindingContext = new BindingContext() {
         @Override
@@ -149,7 +147,6 @@
         log = Log.instance(context);
         constFold = ConstFold.instance(context);
         names = Names.instance(context);
-        rs = Resolve.instance(context);
         target = Target.instance(context);
         debugTransPatterns = Options.instance(context).isSet("debug.patterns");
     }
@@ -232,8 +229,6 @@
             }
             Assert.check(components.isEmpty() == nestedPatterns.isEmpty());
             return test != null ? test : make.Literal(true);
-        } else if (patt.hasTag(Tag.ANYPATTERN)) {
-            return make.Literal(true);
         } else {
             throw new IllegalStateException();
         }
@@ -403,12 +398,10 @@
     public JCTree translateTopLevelClass(Env<AttrContext> env, JCTree cdef, TreeMaker make) {
         try {
             this.make = make;
-            this.env = env;
             translate(cdef);
         } finally {
             // note that recursive invocations of this method fail hard
             this.make = null;
-            this.env = null;
         }
 
         return cdef;
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/TypeEnter.java	Thu Feb 13 22:05:11 2020 +0000
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/TypeEnter.java	Wed Mar 04 16:48:46 2020 +0100
@@ -64,8 +64,6 @@
 import com.sun.tools.javac.util.JCDiagnostic.DiagnosticFlag;
 import com.sun.tools.javac.util.JCDiagnostic.DiagnosticPosition;
 
-import sun.invoke.util.BytecodeName;
-
 /** This is the second phase of Enter, in which classes are completed
  *  by resolving their headers and entering their members in the into
  *  the class scope. See Enter for an overall overview.
@@ -1159,18 +1157,8 @@
                 memberEnter.memberEnter(equals, env);
             }
 
+            // fields can't be varargs, lets remove the flag
             List<JCVariableDecl> recordFields = TreeInfo.recordFields(tree);
-            List<Type> fieldTypes = recordFields.stream().map(f -> f.sym.type).collect(List.collector());
-            String argsTypeSig = '(' + argsTypeSig(fieldTypes) + ')';
-            String extractorStr = BytecodeName.toBytecodeName("$pattern$" + tree.sym.name + "$" + argsTypeSig);
-            Name extractorName = names.fromString(extractorStr);
-            MethodType extractorMT = new MethodType(List.nil(), syms.patternHandleType, List.nil(), syms.methodClass);
-            MethodSymbol extractorSym = new MethodSymbol(
-                    Flags.PUBLIC | Flags.RECORD | Flags.STATIC,
-                    extractorName, extractorMT, tree.sym);
-            tree.sym.members().enter(extractorSym);
-
-            // fields can't be varargs, lets remove the flag
             for (JCVariableDecl field: recordFields) {
                 field.mods.flags &= ~Flags.VARARGS;
                 field.sym.flags_field &= ~Flags.VARARGS;
@@ -1181,47 +1169,6 @@
                     .forEach(vd -> addAccessor(vd, env));
         }
     }
-        //where:
-            private String argsTypeSig(List<Type> typeList) {
-                LowerSignatureGenerator sg = new LowerSignatureGenerator();
-                sg.assembleSig(typeList);
-                return sg.toString();
-        }
-
-            /**
-             * Signature Generation
-             */
-            private class LowerSignatureGenerator extends Types.SignatureGenerator {
-
-                /**
-                 * An output buffer for type signatures.
-                 */
-                StringBuilder sb = new StringBuilder();
-
-                LowerSignatureGenerator() {
-                    super(types);
-                }
-
-                @Override
-                protected void append(char ch) {
-                    sb.append(ch);
-                }
-
-                @Override
-                protected void append(byte[] ba) {
-                    sb.append(new String(ba));
-                }
-
-                @Override
-                protected void append(Name name) {
-                    sb.append(name.toString());
-                }
-
-                @Override
-                public String toString() {
-                    return sb.toString();
-                }
-            }
 
     private MethodSymbol lookupMethod(TypeSymbol tsym, Name name, List<Type> argtypes) {
         for (Symbol s : tsym.members().getSymbolsByName(name, s -> s.kind == MTH)) {
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/ClassReader.java	Thu Feb 13 22:05:11 2020 +0000
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/ClassReader.java	Wed Mar 04 16:48:46 2020 +0100
@@ -402,20 +402,6 @@
  * Reading Types
  ***********************************************************************/
 
-    public Type decodeType(ModuleSymbol msym, byte[] sig, int[] idx) {
-        signature = sig;
-        sigp = idx[0];
-        siglimit = sig.length;
-        ModuleSymbol prevModule = currentModule;
-        currentModule = msym;
-        try {
-            return sigToType();
-        } finally {
-            idx[0] = sigp;
-            currentModule = prevModule;
-        }
-    }
-
     /** The unread portion of the currently read type is
      *  signature[sigp..siglimit-1].
      */
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/ClassWriter.java	Thu Feb 13 22:05:11 2020 +0000
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/ClassWriter.java	Wed Mar 04 16:48:46 2020 +0100
@@ -913,20 +913,6 @@
      */
     void writeBootstrapMethods() {
         int alenIdx = writeAttr(names.BootstrapMethods);
-        OUTER: while (true) {
-            int size = poolWriter.bootstrapMethods.size();
-            for (BsmKey bsmKey : poolWriter.bootstrapMethods.keySet()) {
-                //ensure all is in pool:
-                LoadableConstant[] uniqueArgs = bsmKey.staticArgs;
-                for (LoadableConstant arg : uniqueArgs) {
-                    poolWriter.putConstant(arg);
-                    if (size != poolWriter.bootstrapMethods.size()) {
-                        continue OUTER;
-                    }
-                }
-            }
-            break;
-        }
         databuf.appendChar(poolWriter.bootstrapMethods.size());
         for (BsmKey bsmKey : poolWriter.bootstrapMethods.keySet()) {
             //write BSM handle
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/parser/JavacParser.java	Thu Feb 13 22:05:11 2020 +0000
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/parser/JavacParser.java	Wed Mar 04 16:48:46 2020 +0100
@@ -756,10 +756,7 @@
 
     public JCPattern parsePattern() {
         int pos = token.pos;
-        if (token.kind == UNDERSCORE) {
-            nextToken();
-            return toP(F.at(pos).AnyPattern());
-        } else if (token.kind == IDENTIFIER && token.name() == names.var) {
+        if (token.kind == IDENTIFIER && token.name() == names.var) {
             nextToken();
             return toP(F.at(pos).BindingPattern(ident(), null));
         } else {
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/tree/JCTree.java	Thu Feb 13 22:05:11 2020 +0000
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/tree/JCTree.java	Wed Mar 04 16:48:46 2020 +0100
@@ -237,8 +237,6 @@
          */
         TYPETEST,
 
-        ANYPATTERN,
-
         /** Patterns.
          */
         BINDINGPATTERN,
@@ -2188,34 +2186,6 @@
         }
     }
 
-    public static class JCAnyPattern extends JCPattern
-            implements AnyPatternTree {
-
-        protected JCAnyPattern() {
-        }
-
-        @Override
-        public void accept(Visitor v) {
-            v.visitAnyPattern(this);
-        }
-
-        @DefinedBy(Api.COMPILER_TREE)
-        public Kind getKind() {
-            return Kind.ANY_PATTERN;
-        }
-
-        @Override
-        @DefinedBy(Api.COMPILER_TREE)
-        public <R, D> R accept(TreeVisitor<R, D> v, D d) {
-            return v.visitAnyPattern(this, d);
-        }
-
-        @Override
-        public Tag getTag() {
-            return ANYPATTERN;
-        }
-    }
-
     public static class JCBindingPattern extends JCPattern
             implements BindingPatternTree {
         public Name name;
@@ -2263,7 +2233,6 @@
     public static class JCDeconstructionPattern extends JCPattern
             implements DeconstructionPatternTree {
         public Name name; //possibly null
-//        public BindingSymbol symbol;
         public JCExpression deconstructor;
         public List<JCPattern> nested;
         public ClassSymbol record;
@@ -3351,7 +3320,6 @@
         public void visitBinary(JCBinary that)               { visitTree(that); }
         public void visitTypeCast(JCTypeCast that)           { visitTree(that); }
         public void visitTypeTest(JCInstanceOf that)         { visitTree(that); }
-        public void visitAnyPattern(JCAnyPattern that)       { visitTree(that); }
         public void visitBindingPattern(JCBindingPattern that) { visitTree(that); }
         public void visitDeconstructionPattern(JCDeconstructionPattern that) { visitTree(that); }
         public void visitIndexed(JCArrayAccess that)         { visitTree(that); }
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/tree/TreeCopier.java	Thu Feb 13 22:05:11 2020 +0000
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/tree/TreeCopier.java	Wed Mar 04 16:48:46 2020 +0100
@@ -485,12 +485,6 @@
     }
 
     @DefinedBy(Api.COMPILER_TREE)
-    public JCTree visitAnyPattern(AnyPatternTree node, P p) {
-        JCAnyPattern t = (JCAnyPattern) node;
-        return M.at(t.pos).AnyPattern();
-    }
-
-    @DefinedBy(Api.COMPILER_TREE)
     public JCTree visitBindingPattern(BindingPatternTree node, P p) {
         JCBindingPattern t = (JCBindingPattern) node;
         JCTree vartype = copy(t.vartype, p);
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/tree/TreeMaker.java	Thu Feb 13 22:05:11 2020 +0000
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/tree/TreeMaker.java	Wed Mar 04 16:48:46 2020 +0100
@@ -41,7 +41,6 @@
 import static com.sun.tools.javac.code.Flags.*;
 import static com.sun.tools.javac.code.Kinds.Kind.*;
 import static com.sun.tools.javac.code.TypeTag.*;
-import com.sun.tools.javac.tree.JCTree;
 import com.sun.tools.javac.tree.JCTree.JCExpression;
 import com.sun.tools.javac.tree.JCTree.JCPattern;
 import com.sun.tools.javac.util.List;
@@ -469,12 +468,6 @@
         return tree;
     }
 
-    public JCAnyPattern AnyPattern() {
-        JCAnyPattern tree = new JCAnyPattern();
-        tree.pos = pos;
-        return tree;
-    }
-
     public JCBindingPattern BindingPattern(Name name, JCTree vartype) {
         JCBindingPattern tree = new JCBindingPattern(name, null, vartype);
         tree.pos = pos;
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/tree/TreeScanner.java	Thu Feb 13 22:05:11 2020 +0000
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/tree/TreeScanner.java	Wed Mar 04 16:48:46 2020 +0100
@@ -303,10 +303,6 @@
         scan(tree.pattern);
     }
 
-    @Override
-    public void visitAnyPattern(JCTree.JCAnyPattern that) {
-    }
-
     public void visitBindingPattern(JCBindingPattern tree) {
         if (tree.vartype != null)
             scan(tree.vartype);
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/tree/TreeTranslator.java	Thu Feb 13 22:05:11 2020 +0000
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/tree/TreeTranslator.java	Wed Mar 04 16:48:46 2020 +0100
@@ -359,11 +359,6 @@
         result = tree;
     }
 
-    @Override
-    public void visitAnyPattern(JCAnyPattern tree) {
-        result = tree;
-    }
-
     public void visitBindingPattern(JCBindingPattern tree) {
         tree.vartype = translate(tree.vartype);
         result = tree;
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/util/Names.java	Thu Feb 13 22:05:11 2020 +0000
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/util/Names.java	Wed Mar 04 16:48:46 2020 +0100
@@ -201,7 +201,6 @@
     // record related
     // members of java.lang.runtime.ObjectMethods
     public final Name bootstrap;
-    public final Name ofLazyProjection;
 
     public final Name record;
 
@@ -367,7 +366,6 @@
         makeConcatWithConstants = fromString("makeConcatWithConstants");
 
         bootstrap = fromString("bootstrap");
-        ofLazyProjection = fromString("ofLazyProjection");
         record = fromString("record");
 
         serialPersistentFields = fromString("serialPersistentFields");