Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[24.1] October CPU sync #800

Merged
merged 50 commits into from
Oct 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
501ec67
Avoid getHostBackend when instantiating UnimplementedGraalIntrinsics.
mur47x111 Aug 5, 2024
4464d09
[GR-57295] Aarch: Move setConservativeLabelRange after resetting crb.
rmosaner Aug 22, 2024
83e47d6
[GR-56104] Fix --bundle-create option and bundle-launcher feature on …
olpaw Jul 26, 2024
274253c
Start 24.1.1 dev cycle.
ansalond Sep 9, 2024
222e006
Update js and graalpython imports.
ansalond Sep 9, 2024
bf663bf
Update GraalVM versions used by simplelanguage and simpletool.
ansalond Sep 9, 2024
fa4bd8a
[GR-58037] Start 24.1.1 dev cycle.
ansalond Sep 9, 2024
a040071
Do not include TruffleJfrFeature if PGO config is specified.
jovanstevanovic Sep 4, 2024
6849f43
Eagerly initialize caches in ValueConversions
Aug 27, 2024
d5a75e5
Reset Provider.Service.constructorCache field
Aug 16, 2024
05501b5
Fix Addr part alignment in Truffle compilation logs.
jchalou Aug 27, 2024
bee00b6
update JVMCI to 23.0.1+9-jvmci-b01
OracleLabsAutomation Sep 11, 2024
9d96238
[GR-58065] Update labsjdk to 23.0.1+9-jvmci-b01
OracleLabsAutomation Sep 12, 2024
d224718
[GR-57745] Backport to 24.1: Eagerly initialize caches in ValueConver…
OracleLabsAutomation Sep 12, 2024
399dff8
[GR-57959] Backport to 24.1: Do not include TruffleJfrFeature if PGO …
OracleLabsAutomation Sep 12, 2024
f48126a
[GR-57656] Backport to 24.1: Fix Addr part alignment in Truffle compi…
OracleLabsAutomation Sep 13, 2024
b601cd2
Prevent emission of typeReachable in reachability-metadata.json
loicottet Sep 2, 2024
8bb5351
Ensure correct condition format during metadata emission
loicottet Sep 4, 2024
c91901e
Parse constant resource patterns as globs
loicottet Sep 4, 2024
8d04f6d
Enable "type" to register reflective elements unconditionally when pa…
loicottet Sep 4, 2024
3a90fa6
Pretty print legacy configuration files
loicottet Sep 5, 2024
0565fb3
Add changelog entry for reachability-metadata.json
loicottet Sep 16, 2024
6f0c9d3
[GR-57970] Backport to 24.1: Make js.webassembly option stable.
OracleLabsAutomation Sep 18, 2024
8dac5fb
[GR-57799] Backport to 24.1: Deprecate exposed truffle filesystem spi…
OracleLabsAutomation Sep 18, 2024
6607f1f
[GR-57295] Aarch: Move setConservativeLabelRange after resetting crb.
rmosaner Sep 18, 2024
db5dd56
update JVMCI to 23.0.1+10-jvmci-b01
OracleLabsAutomation Sep 18, 2024
d9cc011
[GR-57238] Backport to 24.1: Avoid getHostBackend when instantiating …
mur47x111 Sep 19, 2024
e4d58d5
Remove constant memory buffer assumption and simplify ByteArrayWasmMe…
woess Jul 24, 2024
1f57c96
Check that memory 0 size >= initial size at the start of a wasm funct…
woess Jul 25, 2024
d9e0420
Only perform initial memory 0 bounds check if the wasm function uses …
woess Jul 26, 2024
0309484
Work around for nullary benchmarkTeardownEach() in photon benchmark.
woess Jul 26, 2024
51b5e48
Fix TraceTransferToInterpreter in WasmFunctionNode.profileCondition.
woess Jul 26, 2024
40d8fbe
Try to read WebAssembly.Module bytes via Buffer Interop.
woess Jul 31, 2024
06883bc
support different JDK version between CE and EE for labsjdk-latest
marwan-hallaoui Sep 19, 2024
70d2787
[GR-56412] Backport to 24.1: Fix --bundle-create option and bundle-la…
olpaw Sep 19, 2024
a75a4bb
deploy snapshots
marwan-hallaoui Sep 19, 2024
4f7b250
[GR-57706] Backport to 24.1: Reset Provider.Service.constructorCache …
OracleLabsAutomation Sep 19, 2024
809609d
[GR-58228] Backport to 24.1: Remove constant memory buffer assumption…
OracleLabsAutomation Sep 20, 2024
94b5834
[GR-58165] Backport to 24.1: Prevent emission of typeReachable in rea…
loicottet Sep 20, 2024
a9352f8
[WIP] Update labsjdk to 23.0.1+10-jvmci-b01
OracleLabsAutomation Sep 23, 2024
7fadcea
update JVMCI CE to 23.0.1+10-jvmci-b01
marwan-hallaoui Sep 26, 2024
a8318eb
revert : support different JDK version between CE and EE for labsjdk-…
marwan-hallaoui Sep 26, 2024
d759153
Update mx import.
ansalond Sep 26, 2024
d0e1958
[GR-57721] Backport to 24.1: Create Gradle plugin with similar featur…
OracleLabsAutomation Sep 27, 2024
4c91c24
[GR-56704] Update mx import.
ansalond Oct 1, 2024
8dc96da
labsjdk respin : adopt jdk-23.0.1+11
marwan-hallaoui Oct 1, 2024
56e4c31
[GR-58283] Respin labsjdk to 23.0.1+11-jvmci-b01.
marwan-hallaoui Oct 2, 2024
9dabc62
[GR-57975] Backport to 24.1: Update bouncycastle dependency
OracleLabsAutomation Oct 3, 2024
4d9a08f
Release GraalVM 24.1.1.
marwan-hallaoui Oct 4, 2024
4f15dff
Merge 'oracle/release/graal-vm/24.1' into mandrel/24.1
zakkak Oct 15, 2024
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
16 changes: 8 additions & 8 deletions common.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"Jsonnet files should not include this file directly but use ci/common.jsonnet instead."
],

