2525package com .oracle .svm .core .foreign ;
2626
2727import java .io .FileDescriptor ;
28- import java .lang .annotation .Retention ;
29- import java .lang .annotation .RetentionPolicy ;
3028import java .lang .ref .Reference ;
3129
3230import com .oracle .svm .core .AlwaysInline ;
3331import com .oracle .svm .core .ArenaIntrinsics ;
32+ import com .oracle .svm .core .ForeignSupport ;
3433import com .oracle .svm .core .annotate .Substitute ;
3534import com .oracle .svm .core .annotate .TargetClass ;
3635import com .oracle .svm .core .annotate .TargetElement ;
@@ -100,7 +99,7 @@ static void registerNatives() {
10099 @ SuppressWarnings ("static-method" )
101100 @ Substitute
102101 @ TargetElement (onlyWith = SharedArenasEnabled .class )
103- @ SVMScoped
102+ @ ForeignSupport . Scoped
104103 @ AlwaysInline ("Safepoints must be visible in caller" )
105104 public void loadInternal (MemorySessionImpl session , MappedMemoryUtilsProxy mappedUtils , long address , boolean isSync , long size ) {
106105 SubstrateForeignUtil .checkIdentity (mappedUtils , Target_java_nio_MappedMemoryUtils .PROXY );
@@ -121,7 +120,7 @@ public void loadInternal(MemorySessionImpl session, MappedMemoryUtilsProxy mappe
121120 @ SuppressWarnings ("static-method" )
122121 @ Substitute
123122 @ TargetElement (onlyWith = SharedArenasEnabled .class )
124- @ SVMScoped
123+ @ ForeignSupport . Scoped
125124 @ AlwaysInline ("Safepoints must be visible in caller" )
126125 public boolean isLoadedInternal (MemorySessionImpl session , MappedMemoryUtilsProxy mappedUtils , long address , boolean isSync , long size ) {
127126 SubstrateForeignUtil .checkIdentity (mappedUtils , Target_java_nio_MappedMemoryUtils .PROXY );
@@ -143,7 +142,7 @@ public boolean isLoadedInternal(MemorySessionImpl session, MappedMemoryUtilsProx
143142 @ SuppressWarnings ("static-method" )
144143 @ Substitute
145144 @ TargetElement (onlyWith = SharedArenasEnabled .class )
146- @ SVMScoped
145+ @ ForeignSupport . Scoped
147146 @ AlwaysInline ("Safepoints must be visible in caller" )
148147 public void unloadInternal (MemorySessionImpl session , MappedMemoryUtilsProxy mappedUtils , long address , boolean isSync , long size ) {
149148 SubstrateForeignUtil .checkIdentity (mappedUtils , Target_java_nio_MappedMemoryUtils .PROXY );
@@ -166,7 +165,7 @@ public void unloadInternal(MemorySessionImpl session, MappedMemoryUtilsProxy map
166165 @ SuppressWarnings ("static-method" )
167166 @ Substitute
168167 @ TargetElement (onlyWith = SharedArenasEnabled .class )
169- @ SVMScoped
168+ @ ForeignSupport . Scoped
170169 @ AlwaysInline ("Safepoints must be visible in caller" )
171170 public void forceInternal (MemorySessionImpl session , MappedMemoryUtilsProxy mappedUtils , FileDescriptor fd , long address , boolean isSync , long index , long length ) {
172171 SubstrateForeignUtil .checkIdentity (mappedUtils , Target_java_nio_MappedMemoryUtils .PROXY );
@@ -215,7 +214,3 @@ void closeScope0Unsupported(Target_jdk_internal_foreign_MemorySessionImpl sessio
215214 throw SharedArenasDisabled .fail ();
216215 }
217216}
218-
219- @ Retention (RetentionPolicy .RUNTIME )
220- @interface SVMScoped {
221- }
0 commit comments