package org.graalvm.compiler.hotspot.phases;
import java.util.*;
import org.graalvm.compiler.options.*;
import org.graalvm.compiler.options.OptionType;
public class OnStackReplacementPhase_OptionDescriptors implements OptionDescriptors {
@Override
public OptionDescriptor get(String value) {
switch (value) {
case "DeoptAfterOSR": {
return OptionDescriptor.create(
"DeoptAfterOSR",
OptionType.Debug,
Boolean.class,
"Deoptimize OSR compiled code when the OSR entry loop is finished if there is no mature profile available for the rest of the method.",
OnStackReplacementPhase.Options.class,
"DeoptAfterOSR",
OnStackReplacementPhase.Options.DeoptAfterOSR);
}
case "SupportOSRWithLocks": {
return OptionDescriptor.create(
"SupportOSRWithLocks",
OptionType.Debug,
Boolean.class,
"Support OSR compilations with locks. If DeoptAfterOSR is true we can per definition not have unbalanced enter/exits mappings. If DeoptAfterOSR is false insert artificial monitor enters after the OSRStart to have balanced enter/exits in the graph.",
OnStackReplacementPhase.Options.class,
"SupportOSRWithLocks",
OnStackReplacementPhase.Options.SupportOSRWithLocks);
}
}
return null;
}
@Override
public Iterator<OptionDescriptor> iterator() {
return new Iterator<OptionDescriptor>() {
int i = 0;
@Override
public boolean hasNext() {
return i < 2;
}
@Override
public OptionDescriptor next() {
switch (i++) {
case 0: return get("DeoptAfterOSR");
case 1: return get("SupportOSRWithLocks");
}
throw new NoSuchElementException();
}
};
}
}