"mx_version": "7.27.5",
"mx_version": "7.27.5.1",

"COMMENT.jdks": "When adding or removing JDKs keep in sync with JDKs in ci/common.jsonnet",
"jdks": {
Expand Down Expand Up @@ -45,13 +45,13 @@
"labsjdk-ee-21-llvm": {"name": "labsjdk", "version": "ee-21.0.2+13-jvmci-23.1-b33-sulong", "platformspecific": true },
"graalvm-ee-21": {"name": "graalvm-java21", "version": "23.1.3", "platformspecific": true },

"oraclejdk-latest": {"name": "jpg-jdk", "version": "23", "build_id": "jdk-23+37", "platformspecific": true, "extrabundles": ["static-libs"]},
"labsjdk-ce-latest": {"name": "labsjdk", "version": "ce-23+37-jvmci-b01", "platformspecific": true },
"labsjdk-ce-latestDebug": {"name": "labsjdk", "version": "ce-23+37-jvmci-b01-debug", "platformspecific": true },
"labsjdk-ce-latest-llvm": {"name": "labsjdk", "version": "ce-23+37-jvmci-b01-sulong", "platformspecific": true },
"labsjdk-ee-latest": {"name": "labsjdk", "version": "ee-23+37-jvmci-b01", "platformspecific": true },
"labsjdk-ee-latestDebug": {"name": "labsjdk", "version": "ee-23+37-jvmci-b01-debug", "platformspecific": true },
"labsjdk-ee-latest-llvm": {"name": "labsjdk", "version": "ee-23+37-jvmci-b01-sulong", "platformspecific": true }
"oraclejdk-latest": {"name": "jpg-jdk", "version": "23", "build_id": "jdk-23.0.1+11", "platformspecific": true, "extrabundles": ["static-libs"]},
"labsjdk-ce-latest": {"name": "labsjdk", "version": "ce-23.0.1+11-jvmci-b01", "platformspecific": true },
"labsjdk-ce-latestDebug": {"name": "labsjdk", "version": "ce-23.0.1+11-jvmci-b01-debug", "platformspecific": true },
"labsjdk-ce-latest-llvm": {"name": "labsjdk", "version": "ce-23.0.1+11-jvmci-b01-sulong", "platformspecific": true },
"labsjdk-ee-latest": {"name": "labsjdk", "version": "ee-23.0.1+11-jvmci-b01", "platformspecific": true },
"labsjdk-ee-latestDebug": {"name": "labsjdk", "version": "ee-23.0.1+11-jvmci-b01-debug", "platformspecific": true },
"labsjdk-ee-latest-llvm": {"name": "labsjdk", "version": "ee-23.0.1+11-jvmci-b01-sulong", "platformspecific": true }
},

