|
44 | 44 | import java.util.function.Predicate; |
45 | 45 | import java.util.stream.Collectors; |
46 | 46 |
|
47 | | -import com.oracle.svm.core.image.ImageHeapLayoutInfo; |
48 | 47 | import org.graalvm.collections.EconomicSet; |
49 | 48 | import org.graalvm.nativeimage.ImageSingletons; |
50 | 49 | import org.graalvm.nativeimage.dynamicaccess.AccessCondition; |
|
80 | 79 | import com.oracle.svm.core.feature.InternalFeature; |
81 | 80 | import com.oracle.svm.core.feature.JVMCIFeatureAccess; |
82 | 81 | import com.oracle.svm.core.graal.meta.RuntimeConfiguration; |
| 82 | +import com.oracle.svm.core.image.ImageHeapLayoutInfo; |
83 | 83 | import com.oracle.svm.core.meta.SharedField; |
84 | 84 | import com.oracle.svm.core.meta.SharedMethod; |
85 | 85 | import com.oracle.svm.core.meta.SharedType; |
|
105 | 105 | import com.oracle.svm.hosted.reflect.ReflectionDataBuilder; |
106 | 106 | import com.oracle.svm.shared.util.ReflectionUtil; |
107 | 107 | import com.oracle.svm.shared.util.VMError; |
108 | | -import com.oracle.svm.util.GuestAnnotationAccess; |
109 | 108 | import com.oracle.svm.util.GuestAccess; |
| 109 | +import com.oracle.svm.util.GuestAnnotationAccess; |
110 | 110 | import com.oracle.svm.util.JVMCIFieldValueTransformer; |
111 | 111 | import com.oracle.svm.util.OriginalFieldProvider; |
112 | 112 | import com.oracle.svm.util.dynamicaccess.JVMCIJNIAccess; |
@@ -446,6 +446,16 @@ public void registerJVMCIObjectReplacer(Function<JavaConstant, JavaConstant> rep |
446 | 446 | }); |
447 | 447 | } |
448 | 448 |
|
| 449 | + @Override |
| 450 | + public void registerBuildTimeIndyIncludeList(ResolvedJavaMethod method) { |
| 451 | + BootstrapMethodConfiguration.singleton().addBuildTimeIndy(method); |
| 452 | + } |
| 453 | + |
| 454 | + @Override |
| 455 | + public void registerBuildTimeCondyIncludeList(ResolvedJavaMethod method) { |
| 456 | + BootstrapMethodConfiguration.singleton().addBuildTimeCondy(method); |
| 457 | + } |
| 458 | + |
449 | 459 | /** |
450 | 460 | * Register an object replacer which may return an ImageHeapConstant. Note only one replacer |
451 | 461 | * can be triggered for a given object; otherwise an error will be thrown. Too, if the |
@@ -515,26 +525,12 @@ public void registerClassReachabilityListener(BiConsumer<DuringAnalysisAccess, C |
515 | 525 | getHostVM().registerClassReachabilityListener(listener); |
516 | 526 | } |
517 | 527 |
|
518 | | - /** |
519 | | - * Registers a method that is allowed to be executed at build time if called as the |
520 | | - * bootstrap method for an invokedynamic, in which case each call site outputted will be |
521 | | - * constant-folded. Other bootstrap methods will be executed at run time by default, |
522 | | - * creating the call site at run time. |
523 | | - * |
524 | | - * @since 25.1 |
525 | | - */ |
| 528 | + @Override |
526 | 529 | public void registerBuildTimeIndyIncludeList(Executable method) { |
527 | 530 | BootstrapMethodConfiguration.singleton().addBuildTimeIndy(getUniverse().getOriginalMetaAccess().lookupJavaMethod(method)); |
528 | 531 | } |
529 | 532 |
|
530 | | - /** |
531 | | - * Registers a method that is allowed to be executed at build time if called as the |
532 | | - * bootstrap method for a constantdynamic, in which case each call site outputted will be |
533 | | - * constant-folded. Other bootstrap methods will be executed at run time by default, |
534 | | - * creating the call site at run time. |
535 | | - * |
536 | | - * @since 25.1 |
537 | | - */ |
| 533 | + @Override |
538 | 534 | public void registerBuildTimeCondyIncludeList(Executable method) { |
539 | 535 | BootstrapMethodConfiguration.singleton().addBuildTimeCondy(getUniverse().getOriginalMetaAccess().lookupJavaMethod(method)); |
540 | 536 | } |
|
0 commit comments