Skip to content

Commit a07c67c

Browse files
committed
[GR-58129] LayerUse should only disable ClosedTypeWorldHubLayout, not ClosedTypeWorld.
PullRequest: graal/18816
2 parents f8ed697 + bacac43 commit a07c67c

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

substratevm/src/com.oracle.svm.hosted/src/com/oracle/svm/hosted/imagelayer/HostedImageLayerBuildingSupport.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ public static void processLayerOptions(EconomicMap<OptionKey<?>, Object> values)
146146
if (layerUseValue.toString().isEmpty()) {
147147
/* Nothing to do, an empty --layer-use= disables the layer application. */
148148
} else {
149-
SubstrateOptions.ClosedTypeWorld.update(values, false);
149+
SubstrateOptions.ClosedTypeWorldHubLayout.update(values, false);
150150
SubstrateOptions.ParseRuntimeOptions.update(values, false);
151151
if (imageLayerEnabledHandler != null) {
152152
imageLayerEnabledHandler.onOptionEnabled(values);

substratevm/src/com.oracle.svm.hosted/src/com/oracle/svm/hosted/meta/VTableBuilder.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,12 @@
4646
public final class VTableBuilder {
4747
private final HostedUniverse hUniverse;
4848
private final HostedMetaAccess hMetaAccess;
49+
private final boolean closedTypeWorldHubLayout;
4950

5051
private VTableBuilder(HostedUniverse hUniverse, HostedMetaAccess hMetaAccess) {
5152
this.hUniverse = hUniverse;
5253
this.hMetaAccess = hMetaAccess;
54+
closedTypeWorldHubLayout = SubstrateOptions.useClosedTypeWorldHubLayout();
5355
}
5456

5557
public static void buildTables(HostedUniverse hUniverse, HostedMetaAccess hMetaAccess) {
@@ -118,7 +120,7 @@ private List<HostedMethod> generateITable(HostedType type) {
118120

119121
private List<HostedMethod> generateDispatchTable(HostedType type, int startingIndex) {
120122
Predicate<HostedMethod> includeMethod;
121-
if (hUniverse.hostVM().isClosedTypeWorld()) {
123+
if (closedTypeWorldHubLayout) {
122124
// include only methods which will be indirect calls
123125
includeMethod = m -> m.implementations.length > 1 || m.wrapped.isVirtualRootMethod();
124126
} else {

0 commit comments

Comments
 (0)