Skip to content

Commit

Permalink
[GR-52944] Avoid repetition when listing available compiler configura…
Browse files Browse the repository at this point in the history
…tions.

PullRequest: graal/17382
  • Loading branch information
dougxc committed Mar 30, 2024
2 parents fb89925 + 6070772 commit 650d727
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ public enum OptimizationLogTarget {
public static final OptionKey<Boolean> DebugStubsAndSnippets = new OptionKey<>(false);
@Option(help = "Send compiler IR to dump handlers on error.", type = OptionType.Debug)
public static final OptionKey<Boolean> DumpOnError = new OptionKey<>(false);
@Option(help = "Specify the dump level if CompilationFailureAction=Diagnose is used." +
@Option(help = "Specify the dump level if CompilationFailureAction=Diagnose is used. " +
"See CompilationFailureAction for details.", type = OptionType.User)
public static final OptionKey<String> DiagnoseDumpLevel = new OptionKey<>(":" + DebugContext.VERBOSE_LEVEL);
@Option(help = "Disable intercepting exceptions in debug scopes.", type = OptionType.Debug)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ public static CompilerConfigurationFactory selectFactory(String name, OptionValu
}
if (factory == null) {
throw new GraalError("Compiler configuration '%s' not found. Available configurations are: %s", value,
getAllCandidates().stream().map(c -> c.name).collect(Collectors.joining(", ")));
getAllCandidates().stream().map(c -> c.name).distinct().collect(Collectors.joining(", ")));
}
} else {
List<CompilerConfigurationFactory> candidates = getAllCandidates();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -257,13 +257,12 @@ public boolean isExact() {
* component type array. For example a long value can be written into a byte array by storing
* the larger value in the first entry and storing {@code Illegal} in the slots whose value
* comes from the long value. So a long in a byte array would be a long value followed by 7
* {@code Illegal} values. That also means such a write much be treated as a group by arraycopy
* {@code Illegal} values. That also means such a write must be treated as a group by arraycopy
* so reads and writes can't be performed in the middle of the illegal values.
* <p>
* So to ensure that an arraycopy properly treats these kinds of writes as group, it's
* sufficient to check that the first value is not {@code Illegal} and that the next value after
* the end is not {@code Illegal} since {@code Illegal} values only appear in the tail of these
* groups.
* To ensure that an arraycopy properly treats these kinds of writes as group, it's sufficient
* to check that the first value is not {@code Illegal} and that the next value after the end is
* not {@code Illegal} since {@code Illegal} values only appear in the tail of these groups.
*/
private static boolean ensureIllegalValuesCanBeRepresented(int length, int srcPos, int srcLength, int dstPos, int dstLength, VirtualObjectNode src, VirtualObjectNode dst, VirtualizerTool tool) {
if (length <= 0) {
Expand Down

0 comments on commit 650d727

Please sign in to comment.