Skip to content

Commit a09c789

Browse files
author
Christian Wimmer
committed
Remove deprecated support for PlatformInterfaceCompatibilityMode
1 parent b44bbf0 commit a09c789

File tree

4 files changed

+3
-35
lines changed

4 files changed

+3
-35
lines changed

substratevm/src/com.oracle.graal.pointsto/src/com/oracle/graal/pointsto/api/HostVM.java

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -240,11 +240,6 @@ public InlineBeforeAnalysisGraphDecoder createInlineBeforeAnalysisGraphDecoder(B
240240
return new InlineBeforeAnalysisGraphDecoder(bb, InlineBeforeAnalysisPolicy.NO_INLINING, resultGraph, bb.getProviders(method), null);
241241
}
242242

243-
@SuppressWarnings("unused")
244-
public boolean skipInterface(AnalysisUniverse universe, ResolvedJavaType interfaceType, ResolvedJavaType implementingType) {
245-
return false;
246-
}
247-
248243
/**
249244
* Check if the element is supported on current platform.
250245
*

substratevm/src/com.oracle.graal.pointsto/src/com/oracle/graal/pointsto/meta/AnalysisType.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -357,9 +357,6 @@ public AnalysisType(AnalysisUniverse universe, ResolvedJavaType javaType, JavaKi
357357
private AnalysisType[] convertTypes(ResolvedJavaType[] originalTypes) {
358358
List<AnalysisType> result = new ArrayList<>(originalTypes.length);
359359
for (ResolvedJavaType originalType : originalTypes) {
360-
if (universe.hostVM.skipInterface(universe, originalType, wrapped)) {
361-
continue;
362-
}
363360
result.add(universe.lookup(originalType));
364361
}
365362
return result.toArray(new AnalysisType[result.size()]);

substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/SubstrateOptions.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1056,6 +1056,9 @@ protected void onValueUpdate(EconomicMap<OptionKey<?>, Object> values, String ol
10561056
@Option(help = "Run reachability handlers concurrently during analysis.", type = Expert, deprecated = true, deprecationMessage = "This option was introduced to simplify migration to GraalVM 22.2 and will be removed in a future release")//
10571057
public static final HostedOptionKey<Boolean> RunReachabilityHandlersConcurrently = new HostedOptionKey<>(true);
10581058

1059+
@Option(help = "Deprecated, has no effect.", deprecated = true)//
1060+
static final HostedOptionKey<Boolean> PlatformInterfaceCompatibilityMode = new HostedOptionKey<>(false);
1061+
10591062
@Option(help = "Force many trampolines to be needed for inter-method calls. Normally trampolines are only used when a method destination is outside the range of a pc-relative branch instruction.", type = OptionType.Debug)//
10601063
public static final HostedOptionKey<Boolean> UseDirectCallTrampolinesALot = new HostedOptionKey<>(false);
10611064

substratevm/src/com.oracle.svm.hosted/src/com/oracle/svm/hosted/SVMHost.java

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,6 @@
8989
import com.oracle.svm.core.hub.ReferenceType;
9090
import com.oracle.svm.core.jdk.InternalVMMethod;
9191
import com.oracle.svm.core.jdk.LambdaFormHiddenMethod;
92-
import com.oracle.svm.core.option.HostedOptionKey;
9392
import com.oracle.svm.core.option.SubstrateOptionsParser;
9493
import com.oracle.svm.core.thread.ContinuationSupport;
9594
import com.oracle.svm.core.threadlocal.VMThreadLocalInfo;
@@ -118,7 +117,6 @@
118117
import com.oracle.svm.hosted.phases.InlineBeforeAnalysisPolicyUtils;
119118
import com.oracle.svm.hosted.substitute.AnnotationSubstitutionProcessor;
120119
import com.oracle.svm.hosted.substitute.AutomaticUnsafeTransformationSupport;
121-
import com.oracle.svm.util.LogUtils;
122120
import com.oracle.svm.util.ReflectionUtil;
123121

124122
import jdk.graal.compiler.core.common.spi.ForeignCallDescriptor;
@@ -133,7 +131,6 @@
133131
import jdk.graal.compiler.nodes.ValueNode;
134132
import jdk.graal.compiler.nodes.graphbuilderconf.GraphBuilderConfiguration;
135133
import jdk.graal.compiler.nodes.graphbuilderconf.IntrinsicContext;
136-
import jdk.graal.compiler.options.Option;
137134
import jdk.graal.compiler.options.OptionKey;
138135
import jdk.graal.compiler.options.OptionValues;
139136
import jdk.graal.compiler.phases.OptimisticOptimizations;
@@ -702,30 +699,6 @@ public InlineBeforeAnalysisGraphDecoder createInlineBeforeAnalysisGraphDecoder(B
702699
return new InlineBeforeAnalysisGraphDecoderImpl(bb, inlineBeforeAnalysisPolicy(method.getMultiMethodKey()), resultGraph, bb.getProviders(method));
703700
}
704701

705-
public static class Options {
706-
@Option(help = "Enable the behavior of old GraalVM versions. When enabled, interfaces not available for the current platform are filtered.", //
707-
deprecated = true, deprecationMessage = "This option was introduced to simplify migration to GraalVM 21.2 and will be removed in a future release")//
708-
public static final HostedOptionKey<Boolean> PlatformInterfaceCompatibilityMode = new HostedOptionKey<>(false);
709-
}
710-
711-
@Override
712-
public boolean skipInterface(AnalysisUniverse universe, ResolvedJavaType interfaceType, ResolvedJavaType implementingType) {
713-
if (!platformSupported(interfaceType)) {
714-
String message = "The interface " + interfaceType.toJavaName(true) + " is not available in the current platform, but used by " + implementingType.toJavaName(true) + ". " +
715-
"GraalVM before version 21.2 ignored such interfaces, but this was an oversight.";
716-
717-
String commandArgument = SubstrateOptionsParser.commandArgument(Options.PlatformInterfaceCompatibilityMode, "+");
718-
if (Options.PlatformInterfaceCompatibilityMode.getValue()) {
719-
LogUtils.warning("%s The interface is filtered because the compatibility option %s is used. This option will be removed in a future GraalVM version.", message, commandArgument);
720-
return true;
721-
} else {
722-
throw new UnsupportedFeatureException(
723-
message + " The old behavior can be temporarily restored using the option " + commandArgument + ". This option will be removed in a future GraalVM version.");
724-
}
725-
}
726-
return false;
727-
}
728-
729702
@Override
730703
public boolean platformSupported(AnnotatedElement element) {
731704
if (element instanceof ResolvedJavaType) {

0 commit comments

Comments
 (0)