Skip to content

Commit b62a667

Browse files
fangererqunaibit
authored andcommitted
Add missing TruffleBoundary
1 parent c3f7493 commit b62a667

File tree

1 file changed

+4
-17
lines changed

1 file changed

+4
-17
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/modules/cext/PythonCextBuiltins.java

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1531,7 +1531,7 @@ static Object doGeneric(Object pointer, Object listHead, int n,
15311531
java.lang.ref.Reference.reachabilityFence(oldReferents);
15321532

15331533
if (loggable) {
1534-
GC_LOGGER.log(LEVEL, PythonUtils.formatJString("Replicated native refs of %s to managed: %s", repr, Arrays.toString(referents)));
1534+
GC_LOGGER.log(LEVEL, PythonUtils.formatJString("Replicated native refs of %s to managed: %s", repr, arraysToString(referents)));
15351535
}
15361536
} else if (object == null && loggable) {
15371537
GC_LOGGER.log(LEVEL, PythonUtils.formatJString("Did not replicate native refs of %s: no wrapper", CApiContext.asHex(lPointer)));
@@ -1558,22 +1558,9 @@ static Object doManaged(Object pointer, Object listHead, int n) {
15581558
return PNone.NO_VALUE;
15591559
}
15601560

1561-
private static boolean arrayEquals(Object[] a, Object[] b) {
1562-
if (a == null || b == null) {
1563-
return false;
1564-
}
1565-
1566-
int length = a.length;
1567-
if (b.length != length) {
1568-
return false;
1569-
}
1570-
1571-
for (int i = 0; i < length; i++) {
1572-
if (a[i] != b[i]) {
1573-
return false;
1574-
}
1575-
}
1576-
return true;
1561+
@TruffleBoundary
1562+
private static String arraysToString(Object[] arr) {
1563+
return Arrays.toString(arr);
15771564
}
15781565

15791566
private static boolean isTupleWithNativeStorage(Object object) {

0 commit comments

Comments
 (0)