Skip to content

Commit 8d36b5f

Browse files
committed
svm: remove usages of the JDKLatest predicate
1 parent 230116f commit 8d36b5f

File tree

36 files changed

+41
-217
lines changed

36 files changed

+41
-217
lines changed

substratevm/src/com.oracle.svm.core.foreign/src/com/oracle/svm/core/foreign/Target_jdk_internal_foreign_Utils_BaseAndScale.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,13 @@
3030
import com.oracle.svm.core.annotate.RecomputeFieldValue;
3131
import com.oracle.svm.core.annotate.TargetClass;
3232
import com.oracle.svm.core.config.ConfigurationValues;
33-
import com.oracle.svm.core.jdk.JDKLatest;
3433
import com.oracle.svm.core.util.VMError;
3534

3635
import jdk.graal.compiler.serviceprovider.JavaVersionUtil;
3736
import jdk.internal.foreign.Utils;
3837
import jdk.vm.ci.meta.JavaKind;
3938

40-
@TargetClass(className = "jdk.internal.foreign.Utils", innerClass = "BaseAndScale", onlyWith = {ForeignAPIPredicates.Enabled.class, JDKLatest.class})
39+
@TargetClass(className = "jdk.internal.foreign.Utils", innerClass = "BaseAndScale", onlyWith = ForeignAPIPredicates.Enabled.class)
4140
final class Target_jdk_internal_foreign_Utils_BaseAndScale {
4241
@Alias //
4342
@RecomputeFieldValue(kind = RecomputeFieldValue.Kind.Custom, declClass = BaseFieldRecomputer.class) //

substratevm/src/com.oracle.svm.core.foreign/src/com/oracle/svm/core/foreign/Target_jdk_internal_misc_ScopedMemoryAccess.java

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,6 @@
3333
import com.oracle.svm.core.ArenaIntrinsics;
3434
import com.oracle.svm.core.annotate.Substitute;
3535
import com.oracle.svm.core.annotate.TargetClass;
36-
import com.oracle.svm.core.annotate.TargetElement;
37-
import com.oracle.svm.core.jdk.JDKLatest;
3836
import com.oracle.svm.core.nodes.foreign.MemoryArenaValidInScopeNode;
3937
import com.oracle.svm.core.util.BasedOnJDKFile;
4038

@@ -98,7 +96,6 @@ static void registerNatives() {
9896
@SuppressWarnings("static-method")
9997
@Substitute
10098
@Target_jdk_internal_misc_ScopedMemoryAccess_Scoped
101-
@TargetElement(onlyWith = JDKLatest.class)
10299
@AlwaysInline("Safepoints must be visible in caller")
103100
public void loadInternal(MemorySessionImpl session, MappedMemoryUtilsProxy mappedUtils, long address, boolean isSync, long size) {
104101
SubstrateForeignUtil.checkIdentity(mappedUtils, Target_java_nio_MappedMemoryUtils.PROXY);
@@ -119,7 +116,6 @@ public void loadInternal(MemorySessionImpl session, MappedMemoryUtilsProxy mappe
119116
@SuppressWarnings("static-method")
120117
@Substitute
121118
@Target_jdk_internal_misc_ScopedMemoryAccess_Scoped
122-
@TargetElement(onlyWith = JDKLatest.class)
123119
@AlwaysInline("Safepoints must be visible in caller")
124120
public boolean isLoadedInternal(MemorySessionImpl session, MappedMemoryUtilsProxy mappedUtils, long address, boolean isSync, long size) {
125121
SubstrateForeignUtil.checkIdentity(mappedUtils, Target_java_nio_MappedMemoryUtils.PROXY);
@@ -141,7 +137,6 @@ public boolean isLoadedInternal(MemorySessionImpl session, MappedMemoryUtilsProx
141137
@SuppressWarnings("static-method")
142138
@Substitute
143139
@Target_jdk_internal_misc_ScopedMemoryAccess_Scoped
144-
@TargetElement(onlyWith = JDKLatest.class)
145140
@AlwaysInline("Safepoints must be visible in caller")
146141
public void unloadInternal(MemorySessionImpl session, MappedMemoryUtilsProxy mappedUtils, long address, boolean isSync, long size) {
147142
SubstrateForeignUtil.checkIdentity(mappedUtils, Target_java_nio_MappedMemoryUtils.PROXY);
@@ -164,7 +159,6 @@ public void unloadInternal(MemorySessionImpl session, MappedMemoryUtilsProxy map
164159
@SuppressWarnings("static-method")
165160
@Substitute
166161
@Target_jdk_internal_misc_ScopedMemoryAccess_Scoped
167-
@TargetElement(onlyWith = JDKLatest.class)
168162
@AlwaysInline("Safepoints must be visible in caller")
169163
public void forceInternal(MemorySessionImpl session, MappedMemoryUtilsProxy mappedUtils, FileDescriptor fd, long address, boolean isSync, long index, long length) {
170164
SubstrateForeignUtil.checkIdentity(mappedUtils, Target_java_nio_MappedMemoryUtils.PROXY);
@@ -201,14 +195,13 @@ public void forceInternal(MemorySessionImpl session, MappedMemoryUtilsProxy mapp
201195
@BasedOnJDKFile("https://github.com/openjdk/jdk/blob/jdk-25+20/src/hotspot/share/prims/scopedMemoryAccess.cpp#L215-L218")
202196
@SuppressWarnings("static-method")
203197
@Substitute
204-
@TargetElement(onlyWith = JDKLatest.class)
205198
void closeScope0(Target_jdk_internal_foreign_MemorySessionImpl session, @SuppressWarnings("unused") Target_jdk_internal_misc_ScopedMemoryAccess_ScopedAccessError error) {
206199
new SyncCloseScopeOperation(session).enqueue();
207200
}
208201
}
209202

210203
@Retention(RetentionPolicy.RUNTIME)
211-
@TargetClass(className = "jdk.internal.misc.ScopedMemoryAccess$Scoped", onlyWith = {JDKLatest.class, ForeignAPIPredicates.Enabled.class})
204+
@TargetClass(className = "jdk.internal.misc.ScopedMemoryAccess$Scoped", onlyWith = ForeignAPIPredicates.Enabled.class)
212205
@interface Target_jdk_internal_misc_ScopedMemoryAccess_Scoped {
213206

214207
}

substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/heap/Target_java_lang_ref_PhantomReference.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,6 @@
2929
import com.oracle.svm.core.SubstrateUtil;
3030
import com.oracle.svm.core.annotate.Substitute;
3131
import com.oracle.svm.core.annotate.TargetClass;
32-
import com.oracle.svm.core.annotate.TargetElement;
33-
import com.oracle.svm.core.jdk.JDKLatest;
3432

3533
@TargetClass(PhantomReference.class)
3634
public final class Target_java_lang_ref_PhantomReference<T> {
@@ -40,7 +38,6 @@ boolean refersTo0(Object obj) {
4038
}
4139

4240
@Substitute
43-
@TargetElement(onlyWith = JDKLatest.class)
4441
private void clear0() {
4542
ReferenceInternals.clear(SubstrateUtil.cast(this, PhantomReference.class));
4643
}

substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/heap/Target_java_lang_ref_Reference.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,6 @@
4343
import com.oracle.svm.core.annotate.RecomputeFieldValue;
4444
import com.oracle.svm.core.annotate.Substitute;
4545
import com.oracle.svm.core.annotate.TargetClass;
46-
import com.oracle.svm.core.annotate.TargetElement;
47-
import com.oracle.svm.core.jdk.JDKLatest;
4846
import com.oracle.svm.core.util.VMError;
4947
import com.oracle.svm.util.ReflectionUtil;
5048

@@ -133,7 +131,6 @@ private void clear0() {
133131
ReferenceInternals.clear(SubstrateUtil.cast(this, Reference.class));
134132
}
135133

136-
@TargetElement(onlyWith = JDKLatest.class)
137134
@KeepOriginal
138135
native void clearImpl();
139136

substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/heap/Target_java_lang_ref_ReferenceQueue.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,11 @@
3030
import com.oracle.svm.core.annotate.Alias;
3131
import com.oracle.svm.core.annotate.RecomputeFieldValue;
3232
import com.oracle.svm.core.annotate.TargetClass;
33-
import com.oracle.svm.core.annotate.TargetElement;
34-
import com.oracle.svm.core.jdk.JDKLatest;
3533

3634
@TargetClass(ReferenceQueue.class)
3735
final class Target_java_lang_ref_ReferenceQueue<T> {
3836
// Checkstyle: stop
3937
@Alias //
40-
@TargetElement(onlyWith = JDKLatest.class) //
4138
static Target_java_lang_ref_ReferenceQueue<Object> NULL_QUEUE;
4239
// CheckStyle: resume
4340

substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/heap/Target_jdk_internal_ref_Cleaner.java

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@
3636
import com.oracle.svm.core.annotate.Substitute;
3737
import com.oracle.svm.core.annotate.TargetClass;
3838
import com.oracle.svm.core.annotate.TargetElement;
39-
import com.oracle.svm.core.jdk.JDKLatest;
4039
import com.oracle.svm.core.thread.VMThreads;
4140
import com.oracle.svm.util.ReflectionUtil;
4241

@@ -78,14 +77,13 @@ final class Target_java_lang_ref_Cleaner_Cleanable {
7877
@TargetClass(className = "jdk.internal.ref.CleanerImpl")
7978
final class Target_jdk_internal_ref_CleanerImpl {
8079

81-
@TargetElement(onlyWith = JDKLatest.class)//
8280
@Alias @RecomputeFieldValue(kind = RecomputeFieldValue.Kind.NewInstance, declClassName = "jdk.internal.ref.CleanerImpl$CleanableList")//
8381
Target_jdk_internal_ref_CleanerImpl_CleanableList activeList;
8482

8583
@Alias @RecomputeFieldValue(kind = RecomputeFieldValue.Kind.NewInstance, declClassName = "java.lang.ref.ReferenceQueue")//
8684
public ReferenceQueue<Object> queue;
8785

88-
@TargetElement(name = "run", onlyWith = JDKLatest.class)
86+
@TargetElement(name = "run")
8987
@Substitute
9088
public void run() {
9189
Thread t = Thread.currentThread();
@@ -108,7 +106,7 @@ public void run() {
108106
}
109107
}
110108

111-
@TargetClass(className = "jdk.internal.ref.PhantomCleanable", onlyWith = JDKLatest.class)
109+
@TargetClass(className = "jdk.internal.ref.PhantomCleanable")
112110
final class Target_jdk_internal_ref_PhantomCleanable {
113111
@Alias @RecomputeFieldValue(kind = RecomputeFieldValue.Kind.Custom, declClass = GetCleanableListSingletonTransformer.class) //
114112
Target_jdk_internal_ref_CleanerImpl_CleanableList list;
@@ -122,7 +120,7 @@ final class Target_jdk_internal_ref_PhantomCleanable {
122120
/* final */ native void clean();
123121
}
124122

125-
@TargetClass(className = "jdk.internal.ref.CleanerImpl$CleanableList", onlyWith = JDKLatest.class)
123+
@TargetClass(className = "jdk.internal.ref.CleanerImpl$CleanableList")
126124
final class Target_jdk_internal_ref_CleanerImpl_CleanableList {
127125

128126
@Alias @RecomputeFieldValue(kind = RecomputeFieldValue.Kind.NewInstance, declClassName = "jdk.internal.ref.CleanerImpl$CleanableList$Node") //
@@ -136,7 +134,7 @@ final class Target_jdk_internal_ref_CleanerImpl_CleanableList {
136134

137135
}
138136

139-
@TargetClass(className = "jdk.internal.ref.CleanerImpl$CleanableList$Node", onlyWith = JDKLatest.class)
137+
@TargetClass(className = "jdk.internal.ref.CleanerImpl$CleanableList$Node")
140138
final class Target_jdk_internal_ref_CleanerImpl_CleanableList_Node {
141139
}
142140

substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/hub/DynamicHub.java

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,6 @@
102102
import com.oracle.svm.core.annotate.RecomputeFieldValue;
103103
import com.oracle.svm.core.annotate.Substitute;
104104
import com.oracle.svm.core.annotate.TargetClass;
105-
import com.oracle.svm.core.annotate.TargetElement;
106105
import com.oracle.svm.core.classinitialization.ClassInitializationInfo;
107106
import com.oracle.svm.core.classinitialization.EnsureClassInitializedNode;
108107
import com.oracle.svm.core.config.ConfigurationValues;
@@ -114,7 +113,6 @@
114113
import com.oracle.svm.core.heap.UnknownPrimitiveField;
115114
import com.oracle.svm.core.imagelayer.DynamicImageLayerInfo;
116115
import com.oracle.svm.core.imagelayer.ImageLayerBuildingSupport;
117-
import com.oracle.svm.core.jdk.JDKLatest;
118116
import com.oracle.svm.core.jdk.ProtectionDomainSupport;
119117
import com.oracle.svm.core.jdk.Resources;
120118
import com.oracle.svm.core.meta.SharedType;
@@ -1647,7 +1645,6 @@ private static Class<?> forName(String name, boolean initialize, ClassLoader loa
16471645
}
16481646

16491647
@KeepOriginal
1650-
@TargetElement(onlyWith = JDKLatest.class)
16511648
public static native Class<?> forPrimitiveName(String primitiveName);
16521649

16531650
@KeepOriginal
@@ -1705,11 +1702,9 @@ public String toString() {
17051702
public native String toGenericString();
17061703

17071704
@KeepOriginal
1708-
@TargetElement(onlyWith = JDKLatest.class)
17091705
private native void addSealingInfo(int modifiersParam, StringBuilder sb);
17101706

17111707
@KeepOriginal
1712-
@TargetElement(onlyWith = JDKLatest.class)
17131708
private native boolean hasSealedAncestor(Class<?> clazz);
17141709

17151710
@KeepOriginal
@@ -2054,7 +2049,6 @@ private Class<?>[] getPermittedSubclasses0() {
20542049
private native GenericsFactory getFactory();
20552050

20562051
@KeepOriginal
2057-
@TargetElement(onlyWith = JDKLatest.class)
20582052
native Method findMethod(boolean publicOnly, String nameParam, Class<?>... parameterTypes);
20592053

20602054
@KeepOriginal
@@ -2064,7 +2058,6 @@ private Class<?>[] getPermittedSubclasses0() {
20642058
private static native void addAll(Collection<Field> c, Field[] o);
20652059

20662060
@KeepOriginal
2067-
@TargetElement(onlyWith = JDKLatest.class)
20682061
private native Target_java_lang_PublicMethods_MethodList getMethodsRecursive(String methodName, Class<?>[] parameterTypes, boolean includeStatic, boolean publicOnly);
20692062

20702063
@KeepOriginal
@@ -2342,7 +2335,6 @@ public FieldAccessor newFieldAccessor(Field field0, boolean override) {
23422335
}
23432336

23442337
@Substitute
2345-
@TargetElement(onlyWith = JDKLatest.class)
23462338
private Constructor<?> generateConstructor(Class<?> cl, Constructor<?> constructorToCall) {
23472339
SerializationRegistry serializationRegistry = ImageSingletons.lookup(SerializationRegistry.class);
23482340
ConstructorAccessor acc = (ConstructorAccessor) serializationRegistry.getSerializationConstructorAccessor(cl, constructorToCall.getDeclaringClass());

substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/jdk/ForeignDisabledSubstitutions.java

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@
3737
import com.oracle.svm.core.SubstrateOptions;
3838
import com.oracle.svm.core.annotate.Substitute;
3939
import com.oracle.svm.core.annotate.TargetClass;
40-
import com.oracle.svm.core.annotate.TargetElement;
4140
import com.oracle.svm.core.option.SubstrateOptionsParser;
4241
import com.oracle.svm.core.util.VMError;
4342

@@ -54,7 +53,6 @@ public boolean getAsBoolean() {
5453
final class Target_jdk_internal_foreign_MemorySessionImpl {
5554
@Substitute
5655
@SuppressWarnings("static-method")
57-
@TargetElement(onlyWith = JDKLatest.class)
5856
Target_jdk_internal_foreign_ArenaImpl asArena() {
5957
throw ForeignDisabledSubstitutions.fail();
6058
}
@@ -64,7 +62,7 @@ Target_jdk_internal_foreign_ArenaImpl asArena() {
6462
final class Target_java_lang_foreign_Arena {
6563
}
6664

67-
@TargetClass(className = "jdk.internal.foreign.ArenaImpl", onlyWith = {ForeignDisabled.class, JDKLatest.class})
65+
@TargetClass(className = "jdk.internal.foreign.ArenaImpl", onlyWith = {ForeignDisabled.class})
6866
final class Target_jdk_internal_foreign_ArenaImpl {
6967
}
7068

@@ -122,7 +120,7 @@ final class Target_jdk_internal_foreign_FunctionDescriptorImpl {
122120
final class Target_java_lang_foreign_FunctionDescriptor {
123121
}
124122

125-
@TargetClass(className = "jdk.internal.foreign.SegmentFactories", onlyWith = {ForeignDisabled.class, JDKLatest.class})
123+
@TargetClass(className = "jdk.internal.foreign.SegmentFactories", onlyWith = {ForeignDisabled.class})
126124
final class Target_jdk_internal_foreign_SegmentFactories {
127125
@Substitute
128126
@AlwaysInline("Make remaining code in callers unreachable.")
@@ -148,7 +146,7 @@ final class Target_jdk_internal_foreign_LayoutPath {
148146
final class Target_java_lang_foreign_MemoryLayout_PathElement {
149147
}
150148

151-
@TargetClass(className = "jdk.internal.foreign.layout.AbstractLayout", onlyWith = {ForeignDisabled.class, JDKLatest.class})
149+
@TargetClass(className = "jdk.internal.foreign.layout.AbstractLayout", onlyWith = {ForeignDisabled.class})
152150
final class Target_jdk_internal_foreign_layout_AbstractLayout {
153151
@Substitute
154152
@AlwaysInline("Make remaining code in callers unreachable.")
@@ -158,7 +156,6 @@ VarHandle varHandle(Target_java_lang_foreign_MemoryLayout_PathElement... element
158156
}
159157

160158
@Substitute
161-
@TargetElement(onlyWith = JDKLatest.class)
162159
@SuppressWarnings({"unused", "static-method"})
163160
VarHandle varHandleInternal(Target_java_lang_foreign_MemoryLayout_PathElement... elements) {
164161
throw ForeignDisabledSubstitutions.fail();

substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/jdk/JavaLangSubstitutions.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,6 @@ final class Target_java_lang_StringUTF16 {
215215
final class Target_java_lang_Throwable {
216216

217217
@Alias //
218-
@TargetElement(onlyWith = JDKLatest.class) //
219218
@RecomputeFieldValue(kind = Kind.FromAlias, isFinal = true) //
220219
static boolean jfrTracing = false;
221220

substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/jdk/RecomputedFields.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@
4646
import com.oracle.svm.core.annotate.RecomputeFieldValue;
4747
import com.oracle.svm.core.annotate.Substitute;
4848
import com.oracle.svm.core.annotate.TargetClass;
49-
import com.oracle.svm.core.annotate.TargetElement;
5049
import com.oracle.svm.core.feature.AutomaticallyRegisteredFeature;
5150
import com.oracle.svm.core.feature.InternalFeature;
5251
import com.oracle.svm.core.util.BasedOnJDKFile;
@@ -227,7 +226,6 @@ public static int getCommonPoolParallelism() {
227226
}
228227

229228
@Alias //
230-
@TargetElement(onlyWith = JDKLatest.class)
231229
public static native ForkJoinPool asyncCommonPool();
232230
}
233231

substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/jdk/SecuritySubstitutions.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,6 @@ final class Target_java_security_Provider_ServiceKey {
110110
final class Target_java_security_Provider {
111111
@Alias //
112112
@RecomputeFieldValue(kind = RecomputeFieldValue.Kind.Custom, declClass = ThreadLocalServiceKeyComputer.class) //
113-
@TargetElement(onlyWith = JDKLatest.class) //
114113
private static Target_java_lang_ThreadLocal previousKey;
115114
}
116115

substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/jdk/SunMiscSubstitutions.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ int pageSize() {
9898
}
9999

100100
@Substitute
101-
@TargetElement(name = "arrayBaseOffset", onlyWith = JDKLatest.class)
101+
@TargetElement(name = "arrayBaseOffset")
102102
public long arrayBaseOffset(Class<?> clazz) {
103103
return LayoutEncoding.getArrayBaseOffset(DynamicHub.fromClass(clazz).getLayoutEncoding()).rawValue();
104104
}

substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/jdk/Target_java_lang_Module.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ public boolean isNativeAccessEnabled() {
6262
}
6363

6464
@Alias
65-
@TargetElement(onlyWith = JDKLatest.class)
6665
public native void ensureNativeAccess(Class<?> owner, String methodName, Class<?> currentClass, boolean jni);
6766

6867
@Substitute

substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/jdk/Target_java_util_concurrent_CompletableFuture.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ final class Target_java_util_concurrent_CompletableFuture {
4444
// Checkstyle: resume
4545
}
4646

47-
@TargetClass(className = "java.util.concurrent.DelayScheduler", onlyWith = JDKLatest.class)
47+
@TargetClass(className = "java.util.concurrent.DelayScheduler")
4848
final class Target_java_util_concurrent_DelayScheduler {
4949
@Alias @InjectAccessors(DelaySchedulerNanoTimeOffsetAccessor.class) //
5050
private static long nanoTimeOffset;

substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/jdk/Target_java_util_concurrent_ForkJoinTask.java

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,17 +30,16 @@
3030
import com.oracle.svm.core.annotate.Alias;
3131
import com.oracle.svm.core.annotate.Substitute;
3232
import com.oracle.svm.core.annotate.TargetClass;
33-
import com.oracle.svm.core.annotate.TargetElement;
3433

3534
import jdk.graal.compiler.core.common.SuppressFBWarnings;
3635

3736
@TargetClass(java.util.concurrent.ForkJoinTask.class)
3837
final class Target_java_util_concurrent_ForkJoinTask {
3938
@Alias private transient volatile Target_java_util_concurrent_ForkJoinTask_Aux aux;
4039

41-
@Alias @TargetElement(onlyWith = JDKLatest.class) volatile int status;
42-
@Alias @TargetElement(onlyWith = JDKLatest.class) static int ABNORMAL;
43-
@Alias @TargetElement(onlyWith = JDKLatest.class) static int THROWN;
40+
@Alias volatile int status;
41+
@Alias static int ABNORMAL;
42+
@Alias static int THROWN;
4443

4544
/**
4645
* Returns a rethrowable exception for this task, if available. The original method may attempt
@@ -52,7 +51,6 @@ final class Target_java_util_concurrent_ForkJoinTask {
5251
* by the original method.
5352
*/
5453
@Substitute
55-
@TargetElement(onlyWith = JDKLatest.class)
5654
@SuppressWarnings("all")
5755
@SuppressFBWarnings(value = "BC_IMPOSSIBLE_INSTANCEOF", justification = "Check for @TargetClass")
5856
private Throwable getException(boolean asExecutionException) {
@@ -77,6 +75,6 @@ final class Target_java_util_concurrent_ForkJoinTask_Aux {
7775
@Alias Throwable ex;
7876
}
7977

80-
@TargetClass(value = java.util.concurrent.ForkJoinTask.class, innerClass = "InterruptibleTask", onlyWith = JDKLatest.class)
78+
@TargetClass(value = java.util.concurrent.ForkJoinTask.class, innerClass = "InterruptibleTask")
8179
final class Target_java_util_concurrent_ForkJoinTask_InterruptibleTask {
8280
}

substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/jdk/Target_jdk_internal_misc_VM.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@
3535
import com.oracle.svm.core.annotate.RecomputeFieldValue.Kind;
3636
import com.oracle.svm.core.annotate.Substitute;
3737
import com.oracle.svm.core.annotate.TargetClass;
38-
import com.oracle.svm.core.annotate.TargetElement;
3938
import com.oracle.svm.core.snippets.KnownIntrinsics;
4039

4140
import jdk.internal.misc.Unsafe;
@@ -69,7 +68,6 @@ public static ClassLoader latestUserDefinedLoader0() {
6968
@Alias @InjectAccessors(DirectMemoryAccessors.class) //
7069
private static long directMemory;
7170
@Alias @InjectAccessors(PageAlignDirectMemoryAccessors.class) //
72-
@TargetElement(onlyWith = JDKLatest.class) //
7371
private static Boolean pageAlignDirectMemory;
7472
}
7573

0 commit comments

Comments
 (0)