Skip to content

Commit 22cc05e

Browse files
committed
Refactor ImageHeapScanner.
1 parent fcda673 commit 22cc05e

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

substratevm/src/com.oracle.graal.pointsto/src/com/oracle/graal/pointsto/heap/ImageHeapScanner.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -518,16 +518,16 @@ protected void onObjectReachable(ImageHeapConstant imageHeapConstant, ScanReason
518518

519519
AnalysisType type = imageHeapConstant.getType(metaAccess);
520520
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) {
521+
/* Simulated constants don't have a backing object and don't need to be processed. */
522+
if (object != null) {
523+
try {
524524
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);
525530
}
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);
531531
}
532532

533533
markTypeInstantiated(objectType, reason);

0 commit comments

Comments
 (0)