803 else if (option == CompileCommandEnum::TraceAutoVectorization) {
804 TraceAutoVectorizationTagValidator validator(value, true);
805
806 if (!validator.is_valid()) {
807 jio_snprintf(errorbuf, buf_size, "Unrecognized tag name in %s: %s", option2name(option), validator.what());
808 }
809 } else if (option == CompileCommandEnum::TraceMergeStores) {
810 TraceMergeStores::TagValidator validator(value, true);
811
812 if (!validator.is_valid()) {
813 jio_snprintf(errorbuf, buf_size, "Unrecognized tag name in %s: %s", option2name(option), validator.what());
814 }
815 } else if (option == CompileCommandEnum::PrintIdealPhase) {
816 PhaseNameValidator validator(value);
817
818 if (!validator.is_valid()) {
819 jio_snprintf(errorbuf, buf_size, "Unrecognized phase name in %s: %s", option2name(option), validator.what());
820 }
821 } else if (option == CompileCommandEnum::TestOptionList) {
822 // all values are ok
823 }
824 #endif
825 else {
826 assert(false, "Ccstrlist type option missing validator");
827 }
828
829 register_command(matcher, option, (ccstr) value);
830 return;
831 } else {
832 jio_snprintf(errorbuf, buf_size, "Value cannot be read for option '%s' of type '%s'", ccname, type_str);
833 }
834 } else if (type == OptionType::Bool) {
835 char value[256];
836 if (*line == '\0') {
837 // Short version of a CompileCommand sets a boolean Option to true
838 // -XXCompileCommand=<Option>,<method pattern>
839 register_command(matcher, option, true);
840 return;
841 }
842 if (sscanf(line, "%255[a-zA-Z]%n", value, &bytes_read) == 1) {
|
803 else if (option == CompileCommandEnum::TraceAutoVectorization) {
804 TraceAutoVectorizationTagValidator validator(value, true);
805
806 if (!validator.is_valid()) {
807 jio_snprintf(errorbuf, buf_size, "Unrecognized tag name in %s: %s", option2name(option), validator.what());
808 }
809 } else if (option == CompileCommandEnum::TraceMergeStores) {
810 TraceMergeStores::TagValidator validator(value, true);
811
812 if (!validator.is_valid()) {
813 jio_snprintf(errorbuf, buf_size, "Unrecognized tag name in %s: %s", option2name(option), validator.what());
814 }
815 } else if (option == CompileCommandEnum::PrintIdealPhase) {
816 PhaseNameValidator validator(value);
817
818 if (!validator.is_valid()) {
819 jio_snprintf(errorbuf, buf_size, "Unrecognized phase name in %s: %s", option2name(option), validator.what());
820 }
821 } else if (option == CompileCommandEnum::TestOptionList) {
822 // all values are ok
823 } else if (option == CompileCommandEnum::TooManyTrapsAtBCI) {
824 // FIXME
825 }
826 #endif
827 else {
828 assert(false, "Ccstrlist type option missing validator");
829 }
830
831 register_command(matcher, option, (ccstr) value);
832 return;
833 } else {
834 jio_snprintf(errorbuf, buf_size, "Value cannot be read for option '%s' of type '%s'", ccname, type_str);
835 }
836 } else if (type == OptionType::Bool) {
837 char value[256];
838 if (*line == '\0') {
839 // Short version of a CompileCommand sets a boolean Option to true
840 // -XXCompileCommand=<Option>,<method pattern>
841 register_command(matcher, option, true);
842 return;
843 }
844 if (sscanf(line, "%255[a-zA-Z]%n", value, &bytes_read) == 1) {
|