Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ public static void processLayerOptions(EconomicMap<OptionKey<?>, Object> values)
if (layerUseValue.toString().isEmpty()) {
/* Nothing to do, an empty --layer-use= disables the layer application. */
} else {
SubstrateOptions.ClosedTypeWorld.update(values, false);
SubstrateOptions.ClosedTypeWorldHubLayout.update(values, false);
SubstrateOptions.ParseRuntimeOptions.update(values, false);
if (imageLayerEnabledHandler != null) {
imageLayerEnabledHandler.onOptionEnabled(values);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,12 @@
public final class VTableBuilder {
private final HostedUniverse hUniverse;
private final HostedMetaAccess hMetaAccess;
private final boolean closedTypeWorldHubLayout;

private VTableBuilder(HostedUniverse hUniverse, HostedMetaAccess hMetaAccess) {
this.hUniverse = hUniverse;
this.hMetaAccess = hMetaAccess;
closedTypeWorldHubLayout = SubstrateOptions.useClosedTypeWorldHubLayout();
}

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

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