Mercurial > hg > graal-jvmci-8
changeset 23365:30af491f98c5
Remove TrustedInterface (JDK-8155719).
author | Roland Schatz <roland.schatz@oracle.com> |
---|---|
date | Fri, 29 Apr 2016 10:54:19 +0200 |
parents | 1c62a8bac25a |
children | 45168ac6d3bc |
files | jvmci/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedObjectTypeImpl.java jvmci/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedPrimitiveType.java jvmci/jdk.vm.ci.meta/src/jdk/vm/ci/meta/JavaField.java jvmci/jdk.vm.ci.meta/src/jdk/vm/ci/meta/JavaMethod.java jvmci/jdk.vm.ci.meta/src/jdk/vm/ci/meta/JavaType.java jvmci/jdk.vm.ci.meta/src/jdk/vm/ci/meta/ResolvedJavaType.java jvmci/jdk.vm.ci.meta/src/jdk/vm/ci/meta/TrustedInterface.java jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestResolvedJavaType.java jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TypeUniverse.java |
diffstat | 9 files changed, 8 insertions(+), 71 deletions(-) [+] |
line wrap: on
line diff
--- a/jvmci/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedObjectTypeImpl.java Tue Apr 19 21:36:49 2016 -0700 +++ b/jvmci/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedObjectTypeImpl.java Fri Apr 29 10:54:19 2016 +0200 @@ -54,7 +54,6 @@ import jdk.vm.ci.meta.ResolvedJavaField; import jdk.vm.ci.meta.ResolvedJavaMethod; import jdk.vm.ci.meta.ResolvedJavaType; -import jdk.vm.ci.meta.TrustedInterface; /** * Implementation of {@link JavaType} for resolved non-primitive HotSpot classes. @@ -904,9 +903,4 @@ public String toString() { return "HotSpotType<" + getName() + ", resolved>"; } - - @Override - public boolean isTrustedInterfaceType() { - return TrustedInterface.class.isAssignableFrom(mirror()); - } }
--- a/jvmci/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedPrimitiveType.java Tue Apr 19 21:36:49 2016 -0700 +++ b/jvmci/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotResolvedPrimitiveType.java Fri Apr 29 10:54:19 2016 +0200 @@ -263,9 +263,4 @@ public ResolvedJavaMethod getClassInitializer() { return null; } - - @Override - public boolean isTrustedInterfaceType() { - return false; - } }
--- a/jvmci/jdk.vm.ci.meta/src/jdk/vm/ci/meta/JavaField.java Tue Apr 19 21:36:49 2016 -0700 +++ b/jvmci/jdk.vm.ci.meta/src/jdk/vm/ci/meta/JavaField.java Fri Apr 29 10:54:19 2016 +0200 @@ -29,7 +29,7 @@ * Represents a reference to a Java field, either resolved or unresolved fields. Fields, like * methods and types, are resolved through {@link ConstantPool constant pools}. */ -public interface JavaField extends TrustedInterface { +public interface JavaField { /** * Returns the name of this field.
--- a/jvmci/jdk.vm.ci.meta/src/jdk/vm/ci/meta/JavaMethod.java Tue Apr 19 21:36:49 2016 -0700 +++ b/jvmci/jdk.vm.ci.meta/src/jdk/vm/ci/meta/JavaMethod.java Fri Apr 29 10:54:19 2016 +0200 @@ -29,7 +29,7 @@ * Represents a reference to a Java method, either resolved or unresolved. Methods, like fields and * types, are resolved through {@link ConstantPool constant pools}. */ -public interface JavaMethod extends TrustedInterface { +public interface JavaMethod { /** * Returns the name of this method.
--- a/jvmci/jdk.vm.ci.meta/src/jdk/vm/ci/meta/JavaType.java Tue Apr 19 21:36:49 2016 -0700 +++ b/jvmci/jdk.vm.ci.meta/src/jdk/vm/ci/meta/JavaType.java Fri Apr 29 10:54:19 2016 +0200 @@ -28,7 +28,7 @@ * Represents a resolved or unresolved type. Types include primitives, objects, {@code void}, and * arrays thereof. */ -public interface JavaType extends TrustedInterface { +public interface JavaType { /** * Returns the name of this type in internal form. The following are examples of strings
--- a/jvmci/jdk.vm.ci.meta/src/jdk/vm/ci/meta/ResolvedJavaType.java Tue Apr 19 21:36:49 2016 -0700 +++ b/jvmci/jdk.vm.ci.meta/src/jdk/vm/ci/meta/ResolvedJavaType.java Fri Apr 29 10:54:19 2016 +0200 @@ -343,12 +343,6 @@ */ ResolvedJavaMethod getClassInitializer(); - /** - * Returns true if this type represents an interface and it should be trusted even in places - * where the JVM verifier would not give any guarantees other than {@link Object}. - */ - boolean isTrustedInterfaceType(); - default ResolvedJavaMethod findMethod(String name, Signature signature) { for (ResolvedJavaMethod method : getDeclaredMethods()) { if (method.getName().equals(name) && method.getSignature().equals(signature)) {
--- a/jvmci/jdk.vm.ci.meta/src/jdk/vm/ci/meta/TrustedInterface.java Tue Apr 19 21:36:49 2016 -0700 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,32 +0,0 @@ -/* - * Copyright (c) 2014, 2014, Oracle and/or its affiliates. All rights reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. - * - * This code is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA - * or visit www.oracle.com if you need additional information or have any - * questions. - */ -package jdk.vm.ci.meta; - -/** - * Interfaces extending this interface should be trusted by the compiler. See - * {@link ResolvedJavaType#isTrustedInterfaceType()}. - * - */ -public interface TrustedInterface { - -}
--- a/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestResolvedJavaType.java Tue Apr 19 21:36:49 2016 -0700 +++ b/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TestResolvedJavaType.java Fri Apr 29 10:54:19 2016 +0200 @@ -54,6 +54,8 @@ import java.util.Map; import java.util.Set; +import org.junit.Test; + import jdk.vm.ci.common.JVMCIError; import jdk.vm.ci.meta.Assumptions.AssumptionResult; import jdk.vm.ci.meta.JavaConstant; @@ -62,10 +64,6 @@ import jdk.vm.ci.meta.ResolvedJavaField; import jdk.vm.ci.meta.ResolvedJavaMethod; import jdk.vm.ci.meta.ResolvedJavaType; -import jdk.vm.ci.meta.TrustedInterface; - -import org.junit.Test; - import sun.reflect.ConstantPool; /** @@ -828,16 +826,6 @@ } @Test - public void isTrustedInterfaceTypeTest() { - for (Class<?> c : classes) { - ResolvedJavaType type = metaAccess.lookupJavaType(c); - if (TrustedInterface.class.isAssignableFrom(c)) { - assertTrue(type.isTrustedInterfaceType()); - } - } - } - - @Test public void isLeafTest() { for (Class<?> c : classes) { ResolvedJavaType type = metaAccess.lookupJavaType(c);
--- a/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TypeUniverse.java Tue Apr 19 21:36:49 2016 -0700 +++ b/jvmci/jdk.vm.ci.runtime.test/src/jdk/vm/ci/runtime/test/TypeUniverse.java Fri Apr 29 10:54:19 2016 +0200 @@ -47,16 +47,14 @@ import java.util.TreeMap; import java.util.stream.Collectors; +import org.junit.Test; + import jdk.vm.ci.meta.ConstantReflectionProvider; import jdk.vm.ci.meta.JavaConstant; import jdk.vm.ci.meta.MetaAccessProvider; import jdk.vm.ci.meta.ResolvedJavaField; import jdk.vm.ci.meta.ResolvedJavaType; -import jdk.vm.ci.meta.TrustedInterface; import jdk.vm.ci.runtime.JVMCI; - -import org.junit.Test; - import sun.misc.Unsafe; //JaCoCo Exclude @@ -116,7 +114,7 @@ byte[].class, short[].class, char[].class, int[].class, float[].class, long[].class, double[].class, Object[].class, Class[].class, List[].class, boolean[][].class, byte[][].class, short[][].class, char[][].class, int[][].class, float[][].class, long[][].class, double[][].class, Object[][].class, Class[][].class, List[][].class, ClassLoader.class, String.class, Serializable.class, Cloneable.class, Test.class, TestMetaAccessProvider.class, List.class, Collection.class, Map.class, Queue.class, - HashMap.class, LinkedHashMap.class, IdentityHashMap.class, AbstractCollection.class, AbstractList.class, ArrayList.class, TrustedInterface.class, InnerClass.class, + HashMap.class, LinkedHashMap.class, IdentityHashMap.class, AbstractCollection.class, AbstractList.class, ArrayList.class, InnerClass.class, InnerStaticClass.class, InnerStaticFinalClass.class, PrivateInnerClass.class, ProtectedInnerClass.class}; for (Class<?> c : initialClasses) { addClass(c);