Skip to content

Commit 99547c5

Browse files
author
Doug Simon
committed
8346825: [JVMCI] Remove NativeImageReinitialize annotation
Reviewed-by: never
1 parent ec683a1 commit 99547c5

File tree

10 files changed

+25
-69
lines changed

10 files changed

+25
-69
lines changed

src/jdk.internal.vm.ci/share/classes/jdk/vm/ci/common/InitTimer.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2014, 2019, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2014, 2025, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -82,7 +82,7 @@ private static boolean isEnabled() {
8282
/**
8383
* Cache for value of {@code jvmci.InitTimer} system property.
8484
*/
85-
@NativeImageReinitialize private static Boolean enabledPropertyValue;
85+
private static Boolean enabledPropertyValue;
8686

8787
private static AtomicInteger nesting;
8888
private static final String SPACES = " ";

src/jdk.internal.vm.ci/share/classes/jdk/vm/ci/common/NativeImageReinitialize.java

Lines changed: 0 additions & 36 deletions
This file was deleted.

src/jdk.internal.vm.ci/share/classes/jdk/vm/ci/hotspot/Cleaner.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2018, 2025, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -25,7 +25,6 @@
2525
import java.lang.ref.ReferenceQueue;
2626
import java.lang.ref.WeakReference;
2727

28-
import jdk.vm.ci.common.NativeImageReinitialize;
2928
import jdk.vm.ci.meta.ResolvedJavaType;
3029

3130
/**
@@ -41,7 +40,7 @@ public abstract class Cleaner extends WeakReference<Object> {
4140
/**
4241
* Head of linked list of cleaners.
4342
*/
44-
@NativeImageReinitialize private static Cleaner first;
43+
private static Cleaner first;
4544

4645
/**
4746
* Linked list pointers.

src/jdk.internal.vm.ci/share/classes/jdk/vm/ci/hotspot/HotSpotConstantPool.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2011, 2025, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -27,7 +27,6 @@
2727
import java.util.stream.Collectors;
2828

2929
import jdk.vm.ci.common.JVMCIError;
30-
import jdk.vm.ci.common.NativeImageReinitialize;
3130
import static jdk.vm.ci.hotspot.CompilerToVM.compilerToVM;
3231
import static jdk.vm.ci.hotspot.HotSpotJVMCIRuntime.runtime;
3332
import static jdk.vm.ci.hotspot.HotSpotVMConfig.config;
@@ -182,7 +181,7 @@ JvmConstant get(int tag) {
182181
throw new JVMCIError("Unknown JvmConstant tag %s", tag);
183182
}
184183

185-
@NativeImageReinitialize private static volatile JvmConstants instance;
184+
private static volatile JvmConstants instance;
186185

187186
static JvmConstants instance() {
188187
JvmConstants result = instance;

src/jdk.internal.vm.ci/share/classes/jdk/vm/ci/hotspot/HotSpotJVMCICompilerConfig.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2015, 2024, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2015, 2025, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -28,7 +28,6 @@
2828
import java.util.Set;
2929

3030
import jdk.vm.ci.code.CompilationRequest;
31-
import jdk.vm.ci.common.NativeImageReinitialize;
3231
import jdk.vm.ci.hotspot.HotSpotJVMCIRuntime.Option;
3332
import jdk.vm.ci.runtime.JVMCICompiler;
3433
import jdk.vm.ci.runtime.JVMCICompilerFactory;
@@ -78,7 +77,7 @@ public boolean isGCSupported(int gcIdentifier) {
7877
/**
7978
* Factory of the selected system compiler.
8079
*/
81-
@NativeImageReinitialize private static JVMCICompilerFactory compilerFactory;
80+
private static JVMCICompilerFactory compilerFactory;
8281

8382
/**
8483
* Gets the selected system compiler factory.

src/jdk.internal.vm.ci/share/classes/jdk/vm/ci/hotspot/HotSpotJVMCIRuntime.java

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2015, 2024, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2015, 2025, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -61,7 +61,6 @@
6161
import jdk.vm.ci.code.InstalledCode;
6262
import jdk.vm.ci.common.InitTimer;
6363
import jdk.vm.ci.common.JVMCIError;
64-
import jdk.vm.ci.common.NativeImageReinitialize;
6564
import jdk.vm.ci.meta.JavaKind;
6665
import jdk.vm.ci.meta.JavaType;
6766
import jdk.vm.ci.meta.ResolvedJavaField;
@@ -84,7 +83,7 @@ public final class HotSpotJVMCIRuntime implements JVMCIRuntime {
8483
/**
8584
* Singleton instance lazily initialized via double-checked locking.
8685
*/
87-
@NativeImageReinitialize private static volatile HotSpotJVMCIRuntime instance;
86+
private static volatile HotSpotJVMCIRuntime instance;
8887

8988
private HotSpotResolvedObjectTypeImpl javaLangObject;
9089
private HotSpotResolvedObjectTypeImpl javaLangInvokeMethodHandle;
@@ -287,7 +286,7 @@ public enum Option {
287286
private static final String NULL_VALUE = "NULL";
288287

289288
private final Class<?> type;
290-
@NativeImageReinitialize private Object value;
289+
private Object value;
291290
private final Object defaultValue;
292291
boolean isDefault = true;
293292
private final String[] helpLines;
@@ -491,12 +490,12 @@ public static JavaKind getHostWordKind() {
491490
private volatile JVMCICompiler compiler;
492491
protected final HotSpotJVMCIReflection reflection;
493492

494-
@NativeImageReinitialize private volatile boolean creatingCompiler;
493+
private volatile boolean creatingCompiler;
495494

496495
/**
497496
* Cache for speeding up {@link #fromClass(Class)}.
498497
*/
499-
@NativeImageReinitialize private volatile ClassValue<WeakReferenceHolder<HotSpotResolvedJavaType>> resolvedJavaType;
498+
private volatile ClassValue<WeakReferenceHolder<HotSpotResolvedJavaType>> resolvedJavaType;
500499

501500
/**
502501
* To avoid calling ClassValue.remove to refresh the weak reference, which under certain
@@ -538,20 +537,20 @@ public KlassWeakReference(Long klassPointer, HotSpotResolvedObjectTypeImpl refer
538537
* A mapping from the {@code Klass*} to the corresponding {@link HotSpotResolvedObjectTypeImpl}. The value is
539538
* held weakly through a {@link KlassWeakReference} so that unused types can be unloaded when the compiler no longer needs them.
540539
*/
541-
@NativeImageReinitialize private HashMap<Long, KlassWeakReference> resolvedJavaTypes;
540+
private HashMap<Long, KlassWeakReference> resolvedJavaTypes;
542541

543542
/**
544543
* A {@link ReferenceQueue} to track when {@link KlassWeakReference}s have been freed so that the corresponding
545544
* entry in {@link #resolvedJavaTypes} can be cleared.
546545
*/
547-
@NativeImageReinitialize private ReferenceQueue<HotSpotResolvedObjectTypeImpl> resolvedJavaTypesQueue;
546+
private ReferenceQueue<HotSpotResolvedObjectTypeImpl> resolvedJavaTypesQueue;
548547

549548
/**
550549
* Stores the value set by {@link #excludeFromJVMCICompilation(Module...)} so that it can be
551550
* read from the VM.
552551
*/
553552
@SuppressWarnings("unused")//
554-
@NativeImageReinitialize private Module[] excludeFromJVMCICompilation;
553+
private Module[] excludeFromJVMCICompilation;
555554

556555
private final Map<Class<? extends Architecture>, JVMCIBackend> backends = new HashMap<>();
557556

src/jdk.internal.vm.ci/share/classes/jdk/vm/ci/hotspot/HotSpotMethodData.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2012, 2024, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2012, 2025, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -30,7 +30,6 @@
3030

3131
import java.util.Arrays;
3232

33-
import jdk.vm.ci.common.NativeImageReinitialize;
3433
import jdk.internal.misc.Unsafe;
3534
import jdk.vm.ci.meta.DeoptimizationReason;
3635
import jdk.vm.ci.meta.JavaMethodProfile;
@@ -144,7 +143,7 @@ private int cellsToBytes(int cells) {
144143
/**
145144
* Singleton instance lazily initialized via double-checked locking.
146145
*/
147-
@NativeImageReinitialize private static volatile VMState instance;
146+
private static volatile VMState instance;
148147

149148
static VMState instance() {
150149
VMState result = instance;

src/jdk.internal.vm.ci/share/classes/jdk/vm/ci/hotspot/HotSpotMethodHandleAccessProvider.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2014, 2024, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2014, 2025, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -28,7 +28,6 @@
2828
import java.lang.invoke.MethodHandle;
2929

3030
import jdk.vm.ci.common.JVMCIError;
31-
import jdk.vm.ci.common.NativeImageReinitialize;
3231
import jdk.vm.ci.hotspot.HotSpotMethodData.VMState;
3332
import jdk.vm.ci.meta.ConstantReflectionProvider;
3433
import jdk.vm.ci.meta.JavaConstant;
@@ -107,7 +106,7 @@ private Internals() {
107106
/**
108107
* Singleton instance lazily initialized via double-checked locking.
109108
*/
110-
@NativeImageReinitialize private static volatile Internals instance;
109+
private static volatile Internals instance;
111110

112111
static Internals instance() {
113112
Internals result = instance;

src/jdk.internal.vm.ci/share/classes/jdk/vm/ci/hotspot/HotSpotResolvedPrimitiveType.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2011, 2021, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2011, 2025, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -31,7 +31,6 @@
3131
import java.util.List;
3232

3333
import jdk.vm.ci.common.JVMCIError;
34-
import jdk.vm.ci.common.NativeImageReinitialize;
3534
import jdk.vm.ci.meta.AnnotationData;
3635
import jdk.vm.ci.meta.Assumptions.AssumptionResult;
3736
import jdk.vm.ci.meta.JavaConstant;
@@ -46,7 +45,7 @@
4645
*/
4746
public final class HotSpotResolvedPrimitiveType extends HotSpotResolvedJavaType {
4847

49-
@NativeImageReinitialize static HotSpotResolvedPrimitiveType[] primitives;
48+
static HotSpotResolvedPrimitiveType[] primitives;
5049

5150
private JavaKind kind;
5251
HotSpotObjectConstantImpl mirror;

src/jdk.internal.vm.ci/share/classes/jdk/vm/ci/runtime/JVMCI.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2015, 2019, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2015, 2025, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -24,17 +24,16 @@
2424

2525
import java.util.Formatter;
2626

27-
import jdk.vm.ci.common.NativeImageReinitialize;
2827
import jdk.vm.ci.services.Services;
2928

3029
public class JVMCI {
3130

3231
/**
3332
* Singleton instance lazily initialized via double-checked locking.
3433
*/
35-
@NativeImageReinitialize private static volatile JVMCIRuntime runtime;
34+
private static volatile JVMCIRuntime runtime;
3635

37-
@NativeImageReinitialize private static boolean initializing;
36+
private static boolean initializing;
3837

3938
public static void initialize() {
4039
// force static initializer

0 commit comments

Comments
 (0)