package org.graalvm.compiler.core;
import java.util.*;
import org.graalvm.compiler.options.*;
import org.graalvm.compiler.options.OptionType;
public class GraalCompilerOptions_OptionDescriptors implements OptionDescriptors {
@Override
public OptionDescriptor get(String value) {
switch (value) {
case "CompilationBailoutAsFailure": {
return OptionDescriptor.create(
"CompilationBailoutAsFailure",
OptionType.User,
Boolean.class,
"Treat compilation bailouts like compilation failures.",
GraalCompilerOptions.class,
"CompilationBailoutAsFailure",
GraalCompilerOptions.CompilationBailoutAsFailure);
}
case "CompilationFailureAction": {
return OptionDescriptor.create(
"CompilationFailureAction",
OptionType.User,
org.graalvm.compiler.core.CompilationWrapper.ExceptionAction.class,
"Specifies the action to take when compilation fails.",
new String[] {
"",
"The accepted values are:",
" Silent - Print nothing to the console.",
" Print - Print a stack trace to the console.",
" Diagnose* - Retry the compilation with extra diagnostics.",
" ExitVM - Same as Diagnose except that the VM process exits after retrying.",
" ",
"* If \"Diagnose\" is set compilation will be retried with extra diagnostics enabled including dumping (see file:doc-files/DumpHelp.txt). ",
" In such a scenario DiagnoseDumpLevel can be used to specify the dump level (DebugContext dump levels) accordingly.",
" ",
},
GraalCompilerOptions.class,
"CompilationFailureAction",
GraalCompilerOptions.CompilationFailureAction);
}
case "CrashAt": {
return OptionDescriptor.create(
"CrashAt",
OptionType.Debug,
String.class,
"Pattern for method(s) that will trigger an exception when compiled. This option exists to test handling compilation crashes gracefully. See the MethodFilter option for the pattern syntax. A ':Bailout' suffix will raise a bailout exception and a ':PermanentBailout' suffix will raise a permanent bailout exception.",
GraalCompilerOptions.class,
"CrashAt",
GraalCompilerOptions.CrashAt);
}
case "ExitVMOnException": {
return OptionDescriptor.create(
"ExitVMOnException",
OptionType.User,
Boolean.class,
"Alias for CompilationFailureAction=ExitVM.",
GraalCompilerOptions.class,
"ExitVMOnException",
GraalCompilerOptions.ExitVMOnException);
}
case "MaxCompilationProblemsPerAction": {
return OptionDescriptor.create(
"MaxCompilationProblemsPerAction",
OptionType.User,
Integer.class,
"The maximum number of compilation failures to handle with the action specified by CompilationFailureAction before changing to a less verbose action. This does not apply to the ExitVM action.",
GraalCompilerOptions.class,
"MaxCompilationProblemsPerAction",
GraalCompilerOptions.MaxCompilationProblemsPerAction);
}
case "PrintCompilation": {
return OptionDescriptor.create(
"PrintCompilation",
OptionType.Debug,
Boolean.class,
"Print an informational line to the console for each completed compilation.",
GraalCompilerOptions.class,
"PrintCompilation",
GraalCompilerOptions.PrintCompilation);
}
}
return null;
}
@Override
public Iterator<OptionDescriptor> iterator() {
return new Iterator<OptionDescriptor>() {
int i = 0;
@Override
public boolean hasNext() {
return i < 6;
}
@Override
public OptionDescriptor next() {
switch (i++) {
case 0: return get("CompilationBailoutAsFailure");
case 1: return get("CompilationFailureAction");
case 2: return get("CrashAt");
case 3: return get("ExitVMOnException");
case 4: return get("MaxCompilationProblemsPerAction");
case 5: return get("PrintCompilation");
}
throw new NoSuchElementException();
}
};
}
}