"eclipse": {
Expand Down
2 changes: 1 addition & 1 deletion compiler/mx.compiler/suite.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"sourceinprojectwhitelist" : [],

"groupId" : "org.graalvm.compiler",
"version" : "24.1.0.1",
"version" : "24.1.1.0",
"release" : False,
"url" : "http://www.graalvm.org/",
"developer" : {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ public final class JVMCIVersionCheck {
private static final Map<String, Map<String, Version>> JVMCI_MIN_VERSIONS = Map.of(
"21", Map.of(DEFAULT_VENDOR_ENTRY, createLegacyVersion(23, 1, 33)),
"23", Map.of(
"Oracle Corporation", createLabsJDKVersion("23+37", 1),
DEFAULT_VENDOR_ENTRY, createLabsJDKVersion("23+37", 1)));
"Oracle Corporation", createLabsJDKVersion("23.0.1+11", 1),
DEFAULT_VENDOR_ENTRY, createLabsJDKVersion("23.0.1+11", 1)));
private static final int NA = 0;
/**
* Minimum Java release supported by Graal.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ public static Plugins create(HotSpotGraalRuntimeProvider graalRuntime,
OptionValues options,
TargetDescription target,
BarrierSet barrierSet) {
InvocationPlugins invocationPlugins = new HotSpotInvocationPlugins(graalRuntime, config, compilerConfiguration, options);
InvocationPlugins invocationPlugins = new HotSpotInvocationPlugins(graalRuntime, config, compilerConfiguration, options, target);

Plugins plugins = new Plugins(invocationPlugins);
plugins.appendNodePlugin(new HotSpotExceptionDispatchPlugin(config, wordTypes.getWordKind()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
*/
package jdk.graal.compiler.hotspot.meta;

import static jdk.vm.ci.hotspot.HotSpotJVMCIRuntime.runtime;
import static jdk.graal.compiler.hotspot.HotSpotGraalServices.isIntrinsicAvailable;
import static jdk.vm.ci.hotspot.HotSpotJVMCIRuntime.runtime;

import java.lang.reflect.Type;
import java.util.ArrayList;
Expand All @@ -37,6 +37,7 @@
import org.graalvm.collections.EconomicSet;
import org.graalvm.collections.MapCursor;
import org.graalvm.collections.Pair;

import jdk.graal.compiler.debug.GraalError;
import jdk.graal.compiler.debug.TTY;
import jdk.graal.compiler.graph.Node;
Expand All @@ -49,7 +50,7 @@
import jdk.graal.compiler.options.OptionValues;
import jdk.graal.compiler.phases.tiers.CompilerConfiguration;
import jdk.graal.compiler.replacements.nodes.MacroInvokable;

import jdk.vm.ci.code.TargetDescription;
import jdk.vm.ci.hotspot.VMIntrinsicMethod;
import jdk.vm.ci.meta.ResolvedJavaMethod;
import jdk.vm.ci.meta.ResolvedJavaType;
Expand All @@ -73,11 +74,11 @@ record MethodKey(String name, String descriptor) {

private final EconomicMap<String, EconomicSet<MethodKey>> disabledIntrinsics = EconomicMap.create();

HotSpotInvocationPlugins(HotSpotGraalRuntimeProvider graalRuntime, GraalHotSpotVMConfig config, CompilerConfiguration compilerConfiguration, OptionValues options) {
HotSpotInvocationPlugins(HotSpotGraalRuntimeProvider graalRuntime, GraalHotSpotVMConfig config, CompilerConfiguration compilerConfiguration, OptionValues options, TargetDescription target) {
this.graalRuntime = graalRuntime;
this.config = config;
if (Options.WarnMissingIntrinsic.getValue(options)) {
this.unimplementedIntrinsics = new UnimplementedGraalIntrinsics(graalRuntime.getTarget().arch);
this.unimplementedIntrinsics = new UnimplementedGraalIntrinsics(target.arch);
} else {
this.unimplementedIntrinsics = null;
}
Expand Down
2 changes: 1 addition & 1 deletion espresso/mx.espresso/suite.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
suite = {
"mxversion": "7.27.1",
"name": "espresso",
"version" : "24.1.0.1",
"version" : "24.1.1.0",
"release" : False,
"groupId" : "org.graalvm.espresso",
"url" : "https://www.graalvm.org/reference-manual/java-on-truffle/",
Expand Down
2 changes: 1 addition & 1 deletion regex/mx.regex/suite.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@

"name" : "regex",

"version" : "24.1.0.1",
"version" : "24.1.1.0",
"release" : False,
"groupId" : "org.graalvm.regex",
"url" : "http://www.graalvm.org/",
Expand Down
2 changes: 1 addition & 1 deletion sdk/mx.sdk/suite.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
suite = {
"mxversion": "7.27.0",
"name" : "sdk",
"version" : "24.1.0.1",
"version" : "24.1.1.0",
"release" : False,
"sourceinprojectwhitelist" : [],
"url" : "https://github.com/oracle/graal",
Expand Down
2 changes: 2 additions & 0 deletions substratevm/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ This changelog summarizes major changes to GraalVM Native Image.
* (GR-52844) Add `-Os`, a new optimization mode to configure the optimizer in a way to get the smallest code size.
* (GR-49770) Add support for glob patterns in resource-config files in addition to regexp. The Tracing agent now prints entries in the glob format.
* (GR-46386) Throw missing registration errors for JNI queries when the query was not included in the reachability metadata.
* (GR-54241) Streamline Native Image reachability metadata into a single `reachability-metadata.json`. The formerly-used individual metadata files (`reflection-config.json`, `resource-config.json`, etc.) are now deprecated, but will still be accepted.
Native Image will only output `reachability-metadata.json` files, and those will be readable on the previous LTS versions of GraalVM. See the [documentation](../docs/reference-manual/native-image/ReachabilityMetadata.md).

## GraalVM for JDK 22 (Internal Version 24.0.0)
* (GR-48304) Red Hat added support for the JFR event ThreadAllocationStatistics.
Expand Down
5 changes: 4 additions & 1 deletion substratevm/mx.substratevm/mx_substratevm.py
Original file line number Diff line number Diff line change
Expand Up @@ -1139,7 +1139,9 @@ def _native_image_launcher_extra_jvm_args():
build_args=driver_build_args + [
'--features=com.oracle.svm.agent.NativeImageAgent$RegistrationFeature',
'--enable-url-protocols=jar',
],
] + svm_experimental_options([
'-H:+TreatAllTypeReachableConditionsAsTypeReached',
]),
headers=False,
home_finder=False,
),
Expand Down Expand Up @@ -1448,6 +1450,7 @@ def _native_image_configure_extra_jvm_args():
main_class='com.oracle.svm.configure.ConfigurationTool',
build_args=svm_experimental_options([
'-H:-ParseRuntimeOptions',
'-H:+TreatAllTypeReachableConditionsAsTypeReached',
]),
extra_jvm_args=_native_image_configure_extra_jvm_args(),
home_finder=False,
Expand Down
2 changes: 1 addition & 1 deletion substratevm/mx.substratevm/suite.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
suite = {
"mxversion": "7.27.1",
"name": "substratevm",
"version" : "24.1.0.1",
"version" : "24.1.1.0",
"release" : False,
"url" : "https://github.com/oracle/graal/tree/master/substratevm",

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,12 @@ protected void scanField(AnalysisField field, JavaConstant receiver, ScanReason

} catch (UnsupportedFeatureException | AnalysisError.TypeNotFoundError ex) {
unsupportedFeatureDuringFieldScan(bb, field, receiver, ex, reason);
} catch (AnalysisError analysisError) {
if (analysisError.getCause() instanceof UnsupportedFeatureException ex) {
unsupportedFeatureDuringFieldScan(bb, field, receiver, ex, reason);
} else {
throw analysisError;
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,14 @@
import jdk.graal.compiler.util.json.JsonWriter;

final class ConfigurationConditionPrintable {
static void printConditionAttribute(UnresolvedConfigurationCondition condition, JsonWriter writer) throws IOException {
static void printConditionAttribute(UnresolvedConfigurationCondition condition, JsonWriter writer, boolean combinedFile) throws IOException {
if (!condition.isAlwaysTrue()) {
writer.quote(CONDITIONAL_KEY).appendFieldSeparator().appendObjectStart();
writer.quote(condition.isRuntimeChecked() ? TYPE_REACHED_KEY : TYPE_REACHABLE_KEY).appendFieldSeparator().quote(condition.getTypeName());
/*
* typeReachable conditions are emitted as typeReached in reachability-metadata.json.
* typeReached conditions are emitted as typeReachable in resource-config.json
*/
writer.quote(combinedFile ? TYPE_REACHED_KEY : TYPE_REACHABLE_KEY).appendFieldSeparator().quote(condition.getTypeName());
writer.appendObjectEnd().appendSeparator();
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,7 @@ public synchronized void setAllPublicConstructors(ConfigurationMemberAccessibili
@Override
public synchronized void printJson(JsonWriter writer) throws IOException {
writer.appendObjectStart();
ConfigurationConditionPrintable.printConditionAttribute(condition, writer);
ConfigurationConditionPrintable.printConditionAttribute(condition, writer, true);
writer.quote("type").appendFieldSeparator();
typeDescriptor.printJson(writer);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,73 +103,73 @@ public void registerConstructor(UnresolvedConfigurationCondition condition, bool

@Override
public void registerPublicClasses(UnresolvedConfigurationCondition condition, ConfigurationType type) {
VMError.guarantee(condition.equals(type.getCondition()), "condition is already a part of the type");
VMError.guarantee(condition.isAlwaysTrue() || condition.equals(type.getCondition()), "condition is already a part of the type");
type.setAllPublicClasses();
}

@Override
public void registerDeclaredClasses(UnresolvedConfigurationCondition condition, ConfigurationType type) {
VMError.guarantee(condition.equals(type.getCondition()), "condition is already a part of the type");
VMError.guarantee(condition.isAlwaysTrue() || condition.equals(type.getCondition()), "condition is already a part of the type");
type.setAllDeclaredClasses();
}

@Override
public void registerRecordComponents(UnresolvedConfigurationCondition condition, ConfigurationType type) {
VMError.guarantee(condition.equals(type.getCondition()), "condition is already a part of the type");
VMError.guarantee(condition.isAlwaysTrue() || condition.equals(type.getCondition()), "condition is already a part of the type");
type.setAllRecordComponents();
}

@Override
public void registerPermittedSubclasses(UnresolvedConfigurationCondition condition, ConfigurationType type) {
VMError.guarantee(condition.equals(type.getCondition()), "condition is already a part of the type");
VMError.guarantee(condition.isAlwaysTrue() || condition.equals(type.getCondition()), "condition is already a part of the type");
type.setAllPermittedSubclasses();
}

@Override
public void registerNestMembers(UnresolvedConfigurationCondition condition, ConfigurationType type) {
VMError.guarantee(condition.equals(type.getCondition()), "condition is already a part of the type");
VMError.guarantee(condition.isAlwaysTrue() || condition.equals(type.getCondition()), "condition is already a part of the type");
type.setAllNestMembers();
}

@Override
public void registerSigners(UnresolvedConfigurationCondition condition, ConfigurationType type) {
VMError.guarantee(condition.equals(type.getCondition()), "condition is already a part of the type");
VMError.guarantee(condition.isAlwaysTrue() || condition.equals(type.getCondition()), "condition is already a part of the type");
type.setAllSigners();
}

@Override
public void registerPublicFields(UnresolvedConfigurationCondition condition, boolean queriedOnly, ConfigurationType type) {
VMError.guarantee(condition.equals(type.getCondition()), "condition is already a part of the type");
VMError.guarantee(condition.isAlwaysTrue() || condition.equals(type.getCondition()), "condition is already a part of the type");
type.setAllPublicFields(queriedOnly ? ConfigurationMemberAccessibility.QUERIED : ConfigurationMemberAccessibility.ACCESSED);
}

@Override
public void registerDeclaredFields(UnresolvedConfigurationCondition condition, boolean queriedOnly, ConfigurationType type) {
VMError.guarantee(condition.equals(type.getCondition()), "condition is already a part of the type");
VMError.guarantee(condition.isAlwaysTrue() || condition.equals(type.getCondition()), "condition is already a part of the type");
type.setAllDeclaredFields(queriedOnly ? ConfigurationMemberAccessibility.QUERIED : ConfigurationMemberAccessibility.ACCESSED);
}

@Override
public void registerPublicMethods(UnresolvedConfigurationCondition condition, boolean queriedOnly, ConfigurationType type) {
VMError.guarantee(condition.equals(type.getCondition()), "condition is already a part of the type");
VMError.guarantee(condition.isAlwaysTrue() || condition.equals(type.getCondition()), "condition is already a part of the type");
type.setAllPublicMethods(queriedOnly ? ConfigurationMemberAccessibility.QUERIED : ConfigurationMemberAccessibility.ACCESSED);
}

@Override
public void registerDeclaredMethods(UnresolvedConfigurationCondition condition, boolean queriedOnly, ConfigurationType type) {
VMError.guarantee(condition.equals(type.getCondition()), "condition is already a part of the type");
VMError.guarantee(condition.isAlwaysTrue() || condition.equals(type.getCondition()), "condition is already a part of the type");
type.setAllDeclaredMethods(queriedOnly ? ConfigurationMemberAccessibility.QUERIED : ConfigurationMemberAccessibility.ACCESSED);
}

@Override
public void registerPublicConstructors(UnresolvedConfigurationCondition condition, boolean queriedOnly, ConfigurationType type) {
VMError.guarantee(condition.equals(type.getCondition()), "condition is already a part of the type");
VMError.guarantee(condition.isAlwaysTrue() || condition.equals(type.getCondition()), "condition is already a part of the type");
type.setAllPublicConstructors(queriedOnly ? ConfigurationMemberAccessibility.QUERIED : ConfigurationMemberAccessibility.ACCESSED);
}

@Override
public void registerDeclaredConstructors(UnresolvedConfigurationCondition condition, boolean queriedOnly, ConfigurationType type) {
VMError.guarantee(condition.equals(type.getCondition()), "condition is already a part of the type");
VMError.guarantee(condition.isAlwaysTrue() || condition.equals(type.getCondition()), "condition is already a part of the type");
type.setAllDeclaredConstructors(queriedOnly ? ConfigurationMemberAccessibility.QUERIED : ConfigurationMemberAccessibility.ACCESSED);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,25 +110,30 @@ public void printJson(JsonWriter writer) throws IOException {
public static void printProxyInterfaces(JsonWriter writer, List<ConditionalElement<List<String>>> lists) throws IOException {
lists.sort(ConditionalElement.comparator(ProxyConfiguration::compareList));

writer.append('[');
writer.indent();
String prefix = "";
writer.appendArrayStart();
boolean firstProxy = true;
for (ConditionalElement<List<String>> list : lists) {
writer.append(prefix).newline();
writer.append('{').indent().newline();
ConfigurationConditionPrintable.printConditionAttribute(list.condition(), writer);
writer.quote("interfaces").append(":").append('[');
String typePrefix = "";
if (firstProxy) {
firstProxy = false;
} else {
writer.appendSeparator();
}
writer.appendObjectStart();
ConfigurationConditionPrintable.printConditionAttribute(list.condition(), writer, false);
writer.quote("interfaces").appendFieldSeparator().appendArrayStart();
boolean firstType = true;
for (String type : list.element()) {
writer.append(typePrefix).quote(type);
typePrefix = ",";
if (firstType) {
firstType = false;
} else {
writer.appendSeparator();
}
writer.quote(type);
}
writer.append(']').unindent().newline();
writer.append('}');
prefix = ",";
writer.appendArrayEnd();
writer.appendObjectEnd();
}
writer.unindent().newline();
writer.append(']');
writer.appendArrayEnd();
}

@Override
Expand Down
Loading
Loading