Skip to content

Commit 11ac7de

Browse files
committed
svm: ImageHeapScanner#rescanField should except an AnalysisField
1 parent 4271c56 commit 11ac7de

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

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

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -703,6 +703,10 @@ public void rescanRoot(Field reflectionField, ScanReason rescanReason) {
703703
});
704704
}
705705

706+
public void rescanField(Object receiver, Field reflectionField, ScanReason reason) {
707+
rescanField(receiver, metaAccess.lookupJavaField(reflectionField), reason);
708+
}
709+
706710
/**
707711
* Trigger rescanning of an instance field. If the receiver value or field value were not
708712
* scanned before they will first be scanned and added to the shadow heap, then the value will
@@ -711,11 +715,10 @@ public void rescanRoot(Field reflectionField, ScanReason rescanReason) {
711715
* type ({@code Object[]}, {{@link Collection}, {@link Map} or {@link EconomicMap}} then its
712716
* elements will be rescanned too.
713717
*/
714-
public void rescanField(Object receiver, Field reflectionField, ScanReason reason) {
718+
public void rescanField(Object receiver, AnalysisField field, ScanReason reason) {
715719
maybeRunInExecutor(unused -> {
716-
AnalysisType type = metaAccess.lookupJavaType(reflectionField.getDeclaringClass());
720+
AnalysisType type = field.getType();
717721
if (type.isReachable()) {
718-
AnalysisField field = metaAccess.lookupJavaField(reflectionField);
719722
assert !field.isStatic() : field;
720723
if (!field.isReachable()) {
721724
return;

0 commit comments

Comments
 (0)