Skip to content

Commit 9da0b4a

Browse files
committed
Support interface hashing with g1.
1 parent 28d3c7e commit 9da0b4a

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/SubstrateOptions.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1594,8 +1594,7 @@ public static boolean useInterfaceHashing() {
15941594
if (ConcealedOptions.UseInterfaceHashing.getValue() != null) {
15951595
return ConcealedOptions.UseInterfaceHashing.getValue();
15961596
}
1597-
// TODO Include G1 after [GR-69090] is merged
1598-
return !useClosedTypeWorldHubLayout() && !useG1GC();
1597+
return !useClosedTypeWorldHubLayout();
15991598
}
16001599

16011600
@Fold

substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/hub/DynamicHubTypeCheckUtil.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
import java.util.Set;
2929

3030
import com.oracle.svm.core.SubstrateOptions;
31+
import com.oracle.svm.core.util.DuplicatedInNativeCode;
3132

3233
import jdk.graal.compiler.core.common.NumUtil;
3334
import jdk.graal.compiler.debug.GraalError;
@@ -45,6 +46,7 @@ public final class DynamicHubTypeCheckUtil {
4546
* The offset of the {@code shift} inside the {@code hashParam}.
4647
* {@code shift = hashParam >>> offset}. See {@link #hashParam(int[])} for details.
4748
*/
49+
@DuplicatedInNativeCode //
4850
public static final int HASHING_SHIFT_OFFSET = 24;
4951

5052
/**
@@ -65,6 +67,7 @@ public final class DynamicHubTypeCheckUtil {
6567
* {@code hashTable[hash(interfaceID)] = (iTableOffset << shift | interfaceID}. See the
6668
* documentation on TypeCheckBuilder for details.
6769
*/
70+
@DuplicatedInNativeCode //
6871
public static final int HASHING_INTERFACE_MASK = NumUtil.getNbitNumberInt(HASHING_ITABLE_SHIFT);
6972

7073
public record TypeCheckData(int[] openTypeWorldTypeCheckSlots, int[] openTypeWorldInterfaceHashTable, int openTypeWorldInterfaceHashParam, short numIterableInterfaces) {

0 commit comments

Comments
 (0)