package org.graalvm.compiler.hotspot.phases;
import java.util.*;
import org.graalvm.compiler.options.*;
public class OnStackReplacementPhase_OptionDescriptors implements OptionDescriptors {
@Override
public OptionDescriptor get(String value) {
switch (value) {
case "DeoptAfterOSR": {
return OptionDescriptor.create(
"DeoptAfterOSR",
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",
Boolean.class,
"Support OSR compilations with locks. If DeoptAfterOSR is true we can per definition not have unbalaced enter/extis 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();
}
};
}
}