25
25
package com .oracle .svm .core .foreign ;
26
26
27
27
import java .io .FileDescriptor ;
28
- import java .lang .annotation .Retention ;
29
- import java .lang .annotation .RetentionPolicy ;
30
28
import java .lang .ref .Reference ;
31
29
32
30
import com .oracle .svm .core .AlwaysInline ;
33
31
import com .oracle .svm .core .ArenaIntrinsics ;
32
+ import com .oracle .svm .core .ForeignSupport ;
34
33
import com .oracle .svm .core .annotate .Substitute ;
35
34
import com .oracle .svm .core .annotate .TargetClass ;
36
35
import com .oracle .svm .core .annotate .TargetElement ;
@@ -100,7 +99,7 @@ static void registerNatives() {
100
99
@ SuppressWarnings ("static-method" )
101
100
@ Substitute
102
101
@ TargetElement (onlyWith = SharedArenasEnabled .class )
103
- @ SVMScoped
102
+ @ ForeignSupport . Scoped
104
103
@ AlwaysInline ("Safepoints must be visible in caller" )
105
104
public void loadInternal (MemorySessionImpl session , MappedMemoryUtilsProxy mappedUtils , long address , boolean isSync , long size ) {
106
105
SubstrateForeignUtil .checkIdentity (mappedUtils , Target_java_nio_MappedMemoryUtils .PROXY );
@@ -121,7 +120,7 @@ public void loadInternal(MemorySessionImpl session, MappedMemoryUtilsProxy mappe
121
120
@ SuppressWarnings ("static-method" )
122
121
@ Substitute
123
122
@ TargetElement (onlyWith = SharedArenasEnabled .class )
124
- @ SVMScoped
123
+ @ ForeignSupport . Scoped
125
124
@ AlwaysInline ("Safepoints must be visible in caller" )
126
125
public boolean isLoadedInternal (MemorySessionImpl session , MappedMemoryUtilsProxy mappedUtils , long address , boolean isSync , long size ) {
127
126
SubstrateForeignUtil .checkIdentity (mappedUtils , Target_java_nio_MappedMemoryUtils .PROXY );
@@ -143,7 +142,7 @@ public boolean isLoadedInternal(MemorySessionImpl session, MappedMemoryUtilsProx
143
142
@ SuppressWarnings ("static-method" )
144
143
@ Substitute
145
144
@ TargetElement (onlyWith = SharedArenasEnabled .class )
146
- @ SVMScoped
145
+ @ ForeignSupport . Scoped
147
146
@ AlwaysInline ("Safepoints must be visible in caller" )
148
147
public void unloadInternal (MemorySessionImpl session , MappedMemoryUtilsProxy mappedUtils , long address , boolean isSync , long size ) {
149
148
SubstrateForeignUtil .checkIdentity (mappedUtils , Target_java_nio_MappedMemoryUtils .PROXY );
@@ -166,7 +165,7 @@ public void unloadInternal(MemorySessionImpl session, MappedMemoryUtilsProxy map
166
165
@ SuppressWarnings ("static-method" )
167
166
@ Substitute
168
167
@ TargetElement (onlyWith = SharedArenasEnabled .class )
169
- @ SVMScoped
168
+ @ ForeignSupport . Scoped
170
169
@ AlwaysInline ("Safepoints must be visible in caller" )
171
170
public void forceInternal (MemorySessionImpl session , MappedMemoryUtilsProxy mappedUtils , FileDescriptor fd , long address , boolean isSync , long index , long length ) {
172
171
SubstrateForeignUtil .checkIdentity (mappedUtils , Target_java_nio_MappedMemoryUtils .PROXY );
@@ -215,7 +214,3 @@ void closeScope0Unsupported(Target_jdk_internal_foreign_MemorySessionImpl sessio
215
214
throw SharedArenasDisabled .fail ();
216
215
}
217
216
}
218
-
219
- @ Retention (RetentionPolicy .RUNTIME )
220
- @interface SVMScoped {
221
- }
0 commit comments