@@ -517,17 +517,17 @@ protected void onObjectReachable(ImageHeapConstant imageHeapConstant, ScanReason
517
517
imageHeap .addReachableObject (objectType , imageHeapConstant );
518
518
519
519
AnalysisType type = imageHeapConstant .getType (metaAccess );
520
- Object object = bb . getSnippetReflectionProvider (). asObject ( Object . class , imageHeapConstant );
521
- try {
522
- /* Simulated constants don't have a backing object and don't need to be processed. */
523
- if ( object != null ) {
520
+ Object object = imageHeapConstant . getHostedObject ( );
521
+ /* Simulated constants don't have a backing object and don't need to be processed. */
522
+ if ( object != null ) {
523
+ try {
524
524
type .notifyObjectReachable (universe .getConcurrentAnalysisAccess (), object );
525
+ } catch (UnsupportedFeatureException e ) {
526
+ /* Enhance the unsupported feature message with the object trace and rethrow. */
527
+ StringBuilder backtrace = new StringBuilder ();
528
+ ObjectScanner .buildObjectBacktrace (bb , reason , backtrace );
529
+ throw new UnsupportedFeatureException (e .getMessage () + System .lineSeparator () + backtrace );
525
530
}
526
- } catch (UnsupportedFeatureException e ) {
527
- /* Enhance the unsupported feature message with the object trace and rethrow. */
528
- StringBuilder backtrace = new StringBuilder ();
529
- ObjectScanner .buildObjectBacktrace (bb , reason , backtrace );
530
- throw new UnsupportedFeatureException (e .getMessage () + System .lineSeparator () + backtrace );
531
531
}
532
532
533
533
markTypeInstantiated (objectType , reason );
0 commit comments