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 "CompilationBailoutAction": {
return OptionDescriptor.create(
"CompilationBailoutAction",
OptionType.User,
org.graalvm.compiler.core.CompilationWrapper.ExceptionAction.class,
"Specifies the action to take when compilation fails with a bailout exception.",
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.",
},
GraalCompilerOptions.class,
"CompilationBailoutAction",
GraalCompilerOptions.CompilationBailoutAction);
}
case "CompilationFailureAction": {
return OptionDescriptor.create(
"CompilationFailureAction",
OptionType.User,
org.graalvm.compiler.core.CompilationWrapper.ExceptionAction.class,
"Specifies the action to take when compilation fails with a bailout exception. The accepted values are the same as for CompilationBailoutAction.",
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 or bailouts to handle with the action specified by CompilationFailureAction or CompilationBailoutAction 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("CompilationBailoutAction");
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();
}
};
}
}