package org.graalvm.compiler.hotspot.stubs;
import java.util.*;
import org.graalvm.compiler.options.*;
public class StubOptions_OptionDescriptors implements OptionDescriptors {
@Override
public OptionDescriptor get(String value) {
switch (value) {
case "ForceUseOfNewInstanceStub": {
return OptionDescriptor.create(
"ForceUseOfNewInstanceStub",
Boolean.class,
"Force non-array object allocation to always use the slow path.",
StubOptions.class,
"ForceUseOfNewInstanceStub",
StubOptions.ForceUseOfNewInstanceStub);
}
case "TraceExceptionHandlerStub": {
return OptionDescriptor.create(
"TraceExceptionHandlerStub",
Boolean.class,
"Trace execution of stub used to handle an exception thrown by a callee.",
StubOptions.class,
"TraceExceptionHandlerStub",
StubOptions.TraceExceptionHandlerStub);
}
case "TraceNewArrayStub": {
return OptionDescriptor.create(
"TraceNewArrayStub",
Boolean.class,
"Trace execution of slow path stub for array allocation.",
StubOptions.class,
"TraceNewArrayStub",
StubOptions.TraceNewArrayStub);
}
case "TraceNewInstanceStub": {
return OptionDescriptor.create(
"TraceNewInstanceStub",
Boolean.class,
"Trace execution of slow path stub for non-array object allocation.",
StubOptions.class,
"TraceNewInstanceStub",
StubOptions.TraceNewInstanceStub);
}
case "TraceUnwindStub": {
return OptionDescriptor.create(
"TraceUnwindStub",
Boolean.class,
"Trace execution of the stub that routes an exception to a handler in the calling frame.",
StubOptions.class,
"TraceUnwindStub",
StubOptions.TraceUnwindStub);
}
}
return null;
}
@Override
public Iterator<OptionDescriptor> iterator() {
return new Iterator<OptionDescriptor>() {
int i = 0;
@Override
public boolean hasNext() {
return i < 5;
}
@Override
public OptionDescriptor next() {
switch (i++) {
case 0: return get("ForceUseOfNewInstanceStub");
case 1: return get("TraceExceptionHandlerStub");
case 2: return get("TraceNewArrayStub");
case 3: return get("TraceNewInstanceStub");
case 4: return get("TraceUnwindStub");
}
throw new NoSuchElementException();
}
};
}
}